-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
I run a local service according to this document.
It is OK when "stream": true is set in request body. But if you don't set the stream, it will fail.
Success:
curl --location 'http://localhost:8001/proxy/v1/chat/completions' \
--header 'Authorization: Bearer $BRAINTRUST_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "What is your model?"
}
],
"stream": true,
"max_tokens": 150,
"seed": 1
}'
Failed:
curl --location 'http://localhost:8001/proxy/v1/chat/completions' \
--header 'Authorization: $BRAINTRUST_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "What is your model?"
}
],
"max_tokens": 150,
"seed": 1
}'
But call https://braintrustproxy.com will be OK. Why?
curl --location 'https://braintrustproxy.com/proxy/v1/chat/completions' \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "user",
"content": "What is a proxy?"
}
],
"seed": 1
}' \
-H "Authorization: Bearer $OPENAI_API_KEY"
Metadata
Metadata
Assignees
Labels
No labels