Create chat completions augmented with information from your data sources.
POST
/
v1
/
users
/
me
/
chat
/
completions
curl-X POST 'https://api.sid.ai/v1/users/me/chat/completions'\--header'Content-Type: application/json'\--header'Authorization: Bearer <access_token>'\--data-raw '{"model":"gpt-3.5-turbo","messages":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"What does SID.ai do?"}]}'
{"id":"chatcmpl-123","object":"chat.completion","created":1677652288,"model":"gpt-3.5-turbo-0613","system_fingerprint":"fp_44709d6fcb","choices":[{"index":0,"message":{"role":"assistant","content":"Based on the provided information, SID.ai is a company that offers a solution for developers to easily integrate all their customer's data",},"finish_reason":"stop"}],"usage":{"prompt_tokens":9,"completion_tokens":12,"total_tokens":21}}
The query chat completion API fully integrates the SID query API with the OpenAI chat completions API.
It allows you to create a model response for the given chat conversation,
automatically using the SID query API to retrieve relevant information from your data sources when necessary.
The format of the request and response bodies is exactly the same as for the OpenAI chat completions API.
See here for more details.
curl-X POST 'https://api.sid.ai/v1/users/me/chat/completions'\--header'Content-Type: application/json'\--header'Authorization: Bearer <access_token>'\--data-raw '{"model":"gpt-3.5-turbo","messages":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"What does SID.ai do?"}]}'
{"id":"chatcmpl-123","object":"chat.completion","created":1677652288,"model":"gpt-3.5-turbo-0613","system_fingerprint":"fp_44709d6fcb","choices":[{"index":0,"message":{"role":"assistant","content":"Based on the provided information, SID.ai is a company that offers a solution for developers to easily integrate all their customer's data",},"finish_reason":"stop"}],"usage":{"prompt_tokens":9,"completion_tokens":12,"total_tokens":21}}
curl-X POST 'https://api.sid.ai/v1/users/me/chat/completions'\--header'Content-Type: application/json'\--header'Authorization: Bearer <access_token>'\--data-raw '{"model":"gpt-3.5-turbo","messages":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"What does SID.ai do?"}]}'
{"id":"chatcmpl-123","object":"chat.completion","created":1677652288,"model":"gpt-3.5-turbo-0613","system_fingerprint":"fp_44709d6fcb","choices":[{"index":0,"message":{"role":"assistant","content":"Based on the provided information, SID.ai is a company that offers a solution for developers to easily integrate all their customer's data",},"finish_reason":"stop"}],"usage":{"prompt_tokens":9,"completion_tokens":12,"total_tokens":21}}