openai4j icon indicating copy to clipboard operation
openai4j copied to clipboard

json deserialize problem

Open codexvn opened this issue 1 year ago • 2 comments

Cannot deserialize value of type java.lang.String from Array value (token JsonToken.START_ARRAY) at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: xxx

dev.ai4j.openai4j.chat.ChatCompletionRequest$Builder["messages"]->java.util.ArrayList[0]->dev.ai4j.openai4j.chat.UserMessage$Builder["content"])

Does json deserialization not currently supported?

codexvn avatar Sep 24 '24 13:09 codexvn

@codexvn I am not sure if deserialization of UserMessage is supported. Why do you _de_serialize it?

langchain4j avatar Sep 24 '24 19:09 langchain4j

@langchain4j I want to store the context of a session as a memory, but currently I cannot serialize and deserialize the object directly

codexvn avatar Sep 25 '24 06:09 codexvn