openai-proxy
openai-proxy copied to clipboard
举个爪: It has a long delay,反向代理延迟很严重,经常返回失败
你的困惑是什么
GET请求响应很快,POST请求超时严重
你有做过哪些尝试
使用sealos部署,并设定我的域名。发送如下GET请求响应较快:
curl -X GET '{myarea}/claude/organizations/{myuuid}/chat_conversations'
--header 'Accept: text/event-stream'
--header 'Content-Type: application/json'
--header 'Cookie: sessionKey={mySessionkey}'
--header 'Content-Type: application/json'
但发送如下POST请求经常超时:
curl -X POST '{myarea}/claude/{myuuid}/{myconversionid}/v1/chat/completions'
--header 'Accept: /'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {mysessionKey}'
--data-raw '{
"model":"claude-2",
"messages": [
{"role": "user", "content":"What do you think about youself"}
],
"stream": false
}'
包括使用https://openai.aihey.cc/claude/append_message的API
你希望我怎么帮你
POST发送的请求claude都有,但反向代理响应较慢,可能是什么原因?
@sunshine2077 POST 请求时长应该在 10 ~ 35 秒之间,API 请求逻辑:向 Claude web api 发送请求 -> 等待 Claude web 内容生成完成(耗时) -> 返回生成结果
如果出现请求超时,看看 sealos 是否有设置「执行时间」这个选项,将执行时间设置成 60 秒及其以上