Související otázky
Magisterium AI API může také vrátit související otázky v objektu odpovědi prostřednictvím pole related_questions. Toto pole je volitelné. Aby byly související otázky vráceny, musíte v žádosti nastavit parametr return_related_questions na 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
}Související otázky budou zahrnuty v objektu odpovědi jako pole řetězců.
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 ...
}Streaming
Podobně jako citace jsou související otázky zahrnuty pouze v posledním chunku.