disingn / sunotoapi

将 sunoAi web转成 openai 格式进行调用
187 stars 33 forks source link

chat格式测试使用问题请教 #4

Closed sfvsfv closed 5 months ago

sfvsfv commented 5 months ago

配置参数应该没问题:

image

我反向代理到域名,然后到chatbox测试,前端重复生成了三次内容,以及部分空:

image

最终返回结果如下:

image

请问是否chat格式缺少了什么配置还是其他问题呢?

sfvsfv commented 5 months ago

官方的语法格式为: curl https://api.openai.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair." }, { "role": "user", "content": "Compose a poem that explains the concept of recursion in programming." } ] }'

不知是否我使用错误导致。

disingn commented 5 months ago

官方的语法格式为:

`curl https://api.openai.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENAI_API_KEY" -d '{

"model": "gpt-3.5-turbo",

"messages": [

  {

    "role": "system",

    "content": "You are a poetic assistant, skilled in explaining complex programming concepts with creative flair."

  },

  {

    "role": "user",

    "content": "Compose a poem that explains the concept of recursion in programming."

  }

]

}'

`

不知是否我使用错误导致。

nginx反代超时时间设置3分钟以上