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://fastgpt.in
Other
15.58k stars 4.09k forks source link

调用post方法body中获取的json格式总是报错无效 #1941

Closed sdytzjp closed 1 week ago

sdytzjp commented 1 week ago

如下图,AI可以正常生成Json格式的内容,然后调给http请求中的Body处理,但是总是提示无效的json格式。 如果直接将json写入到body中就没有问题。 image image image

sdytzjp commented 1 week ago

我用AI把代码块json 和,这些字符去掉,也在报错,提示无效的json格式,提示json里面有很多类似\n之类的信息

c121914yu commented 1 week ago
sdytzjp commented 1 week ago

我怀疑是这个http的模块中,body本身的代码转换处理和验证机制有问题。 如果我在body中直接写json就ok,而且可以成功调用接口。 但是如果通过其他模块把json输入到http的body中,就提示json body语法错误,而且也并不调用接口。

这是一个bug吧?应该怎么解决

sdytzjp commented 1 week ago

mmexport1720101095805

lijiajun1997 commented 1 week ago

有同样的问题