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

ValueError: Caught exception: An output parsing error occurred #5019

Open
xiaoqi7s opened this issue Oct 20, 2024 · 0 comments
Open

ValueError: Caught exception: An output parsing error occurred #5019

xiaoqi7s opened this issue Oct 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@xiaoqi7s
Copy link

xiaoqi7s commented Oct 20, 2024

问题描述 / Problem Description

2024-10-20 21:15:31.980 | ERROR | chatchat.server.utils:wrap_done:46 - ValueError: Caught exception: An output parsing error occurred. In order to pass this error back to the agent and have it try again, pass handle_parsing_errors=True to the AgentExecutor. This is the error: Could not parse LLM output: 我很高兴地看到pt 工程技术的兴趣!在本书中,我们将探讨可用于 ChatGPT 的各种 Prompt 工程技术,包括指令提示技术。

问几句或者复杂的问题之后,或者带上agent进行聊天时都有这个报错,请问这个是需要做什么呢?需要自定义output吗?xxx (后面还有一些回答的问题),其实内容已经回答了,但是会有上面的报错。

demo 代码 为文档中提供代码。

base_url = "http://127.0.0.1:7861/chat"
data = {
"messages": [
{"role": "user", "content": "如何提问以获得高质量答案"},
],
"tool_choice": "search_local_knowledgebase",
"handle_parsing_errors": True,
"stream": True,
}

import requests

response = requests.post(f"{base_url}/chat/completions", json=data, stream=True)
for line in response.iter_content(None, decode_unicode=True):
print(line)

目前模型采用ollama的llama3.1 + mxbai-embed-large

@xiaoqi7s xiaoqi7s added the bug Something isn't working label Oct 20, 2024
@xiaoqi7s xiaoqi7s changed the title [BUG] 简洁阐述问题 / Concise description of the issue ValueError: Caught exception: An output parsing error occurred Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant