cURL
curl --request POST \ --url https://api.scholarai.io/api/chat/completions \ --header 'Content-Type: application/json' \ --header 'x-scholarai-api-key: <api-key>' \ --data ' { "model": "<string>", "messages": [ { "role": "<string>", "content": "<string>" } ], "stream": true } '
Mimics the input and output to the OpenAI Chat Completion API: https://platform.openai.com/docs/api-reference/chat/create
Model being used. Currently ignored and defaults to "scholarai" with GPT4-turbo
Show child attributes
Role of the message. Must be "user"
Content of the message. Must be a string.
Whether or not to stream the response. Streaming is recommended!
Stream based on OpenAI Completions structure