Generations
Create a chat completion
POST
/
chat
Authorization
Body
curl --request POST \
--url https://api.honeyhive.ai/chat \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"function_call": "<string>",
"functions": [
{}
],
"hyperparameters": {},
"messages": [
{}
],
"model": "<string>",
"num_samples": 123,
"project": "<string>",
"provider": "<string>",
"stream": true,
"version": "<string>"
}'
{
"choices": [
{}
],
"cost": 123,
"generation_id": "<string>",
"latency": 123,
"session_id": "<string>",
"stream": true,
"timestamp": "2023-11-07T05:31:56Z"
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
function_call
string
The function call method
functions
object[]
hyperparameters
object
messages
object[]
requiredThe chat history
model
string
requiredThe model to use
num_samples
integer
The number of samples
project
string
requiredThe project ID
provider
string
The provider
stream
boolean
Whether to stream output
version
string
The version of the chat
Response
200 - application/json
choices
object[]
cost
number
generation_id
string
latency
number
session_id
string
stream
boolean
timestamp
string
curl --request POST \
--url https://api.honeyhive.ai/chat \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"function_call": "<string>",
"functions": [
{}
],
"hyperparameters": {},
"messages": [
{}
],
"model": "<string>",
"num_samples": 123,
"project": "<string>",
"provider": "<string>",
"stream": true,
"version": "<string>"
}'
{
"choices": [
{}
],
"cost": 123,
"generation_id": "<string>",
"latency": 123,
"session_id": "<string>",
"stream": true,
"timestamp": "2023-11-07T05:31:56Z"
}