{
"model": "gpt-3.5-turbo",
"response_format": {
"type": "json_object"
},
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to output JSON."
},
{
"role": "user",
"content": "Who won the world series in 2020?"
}
]
}
curl --location --request POST 'https://api.b3n.fun/v1/chat/completions' \
--header 'Authorization: sk-abc' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-3.5-turbo",
"response_format": {
"type": "json_object"
},
"messages": [
{
"role": "system",
"content": "You are a helpful assistant designed to output JSON."
},
{
"role": "user",
"content": "Who won the world series in 2020?"
}
]
}'
{
"id": "chatcmpl-9CTQJmIvA1d30bwWgdhQ0lW6z88hI",
"object": "chat.completion",
"created": 1712760067,
"model": "gpt-3.5-turbo-0125",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "\n{\n \"error\": \"I'm sorry, but the World Series is not a fixed event, and I cannot provide real-time information. You may want to search online for the latest winner.\"\n}"
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 31,
"completion_tokens": 41,
"total_tokens": 72
},
"system_fingerprint": "fp_b28b39ffa8"
}