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
18.1k stars 4.8k forks source link

TypeError: 'NoneType' object is not iterable #877

Closed zyy543370785 closed 7 months ago

zyy543370785 commented 8 months ago

已API方式运行Qwen-14B-Chat-Int8,以one-api作为中转测试200状态正常,接入fastgpt配置config.json文件内容如下:{ "systemEnv": { "openapiPrefix": "fastgpt", "vectorMaxProcess": 15, "qaMaxProcess": 15, "pgHNSWEfSearch": 100 }, "chatModels": [ .... { "model": "qwen", "name": "qwen", "maxContext": 8000, "maxResponse": 8000, "inputPrice": 0, "outputPrice": 0, "quoteMaxToken": 4000, "maxTemperature": 1.2, "censor": false, "vision": false, "defaultSystemChatPrompt": "" }, ......

创建AI应用对话时会报错core.chat API is error or undefined,而模型api报错 | Traceback (most recent call last): | File "/root/anaconda3/envs/Qwen/lib/python3.10/site-packages/sse_starlette/sse.py", line 270, in wrap | await func() | File "/root/anaconda3/envs/Qwen/lib/python3.10/site-packages/sse_starlette/sse.py", line 251, in stream_response | async for data in self.body_iterator: | File "/opt/FastGPT+ChatGLM3-6b/Qwen/openai_api.py", line 487, in predict | delay_token_num = max([len(x) for x in stop_words]) | TypeError: 'NoneType' object is not iterable +------------------------------------

在本地运行web的qwen一切正常,请问该如何解决问题

c121914yu commented 8 months ago

不清楚,本地web没有什么用,你要么只能测试curl

zyy543370785 commented 8 months ago

有curl过,qwen本地对话没问题,接入fastgpt就报错了TypeError: 'NoneType' object is not iterable

c121914yu commented 8 months ago

没研究过本地模型,oneapi能请求通 fastgpt就可以,2者相同的。

546285455 commented 8 months ago

請問解決了嗎,我跟你一樣的問題

Artificialimbecile commented 8 months ago

我也遇到了同样的问题

Artificialimbecile commented 8 months ago

解决了,不要用Qwen项目中最新版本的openai_api.py,使用旧版本的代码可以运行。

zyy543370785 commented 8 months ago

解决了,不要用Qwen项目中最新版本的openai_api.py,使用旧版本的代码可以运行。

使用的那个版本代码?请教一下

zyy543370785 commented 8 months ago

解决了,不要用Qwen项目中最新版本的openai_api.py,使用旧版本的代码可以运行。

qwen的项目没有版本号呀,如何拉取旧代码

Artificialimbecile commented 8 months ago

打开Qwen项目中的openai_api.py文件,右上角有个History。

GLY-123 commented 8 months ago

打开Qwen项目中的openai_api.py文件,右上角有个History。 使用旧版本的话,流式输出就不行了