Langchain-Chatchat
Langchain-Chatchat copied to clipboard
连续问问题会导致崩溃
看上去不是爆内存的问题,连续问问题后,会出现如下报错
╭─────────────────────────────── 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
请问是提问中包含退格了吗
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 https://github.com/imClumsyPanda/langchain-ChatGLM/issues/79, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLH5EVR32NGIQN4TSVR7NLXA75V3ANCNFSM6AAAAAAW5C3RXM . You are receiving this because you are subscribed to this thread.Message ID: @.***>
请问是提问中包含退格了吗 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 吗?能修复吗?
目前在 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 https://github.com/imClumsyPanda/langchain-ChatGLM/issues/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 https://github.com/imClumsyPanda/langchain-ChatGLM/issues/79#issuecomment-1507807921, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLH5EWWPHAFKZ2RBNZUOQTXBCSVLANCNFSM6AAAAAAW5C3RXM . You are receiving this because you commented.Message ID: @.***>
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: @.>