-
Notifications
You must be signed in to change notification settings - Fork 1.2k
函数式实现样例流式输出优化 #435
Comments
具体报错原因:报错的字符串:"{"xxx:xxx,xxx:xxx"}",Unexpected character ('}' (code 125)): was expecting a colon to separate field name and value |
OpenAiApiFunctionsWithStreamExample 这个就是案例 @18758976569 |
你好,感谢你的及时响应,我参照了OpenAiApiFunctionsWithStreamExample去写,但是会报错,我给您贴我的代码 |
package com.skg.util; import com.fasterxml.jackson.core.json.JsonReadFeature; import java.net.InetSocketAddress; import static com.theokanning.openai.service.OpenAiService.*; public class OpenAiUtil {
} |
@18758976569 我看了下感觉像是sdk有bug,这样的写法openai返回的函数入参是{"unit:celsius,location:xiamen"},理论上应该是{"unit":"celsius","location":"xiamen"},我今天没时间处理这个,要不你先改成示例那种写法,这个我at下这个开发者看下他能不能修复 |
@TheoKanning sorry to disturb you. I think it's a bug. When the chat function was defiened with "addProperty" method, the arguments that openai response was: {"unit:celsius,location:xiamen"}. It should be {"unit":"celsius","location":"xiamen"}. So the json parse met error. Hope someone can fix it. |
好的谢谢,我看到之前有人提过修复这个错误的分支,但是好像没有合上去还是什么原因没得到处理 |
你好,在看完这个项目之后,我自己去尝试了写一些案例,其中,流式输出的案例只有自定义object的方法,能否提供OpenAiApiDynamicFunctionExample的流式输出案例呢,我自己尝试去写发现一直报错,错误原因是json序列化的问题,数据格式为"{"xxx:xxx,xxx:xxx"}",会报 "}" 125的问题,我被这个问题困扰了很久,希望你可以帮我解决这个问题
The text was updated successfully, but these errors were encountered: