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

无法获取http模块中的响应字段 #1307

Closed
6 of 7 tasks
mwnu opened this issue Apr 27, 2024 · 4 comments
Closed
6 of 7 tasks

无法获取http模块中的响应字段 #1307

mwnu opened this issue Apr 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@mwnu
Copy link

mwnu commented Apr 27, 2024

例行检查

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

你的版本

  • 公有云版本
  • 私有部署版本, 具体版本号: V4.8-preview2

问题描述

例如,我问一个问题:-ty 最近AI有什么大事件,其中-ty 是我自定义的一个指令,该字符串经过http外部脚本的处理,去除指令保留用户的提示,响应的json是:

{
  "message": "最近AI有什么大事件"
}

然后我希望在AI模块中用户问题经过处理的字段: 最近AI有什么大事件 而不是用户输入原始文本:-ty 最近AI有什么大事件,因此,在http模块中添加自定义输出"message",格式为字符串,它应该能够提取到响应体中的message的值,但我在后续模块引用,无论是手动选的模式还是用{{message}},获取的都是用户原始输入,而非处理后的字符串。

复现步骤

预期结果

相关截图
image
image
image

其他例子
image

@mwnu mwnu added the bug Something isn't working label Apr 27, 2024
@mwnu
Copy link
Author

mwnu commented Apr 27, 2024

我知道了,后面的节点要使用前面的变量作为参数需要改类型为引用内容。

@mwnu mwnu closed this as completed Apr 27, 2024
@rodchen-king
Copy link

能分享一下高级编排配置嘛,想做一个 ai可以根据内容分析是否查询接口 以及 ai能力处理结果的。但是没有成功

@mwnu
Copy link
Author

mwnu commented May 9, 2024

能分享一下高级编排配置嘛,想做一个 ai可以根据内容分析是否查询接口 以及 ai能力处理结果的。但是没有成功

看我在另一个issues中的回复:#1388 (comment)

@Zhenyi-Wang
Copy link

4.8.2升级多了个代码模块,可以直接用js处理字符串,应该不需要专门搞个http接口了。建议可以试试

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