xusenlinzy / api-for-open-llm

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.36k stars 270 forks source link

执行streamlit_app.py报错 #310

Closed louan1998 closed 2 months ago

louan1998 commented 2 months ago

提交前必须检查以下项目 | The following items must be checked before submission

问题类型 | Type of problem

None

操作系统 | Operating system

Linux

详细描述问题 | Detailed description of the problem

streamlit run streamlit_app.py

Dependencies

# 请在此处粘贴依赖情况
# Please paste the dependencies here

运行日志或截图 | Runtime logs or screenshots

File "/data/WCY/anaconda3/envs/api/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/data/WCY/anaconda3/envs/api/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 590, in code_to_exec exec(code, module.dict) File "/data/WCY/api-for-open-llm-master/streamlit-demo/streamlit_app.py", line 83, in main() File "/data/WCY/api-for-open-llm-master/streamlit-demo/streamlit_app.py", line 10, in main from streamlit_gallery.components import chat, doc_chat File "/data/WCY/api-for-open-llm-master/streamlit-demo/streamlit_gallery/components/init.py", line 2, in from .doc_chat.streamlit_app import main as doc_chat File "/data/WCY/api-for-open-llm-master/streamlit-demo/streamlit_gallery/components/doc_chat/streamlit_app.py", line 9, in from .utils import DocServer, DOCQA_PROMPT File "/data/WCY/api-for-open-llm-master/streamlit-demo/streamlit_gallery/components/doc_chat/utils.py", line 18, in os.environ["CO_API_URL"] = EMBEDDING_API_BASE


File "<frozen os>", line 684, in __setitem__
File "<frozen os>", line 758, in encode