labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.5k stars 4.7k forks source link

QueryExtension 拼接历史记录的逻辑不正确 #1142

Closed zhanghx0905 closed 6 months ago

zhanghx0905 commented 6 months ago

例行检查

你的版本

问题描述

在 QueryExtension 中,拼接历史记录的逻辑不正确:

https://github.com/labring/FastGPT/blob/5cfa43287f16b441f24ae5435e374fdf92c52153/packages/service/core/ai/functions/queryExtension.ts#L120

item.value 是一个对象,最后模型得到的提示词中历史记录变成了\nQ: [object Object]\nA: [object Object]\n。 因为此问题,模型无法依据历史记录进行查询重写。

c121914yu commented 6 months ago

噢!麻烦可以提个PR?我发布个修复版本,这个应该4.7也有问题了

c121914yu commented 6 months ago

https://github.com/labring/FastGPT/pull/1012 参考这个PR

c121914yu commented 6 months ago

我先直接在线修复了