Magisterium AI

أسئلة ذات صلة

يمكن أيضًا لـ 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 ...
}

البث

مثل الاقتباسات، يتم تضمين الأسئلة ذات الصلة أيضًا فقط في الجزء الأخير.