Comments (2)
The errors you're encountering, "Bad message format Tried to use SessionInfo before it was initialized" and WebSocketClosedError
, suggest issues with session state management and WebSocket connections, respectively.
For the "Bad message format" error, it's crucial to ensure all session state variables in your Streamlit app are initialized before they're accessed. This can be done by checking if a session state variable exists and setting a default value if it doesn't:
if 'selected_kb_name' not in st.session_state:
st.session_state['selected_kb_name'] = None # or a default value
if 'selected_kb_info' not in st.session_state:
st.session_state['selected_kb_info'] = ""
Make sure to update these session state variables appropriately based on user interactions or other events in your application.
Regarding the WebSocketClosedError
, this error occurs when there's an attempt to send or receive data over a WebSocket connection that has been closed. This could be due to network issues, client disconnects, or server-side problems. Since the error is related to WebSocket connections, which are managed by your server framework (like Uvicorn with FastAPI), you might not have direct control over this unless you're explicitly handling WebSocket connections in your code. If your application does use WebSockets, ensure you have proper error handling for closed connections.
If these errors persist, adding detailed logging around session state updates and WebSocket communication can help identify the exact points of failure.
Details
Sources
- 无法使用知识库问答和知识库测试,报error
- [BUG] 上传知识库文件报错
- webui_pages/knowledge_base/knowledge_base.py
- server/api.py
- server/chat/file_chat.py
- knowledge_base/samples/content/test_files/langchain-ChatGLM_closed.jsonl
- configs/basic_config.py.example
- knowledge_base/samples/content/test_files/langchain-ChatGLM_open.jsonl
- webui_pages/dialogue/dialogue.py
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
from langchain-chatchat.
这个问题已经被标记为 stale
,因为它已经超过 30 天没有任何活动。
from langchain-chatchat.
Related Issues (20)
- [BUG] 不能进行图文对话 HOT 7
- [BUG] 数据库文件无法打开 / unable to open database file HOT 3
- 0.3.1版本怎么配置大模型?没有找到相关文档 HOT 4
- [BUG] 无法加载EPUB和MSG文件到知识库
- 请问想调用讯飞星火的api怎么配置,如果调用openai形式的url,还用xinference啥的吗,小白刚看不太懂 HOT 5
- xinferrence是只能在linux上吗,我windows上安装,好像要求一个pynini,这个包只能linux HOT 1
- 请问如何在0.3.1版本中连接上mysql数据库,完成数据库问答,求详细步骤,小白求学 HOT 5
- [BUG] 简洁阐述问题 / Concise description of the issue HOT 1
- 在向知识库中上传文件时遇到了500 internal server error
- [BUG] 简洁阐述问题 / 向量库 samples 加载失败 HOT 2
- [BUG] 为什么修改了webui.py中的代码,前端界面没有做更改 HOT 2
- docker环境部署下如何生成和修改配置文件? HOT 1
- [BUG] docker镜像包缺少psycopg2,pgvector
- 请问embedding模型也经过xinference 吗?另外直接调用星火的llm的openai形式的api,请问怎么配置?好像教程写的不是很清楚。 HOT 4
- 430个文档,解析以后知识库回答特别慢 HOT 1
- [BUG] 简洁阐述问题 / Concise description of the issue HOT 1
- [FEATURE] 文件对话持久化管理优化 HOT 1
- 请问怎么将Langchain-chatchat作为一个服务嵌入到第三方的网页中作为服务?可以提供下思路吗谢谢! HOT 2
- xinference已经启动本地模型,langchain-chatchat中的config也已经配置了模型名,为什么还是无法使用指定的模型?哪位佬能解答一下? HOT 2
- 我刚接触项目,看了两遍也没看懂model_setting.yaml,我是embedding模型想用本地的,llm想调用讯飞星火的url(openai格式),请问怎么配置?(我用xinference运行了bge-m3,星火的url配置在哪里) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langchain-chatchat.