You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KeyError: 'choices'
Traceback:
File "/root/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
result = func()
File "/root/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
exec(code, module.dict)
File "/root/OculiChatDA/web_demo.py", line 380, in
main()
File "/root/OculiChatDA/web_demo.py", line 334, in main
for agent_return in st.session_state['chatbot'].stream_chat(
File "/root/OculiChatDA/utils/internlm2_agent.py", line 305, in stream_chat
for model_state, res, _ in self._llm.stream_chat(prompt, **kwargs):
File "/root/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/lagent/llms/lmdepoly_wrapper.py", line 422, in stream_chat
resp += text['choices'][0]['text']
The text was updated successfully, but these errors were encountered:
部署方式按照文档部署,运行通过Python app.py执行,在发送消息时出现以下错误。
KeyError: 'choices'
Traceback:
File "/root/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
result = func()
File "/root/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
exec(code, module.dict)
File "/root/OculiChatDA/web_demo.py", line 380, in
main()
File "/root/OculiChatDA/web_demo.py", line 334, in main
for agent_return in st.session_state['chatbot'].stream_chat(
File "/root/OculiChatDA/utils/internlm2_agent.py", line 305, in stream_chat
for model_state, res, _ in self._llm.stream_chat(prompt, **kwargs):
File "/root/miniconda3/envs/OculiChatDA/lib/python3.10/site-packages/lagent/llms/lmdepoly_wrapper.py", line 422, in stream_chat
resp += text['choices'][0]['text']
The text was updated successfully, but these errors were encountered: