openai-java icon indicating copy to clipboard operation
openai-java copied to clipboard

Move Function Arguments to String

Open fkesheh opened this issue 2 years ago • 0 comments

Current functions implementation doesn't work with GPT-4-Turbo, forming bad JSON strings due to JsonNode usage when concatenating chunks (https://github.com/TheoKanning/openai-java/issues/338)

Trying to execute "" Trying to execute "{"" Trying to execute "{"location" Trying to execute "{"location:" Trying to execute "{"location:Bar" Trying to execute "{"location:Barcelona" Trying to execute "{"location:Barcelona," Trying to execute "{"location:Barcelona,unit" Trying to execute "{"location:Barcelona,unit:" Trying to execute "{"location:Barcelona,unit:CE" Trying to execute "{"location:Barcelona,unit:CELS" Trying to execute "{"location:Barcelona,unit:CELSI" Trying to execute "{"location:Barcelona,unit:CELSIUS" Trying to execute "{"location:Barcelona,unit:CELSIUS"}"

! com.fasterxml.jackson.core.JsonParseException: Unexpected character ('}' (code 125)): was expecting a colon to separate field name and value ! at [Source: (String)"{"location:Barcelona,unit:CELSIUS"}"; line: 1, column: 36]

fkesheh avatar Nov 24 '23 02:11 fkesheh