Closed conql closed 1 month ago
自定义请求头一般是不会影响的,目测可能是app:// scheme的问题
自定义请求头一般是不会影响的,目测可能是app:// scheme的问题
又测试了一下,好像不是
复现代码:
await fetch("https://api.chatnio.net/v1/models",{
method:"GET",
headers:{
}
}).then(t=>t.json()).then(t=>console.log("No header",t))
await fetch("https://api.chatnio.net/v1/models",{
method:"GET",
headers:{
"X-Stainless-Lang":"js"
}
}).then(t=>t.json()).then(t=>console.log("Has header",t))
这是你的app的问题吧
在 https://chatnio.net 上跑也一样
浏览器?
是的
OK 复现到了 等我处理完 #77 来处理
商业版和chatnio官网已经修复,功能将由 @Sh1n3zZ 下放开源版。
使用OpenAI Node API库请求时会导致CORS错误。![image](https://github.com/Deeptrain-Community/chatnio/assets/49243542/bb22de0a-a71b-4aa2-909c-c096b7ce4ac1)
X-Stainless-.......的请求头是由OpenAI的官方库引入的![image](https://github.com/Deeptrain-Community/chatnio/assets/49243542/4b2ce74a-8480-41f1-b31d-8475475c51f4)