Openai style api for open large language models, using LLMs just as chatgpt! Support for LLaMA, LLaMA-2, BLOOM, Falcon, Baichuan, Qwen, Xverse, SqlCoder, CodeLLaMA, ChatGLM, ChatGLM2, ChatGLM3 etc. 开源大模型的统一后端接口
Apache License 2.0
2.16k
stars
252
forks
source link
TypeError: 'NoneType' object is not subscriptable #243
提交前必须检查以下项目 | The following items must be checked before submission
[X] 请确保使用的是仓库最新代码(git pull),一些问题已被解决和修复。 | Make sure you are using the latest code from the repository (git pull), some issues have already been addressed and fixed.
[X] 我已阅读项目文档和FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案 | I have searched the existing issues / discussions
问题类型 | Type of problem
其他问题 | Other issues
操作系统 | Operating system
Linux
详细描述问题 | Detailed description of the problem
在streamlit前端输入太多的内容报错
TypeError: 'NoneType' object is not subscriptable
Traceback:
File "/data/Qwen/qwen14/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
exec(code, module.__dict__)
File "/data/Qwen/api-for-open-llm/streamlit-demo/streamlit_app.py", line 63, in <module>
main()
File "/data/Qwen/api-for-open-llm/streamlit-demo/streamlit_app.py", line 58, in main
page.show()
File "/data/Qwen/api-for-open-llm/streamlit-demo/streamlit_gallery/utils/page.py", line 50, in show
self._selected()
File "/data/Qwen/api-for-open-llm/streamlit-demo/streamlit_gallery/components/chat/streamlit_app.py", line 43, in main
full_response += response.choices[0].delta.content or ""
这个是为什么,并且即使第一次不报错,在次输入同样内容时也会报上述错误
提交前必须检查以下项目 | The following items must be checked before submission
问题类型 | Type of problem
其他问题 | Other issues
操作系统 | Operating system
Linux
详细描述问题 | Detailed description of the problem
Dependencies
运行日志或截图 | Runtime logs or screenshots