chatchan-dist icon indicating copy to clipboard operation
chatchan-dist copied to clipboard

是否增加对CloudFlare AI Gateway的支持?

Open WyInnovate opened this issue 1 year ago • 2 comments

Easy大佬,能否增加对CloudFlare AI Gateway的支持,CloudFlare AI Gateway能实现缓存结果、日志记录、自动统计token消耗 官方文档如下:https://developers.cloudflare.com/ai-gateway/

WyInnovate avatar Nov 22 '23 09:11 WyInnovate

按官方文档说明,你只需要把 baseURL 设置为 "https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/openai" 应该就能用了吧?

easychen avatar Nov 24 '23 05:11 easychen

按官方文档说明,你只需要把 baseURL 设置为 "gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/openai" 应该就能用了吧?

我的baseURL是:https://gateway.ai.cloudflare.com/v1/XXX/XXX/openai

chanchen中发送消息获得的错误提示

错误:[404]:Error: [404]: { "error": { "message": "Invalid URL (POST /v1/v1/chat/completions)", "type": "invalid_request_error", "param": null, "code": null } }

AI Gateway实时日志

chanchen error

Endpoint
v1/chat/completions

另一个正确的

Endpoint
chat/completions

WyInnovate avatar Nov 25 '23 00:11 WyInnovate