Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

连续问问题会导致崩溃 #79

Closed
Yamol opened this issue Apr 13, 2023 · 4 comments
Closed

连续问问题会导致崩溃 #79

Yamol opened this issue Apr 13, 2023 · 4 comments

Comments

@Yamol
Copy link

Yamol commented Apr 13, 2023

看上去不是爆内存的问题,连续问问题后,会出现如下报错

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/devops/git/langchain-ChatGLM/knowledge_based_chatglm.py:118 in <module>                    │
│                                                                                                  │
│   115 │   │   vector_store = init_knowledge_vector_store(filepath)                               │
│   116 │   history = []                                                                           │
│   117 │   while True:                                                                            │
│ ❱ 118 │   │   query = input("Input your question 请输入问题:")                                  │
│   119 │   │   resp, history = get_knowledge_based_answer(query=query,                            │
│   120 │   │   │   │   │   │   │   │   │   │   │   │      vector_store=vector_store,              │
│   121 │   │   │   │   │   │   │   │   │   │   │   │      chat_history=history)                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 21: invalid continuation byte
@imClumsyPanda
Copy link
Collaborator

imClumsyPanda commented Apr 13, 2023 via email

@Yamol
Copy link
Author

Yamol commented Apr 14, 2023

请问是提问中包含退格了吗 Yingxiang @.>于2023年4月13日 周四21:30写道:

看上去不是爆内存的问题,连续问问题后,会出现如下报错 ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /home/devops/git/langchain-ChatGLM/knowledge_based_chatglm.py:118 in │ │ │ │ 115 │ │ vector_store = init_knowledge_vector_store(filepath) │ │ 116 │ history = [] │ │ 117 │ while True: │ │ ❱ 118 │ │ query = input("Input your question 请输入问题:") │ │ 119 │ │ resp, history = get_knowledge_based_answer(query=query, │ │ 120 │ │ │ │ │ │ │ │ │ │ │ │ vector_store=vector_store, │ │ 121 │ │ │ │ │ │ │ │ │ │ │ │ chat_history=history) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 21: invalid continuation byte — Reply to this email directly, view it on GitHub <#79>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLH5EVR32NGIQN4TSVR7NLXA75V3ANCNFSM6AAAAAAW5C3RXM . You are receiving this because you are subscribed to this thread.Message ID: @.
>

我翻了一下所有的 issue,确实是在输入问题时,写错了,然后退格键删除了再问。
这是个 bug 吗?能修复吗?

@imClumsyPanda
Copy link
Collaborator

imClumsyPanda commented Apr 14, 2023 via email

@cifangyiquan
Copy link

Ubuntu 18.04 这个方法work

目前在 macos 和 windows 环境下使用import readline的方式可以解决,ubuntu 暂未找到解决方式 Yingxiang @.>于2023年4月14日 周五09:35写道:

请问是提问中包含退格了吗 Yingxiang @. >于2023年4月13日 周四21:30写道: … <#m_-2893042901420782564_> 看上去不是爆内存的问题,连续问问题后,会出现如下报错 ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /home/devops/git/langchain-ChatGLM/knowledge_based_chatglm.py:118 in │ │ │ │ 115 │ │ vector_store = init_knowledge_vector_store(filepath) │ │ 116 │ history = [] │ │ 117 │ while True: │ │ ❱ 118 │ │ query = input("Input your question 请输入问题:") │ │ 119 │ │ resp, history = get_knowledge_based_answer(query=query, │ │ 120 │ │ │ │ │ │ │ │ │ │ │ │ vector_store=vector_store, │ │ 121 │ │ │ │ │ │ │ │ │ │ │ │ chat_history=history) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 21: invalid continuation byte — Reply to this email directly, view it on GitHub <#79 <#79>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLH5EVR32NGIQN4TSVR7NLXA75V3ANCNFSM6AAAAAAW5C3RXM https://github.com/notifications/unsubscribe-auth/ABLH5EVR32NGIQN4TSVR7NLXA75V3ANCNFSM6AAAAAAW5C3RXM . You are receiving this because you are subscribed to this thread.Message ID: @.> 我翻了一下所有的 issue,确实是在输入问题时,写错了,然后退格键删除了再问。 这是个 bug 吗?能修复吗? — Reply to this email directly, view it on GitHub <#79 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLH5EWWPHAFKZ2RBNZUOQTXBCSVLANCNFSM6AAAAAAW5C3RXM . You are receiving this because you commented.Message ID: @.
>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants