FastGPT icon indicating copy to clipboard operation
FastGPT copied to clipboard

上传文件并对话,系统可以正常解析文件内容,但LLM识别不到文件的存在

Open Lanny2020 opened this issue 11 months ago • 9 comments

例行检查

  • [ ] 我已确认目前没有类似 issue
  • [ ] 我已完整查看过项目 README,以及项目文档
  • [ ] 我使用了自己的 key,并确认我的 key 是可正常使用的
  • [ ] 我理解并愿意跟进此 issue,协助测试和提供反馈
  • [x] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

你的版本

  • [ ] 公有云版本
  • [x] 私有部署版本, 具体版本号: v4.8.21

问题描述, 日志截图,配置文件等

LLM配置:DeepSeek-R1 14b,Ollma

情况1:创建任意一个“简单应用”,上传一个《测试报告.txt》文件,并和这个文件对话,但DS似乎不能觉察到这个文件的存在,但是在“查看详情 >> AI对话”里面可以看到完整的文件内容。该文件11,738字数,未超出模型配置的最大上下文。

情况2:但如果创建一个很简单的txt文件(随便4行字),就可以正常识别

复现步骤

创建任意一个“简单应用”,上传一个测试报告文件,并和这个文件对话。

预期结果

LLM可以识别这个文件的内容,并开始对话。

相关截图

Image Image Image Image Image

Lanny2020 avatar Feb 15 '25 13:02 Lanny2020

看起来是模型接口有问题?是不是不支持 system,或者模型无法理解 system

c121914yu avatar Feb 17 '25 13:02 c121914yu

但是短的文件,是正常的

Lanny2020 avatar Feb 17 '25 14:02 Lanny2020

但是短的文件,是正常的,

那就更是模型问题了😂长文本理解不了

c121914yu avatar Feb 17 '25 15:02 c121914yu

不知道是模型自身的问题,还是Ollama的API接口层的问题,有谁碰到过吗

Lanny2020 avatar Feb 17 '25 15:02 Lanny2020

ollama模型默认上下文2048导致的

goactiongo avatar Feb 20 '25 00:02 goactiongo

更改ctx_num参数

goactiongo avatar Feb 20 '25 00:02 goactiongo

请问解决了吗

yubo1993 avatar Mar 06 '25 09:03 yubo1993

@goactiongo 请教下 如何修改 ctx 参数

Lanny2020 avatar Mar 06 '25 16:03 Lanny2020

非open标准接口,http直接调ollama时传参num-ctx

---原始邮件--- 发件人: @.> 发送时间: 2025年3月7日(周五) 凌晨0:15 收件人: @.>; 抄送: @.@.>; 主题: Re: [labring/FastGPT] 上传文件并对话,系统可以正常解析文件内容,但LLM识别不到文件的存在 (Issue #3800)

@goactiongo 请教下 如何修改 ctx 参数

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***> Lanny2020 left a comment (labring/FastGPT#3800)

@goactiongo 请教下 如何修改 ctx 参数

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

goactiongo avatar Mar 07 '25 12:03 goactiongo

This issue has not been updated for more than 6 months and is marked as stale. If there is no further activity within 7 days, it will be automatically closed. Please reply to this issue if you need to continue following up on it.

github-actions[bot] avatar Jan 12 '26 04:01 github-actions[bot]