Magisterium AI

പങ്കിടുക:

ശേഖരിക്കപ്പെട്ട ചോദിച്ചറിയലുകൾ

Magisterium AI API പ്രതികരണ സാഹചര്യത്തിൽ related_questions എന്ന ഫീൽഡ് വഴി ബന്ധപ്പെട്ട ചോദിക്കലുകൾയെ തിരികെ നൽകുകയും ചെയ്യാം. ഈ ഫീൽഡ് ബ്ലാഹനം ആയി ആണ്. ബന്ധപ്പെട്ട ചോദിക്കലുകൾ തിരികെ നൽകാൻ, നിങ്ങളുടെ അഭ്യർത്ഥനയിൽ return_related_questions പാരാമീറ്റർ സത്യത്തിൽ നിശ്ചയിക്കണം.

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 ...
}

സ്ട്രീമിംഗ്

ഉദാഹരണങ്ങൾക്ക് സമാനമായി, ബന്ധപ്പെട്ട ചോദിക്കലുകൾ മാത്രം അവസാന_chunk-ൽ ഉൾപ്പെടുത്തുന്നു.