FastGPT icon indicating copy to clipboard operation
FastGPT copied to clipboard

Hope that advanced orchestration can add JSON format conversion module

Open dadastory opened this issue 2 years ago • 2 comments

例行检查

  • [x ] 我已确认目前没有类似 features
  • [x ] 我已确认我已升级到最新版本
  • [x ] 我已完整查看过项目 README,已确定现有版本无法满足需求
  • [x ] 我理解并愿意跟进此 features,协助测试和提供反馈
  • [x] 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 features 可能会被无视或直接关闭

功能描述

  1. 目前文本加工模块仅支持字符串加工,但不支持json格式内容进行加工,导致难以使用http模块和知识库模块
  2. 希望可以增加对数组JSON和对象JSON的格式转换模块,可以采用对应模板表达式的方式输出出来 应用场景
  3. 有了JSON模块后,可以极大方便的对HTTP模块内容进行处理转换,以及可以直接输出知识库某段文本而不是经过chatGPT,可以实现类似于快速搜索的功能
  4. 可以方便对知识库输出的“引用内容”的数组格式的JSON进行处理 image

相关示例 现有文本加工模块不足的地方: image

dadastory avatar Jan 11 '24 12:01 dadastory

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Routine inspection

  • [x ] I have confirmed that there are currently no similar features
  • [x ] I have confirmed that I have upgraded to the latest version
  • [x ] I have fully reviewed the project README and determined that the existing version cannot meet the needs.
  • [x ] I understand and am willing to follow up on this feature, assist with testing and provide feedback
  • [x] I understand and agree with the above content, and understand that project maintainers have limited energy. Features that do not follow the rules may be ignored or closed directly

Function description

  1. Currently, the text processing module only supports string processing, but does not support processing of json format content, making it difficult to use the http module and knowledge base module.
  2. It is hoped that a format conversion module for array JSON and object JSON can be added, which can be output in the form of corresponding template expressions. Application Scenario
  3. With the JSON module, the content of the HTTP module can be processed and converted very conveniently, and a certain text in the knowledge base can be output directly instead of going through chatGPT, which can achieve functions similar to quick search.
  4. It is convenient to process the JSON in array format of the "reference content" output by the knowledge base. image

Related Examples The shortcomings of existing text processing modules: image

c121914yu avatar Jan 11 '24 12:01 c121914yu

  1. HTTP输出可以通过 a.b[0].c 进行json操作。
  2. 文本加工对复杂数据的交互有待设计

c121914yu avatar Jan 17 '24 02:01 c121914yu

直接提供一个通过JavaScript或groovy脚本处理数据的模块好了,至少能把对象输出成json字符串组织成引用内容。

qy8502 avatar Jan 30 '24 07:01 qy8502

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It would be better to directly provide a module that processes data through JavaScript or groovy scripts. At least it can output the object into a json string and organize it into reference content.

c121914yu avatar Jan 30 '24 07:01 c121914yu

新版http已经优化了json格式,与apifox相同,基本已经解决了90%的类型问题。

c121914yu avatar Feb 27 '24 13:02 c121914yu

已经收到。

dadastory avatar Feb 27 '24 13:02 dadastory