Langchain-Chatchat [BUG] agent报错 ERROR | chatchat.server.utils:wrap_done:46 - ValidationError: 捕获到异常:1个验证错误

s3fp2yjn  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(40)

问题描述 / Problem Description

只要我一使用agent,就会报错
ERROR | chatchat.server.utils:wrap_done:46 - ValidationError: Caught exception: 1 validation error for weather_checkSchema
city
str type expected (type=type_error.str)

复现问题的步骤 / Steps to Reproduce

  1. 执行 【多功能对话】
  2. 点击 【启用Agent】
  3. 选择工具【天气查询/互联网搜索/等等】
  4. 在聊天框输入【广州天气】【或一些别的问题】,点击【发送】
  5. 问题出现 / Problem occurs

预期的结果 / Expected Result

正确调用agent并给出回复

实际结果 / Actual Result

描述实际发生的结果 / Describe the actual result.

环境信息 / Environment Information

  • Langchain-Chatchat 版本 / commit 号:0.3.1.3
  • 部署方式(pypi 安装 / 源码部署 / docker 部署):pypi 安装
  • 使用的模型推理框架(Xinference / Ollama / OpenAI API 等):Xinference
  • 使用的 LLM 模型(GLM-4-9B / Qwen2-7B-Instruct 等):GLM-4-9B
  • 使用的 Embedding 模型(bge-large-zh-v1.5 / m3e-base 等):bge-large-zh-v1.5
  • 使用的向量库类型 (faiss / milvus / pg_vector 等): faiss
  • 操作系统及版本 / Operating system and version: Windows
  • Python 版本 / Python version: 3.11
  • 推理使用的硬件(GPU / CPU / MPS / NPU 等) / Inference hardware (GPU / CPU / MPS / NPU, etc.): GPU
  • 其他相关环境信息 / Other relevant environment information:
abithluo

abithluo1#

我也遇到这样的问题。GLM系列和自定义模型会出现这个问题。qwen2-instruct-0.5B没问题

相关问题