관련 질문
Magisterium AI API는 응답 객체의 related_questions 필드를 통해 관련 질문을 반환할 수 있습니다. 이 필드는 선택 사항입니다. 관련 질문을 반환하려면 요청에서 return_related_questions 매개변수를 true로 설정해야 합니다.
python
url = "https://www.magisterium.com/api/v1/chat/completions"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json",
}
data = {
"model": "magisterium-1",
"messages": [
{
"role": "user",
"content": "What is the Magisterium?",
}
],
"stream": False,
"return_related_questions": True
}관련 질문은 응답 객체에 문자열 배열로 포함됩니다.
json
{
"object": "chat.completion",
"related_questions": [
"What is the Magisterium's teaching on faith and morals?",
"What is the Magisterium's teaching on Scripture?",
"What is the Magisterium's teaching on tradition?",
],
// other fields ...
}스트리밍
인용과 마찬가지로, 관련 질문은 마지막 청크에만 포함됩니다.