You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 6, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 6, 2024. It is now read-only.
I noticed that the arguments property in com.theokanning.openai.completion.chat.ChatFunctionCall class, which is supposed to be a serialized JSON string, is being represented as a JsonNode in the code. I would like to understand why JsonNode is chosen over directly using the String type. Since TextNode also stores a string, I'm not quite sure why String type wasn't used directly. What are the advantages of using JsonNode? I apologize for not considering its benefits earlier.
Is there any news on this issue?
I also ran into it when trying to stream function calls and accumulating the JsonNodes of the individual chunks that hold the args, by getting their textValue() (or asText() etc., I tried all) and concatenating them.
For example where I would expect the concatenated result to be
{"id":1,"name": "foo", "desc": "something"}
I would get
{"id":1,"name:foo,desc:something"}
Note that the quoting of the first parameter seems to be OK. This however at first glance makes the quoting or lack thereof totally unpredicatable and thus hard to work around.
I noticed that the arguments property in com.theokanning.openai.completion.chat.ChatFunctionCall class, which is supposed to be a serialized JSON string, is being represented as a JsonNode in the code. I would like to understand why JsonNode is chosen over directly using the String type. Since TextNode also stores a string, I'm not quite sure why String type wasn't used directly. What are the advantages of using JsonNode? I apologize for not considering its benefits earlier.