Chat2DB Bug:无法使用OPENAI服务

cidc1ykv  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(25)

Chat2DB Version

3.1.19

Describe the bug

2024-03-06 16:08:54.689 INFO 14661 --- [ sd.ai:30003/ ...] .s.w.a.c.a.o.l.OpenAIEventSourceListener.38 : | OpenAI建立sse连接...
2024-03-06 16:08:54.690 INFO 14661 --- [ sd.ai:30003/ ...] .s.w.a.c.a.o.l.OpenAIEventSourceListener.47 : | OpenAI返回数据:{"id": "chatcmpl-9654e8b1-674d-4c1f-8220-867abd4e1834", "choices": [{"delta": {"content": "", "function_call": null, "role": null, "tool_calls": null}, "finish_reason": null, "index": 0, "logprobs": null}], "created": 1709712578, "model": "gpt-3.5-turbo", "object": "chat.completion.chunk", "system_fingerprint": null}
2024-03-06 16:08:56.019 INFO 14661 --- [ sd.ai:30003/ ...] .s.w.a.c.a.o.l.OpenAIEventSourceListener.47 : | OpenAI返回数据:{"id": "chatcmpl-9654e8b1-674d-4c1f-8220-867abd4e1834", "choices": [{"delta": {"content": "\u62b1\u6b49", "function_call": null, "role": null, "tool_calls": null}, "finish_reason": null, "index": 0, "logprobs": null}], "created": 1709712579, "model": "gpt-3.5-turbo", "object": "chat.completion.chunk", "system_fingerprint": null}
2024-03-06 16:08:56.021 ERROR 14661 --- [ sd.ai:30003/ ...] .s.w.a.c.a.o.l.OpenAIEventSourceListener.103 : | OpenAI sse连接异常data:
com.fasterxml.jackson.databind.JsonMappingException: role is marked non-null but is null
at [Source: (String)"{"id": "chatcmpl-9654e8b1-674d-4c1f-8220-867abd4e1834", "choices": [{"delta": {"content": "\u62b1\u6b49", "function_call": null, "role": null, "tool_calls": null}, "finish_reason": null, "index": 0, "logprobs": null}], "created": 1709712579, "model": "gpt-3.5-turbo", "object": "chat.completion.chunk", "system_fingerprint": null}"; line: 1, column: 138] (through reference chain: ai.chat2db.server.web.api.controller.ai.response.ChatCompletionResponse["choices"]->java.util.ArrayList[0]->ai.chat2db.server.web.api.controller.ai.response.ChatChoice["delta"]->com.unfbx.chatgpt.entity.chat.Message["role"])
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:276)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty._throwAsIOE(SettableBeanProperty.java:630)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty._throwAsIOE(SettableBeanProperty.java:618)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:143)
at com.fasterxml.jackson.databind.deser.BeanDeserializer$vanillaDeserializerImplBase$deserializeWithContext
at com.fasterxml.jackson.databind.deser
at com.fasterxml
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:141)
... 25 common frames omitted
2024-03-06 16:08:56.024 INFO 14661 --- [io-10821-exec-6] a.chat2db.server.start.log.EasyLogSink .73 : | http : GET|/api/ai/chat?message=%E4%BD%A0%E5%A5%BD&promptType=NL_2_SQL&dataSourceId=2|1352||text/event-stream:[8]
2024-03-06 16:08:56.025 INFO 14661 --- [io-10821-exec-6] a.c.s.w.a.controller.ai.ChatController .531 : | 2024-03-06T16:08:56.025007717, uid#OPENAIa163cdf6-56a2-48ea-a398-f39946bcd561, on completion

相关问题