Closed Luo-hongyi closed 5 months ago
I've added this in v1.5.7
Still doesn't work:
127.0.0.1:56781 - - [23/Jun/2024:22:49:45] "OPTIONS /v1/chat/completions" 422 82
can i see your data request?
This is my test:
Your response status is 422 so the request data format may be error:
Example Correct:
{
"stream": true,
"model": "gpt-3.5-turbo",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the world series in 2020?"}
]
}
Invalid:
{
"stream": true,
"model": "gpt-3.5-turbo",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Who won the world series in 2020?"},
]
}
CORS error
/#/:1 Access to fetch at 'http://127.0.0.1:8000/v1/chat/completions' from origin 'https://app.nextchat.dev' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
I've updated new version with cors added
It works, thank you!
Each API call generated a new conversation in Poe. Is there any possibility of improvement?
For now u can do this instead:
I'll add custom config in next version
NextChat use OPTIONS but not POST:
127.0.0.1:65392 - - [23/Jun/2024:00:30:40] "OPTIONS /v1/chat/completions" 405 31