Completions Recommendations Chat
Returns a response for the chat conversation.
All the DevRev APIs require a token to authenticate the user. Provide Authorization: Bearer <TOKEN>
as a header to every API request.
How do I find my token?
In: header
The maximum number of tokens that can be generated in the chat completion.
int32
A list of messages comprising the conversation so far.
1 <= items
Sequences where the API will stop generating further tokens. Maximum of 4 sequences are supported. Defaults to none.
If set, partial message deltas will be sent. Defaults to false.
What sampling temperature to use. Value can be between 0 and 2 and defaults to 1.0. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
float
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. For openai: Between 0 and
- Defaults to 1.0.
float
Response Body
curl -X POST "https://api.devrev.ai/recommendations.chat.completions" \ -H "Content-Type: application/json" \ -d '{ "messages": [ { "content": "string", "role": "assistant" } ] }'
{
"text_response": "string"
}
{
"detail": "string",
"message": "string",
"type": "artifact_already_attached_to_a_parent",
"existing_parent": "string",
"is_same": true
}
{
"detail": "string",
"message": "string",
"type": "unauthenticated"
}
{
"detail": "string",
"message": "string",
"type": "forbidden"
}
{
"detail": "string",
"message": "string",
"type": "too_many_requests",
"retry_after": 0
}
{
"detail": "string",
"message": "string",
"type": "internal_error",
"reference_id": "string"
}
{
"detail": "string",
"message": "string",
"type": "service_unavailable"
}