labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.5k stars 4.7k forks source link

sse error: core.chat.Chat API is error or undefined #847

Closed zhoulvjun closed 8 months ago

zhoulvjun commented 8 months ago

例行检查

你的版本

问题描述 使用最新版本4.6.8的FastGPT,在ChatNextWeb中直接设置部署的api地址和key,可以正常使用;但如果是在one-api中建立FastGPT的渠道/自定义渠道,则会在FastGPT端报以下错误:

[ERROR] 2024-02-13 13:57:59 sse error: core.chat.Chat API is error or undefined { message: 'core.chat.Chat API is error or undefined', stack: undefined } 复现步骤 以前在issues中也见过类似情况,感觉这次又出现了。以前的回复是:

已修复,由于 openai sdk4.x 与 oneapi 的 headers 没有完全相同。 https://github.com/labring/FastGPT/pull/421 Originally posted by @c121914yu in https://github.com/labring/FastGPT/issues/397#issuecomment-1774548346 预期结果 能够在one-api中正常调用 相关截图

c121914yu commented 8 months ago

image image image

我这边是正常的。

zhoulvjun commented 8 months ago

谢谢您的回复!我发现是所用的ChatNextWeb版本有问题(还不清楚具体问题出在哪,但换其它版本可以正常调用One-API中的FastGPT),并不是FastGPT或One-API的问题。被ChatNextWeb能直接用FastGPT的api误导了,以为它也能正常调用One-API中的FastGPT。

c121914yu commented 8 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


thank you for your reply! I found that there was a problem with the ChatNextWeb version I was using (it’s not clear where the problem lies, but FastGPT in One-API can be called normally with other versions), and it was not a problem with FastGPT or One-API. I was misled by ChatNextWeb's API that can directly use FastGPT, thinking that it can also call FastGPT in One-API normally.