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

文本内容提取无法正确解析结果 #1532

Closed
1 task
chenlei0913 opened this issue May 19, 2024 · 5 comments
Closed
1 task

文本内容提取无法正确解析结果 #1532

chenlei0913 opened this issue May 19, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@chenlei0913
Copy link

例行检查

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

你的版本
4.8

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

问题描述, 日志截图
问题截图:
问题
答复截图:
答案
日志位置:
加日志位置

复现步骤

预期结果
从返回结果中获取到真正的json并解析出提取的内容。

相关截图

@chenlei0913 chenlei0913 added the bug Something isn't working label May 19, 2024
@c121914yu
Copy link
Collaborator

返回值不正确呢

@chenlei0913
Copy link
Author

返回值不正确呢

AI返回内容只能是 JSON 字符串,不能带这种巴拉巴拉解释一大堆的这种回复,并且不能是 Markdown 形式的,是吗?

@c121914yu
Copy link
Collaborator

返回值不正确呢

AI返回内容只能是 JSON 字符串,不能带这种巴拉巴拉解释一大堆的这种回复,并且不能是 Markdown 形式的,是吗?

印象中,是有一点兼容处理的,会截取括号之间的内容,待会去看看。

@nongmo677
Copy link
Contributor

你的日志里面都明显看到 function=> undefined 了,你这个模型不支持functionCall 或者toolChoice,没有返回指定的结果

但是你的模型给你返回了带有json格式的结果,你应该用提示词模式尝试提取,配置提示词模式的文本提取具体请参照官方config.json配置参数

提示词模式文本提取代码如下:

@chenlei0913
Copy link
Author

你的日志里面都明显看到 function=> undefined 了,你这个模型不支持functionCall 或者toolChoice,没有返回指定的结果

但是你的模型给你返回了带有json格式的结果,你应该用提示词模式尝试提取,配置提示词模式的文本提取具体请参照官方config.json配置参数

提示词模式文本提取代码如下:

测试有效,已改为提示词模式,非常感谢解答问题

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

3 participants