When using functions combined with streaming completions, the ChatFunctionCallArgumentsSerializerAndDeserializer is used to deserialize arguments. This is broken because quotes get stripped from the chunks that get returned. This leads to a JSON deserialization exception of the combined chunks (when the arguments JSON gets parsed).
The token \":{\" is decoded to :{ and then decoded again, so losing all quotes in the process. This leads to a Jackson parse exception later when the aggregate of the chunks is (attempted to be) deserialised into the arguments.
I tried to use my own ChatFunctionCallMixIn but failed to plug that in. Also: there seems to be no way to override the mapper in OpenAiService which is kind of bummer because then I could have just plugged in a fix (in stead of patching the source below)
Would be great if this (or a better fix) is present in the next release.
Thanks a bunch; really appreciate your work!
When using functions combined with streaming completions, the ChatFunctionCallArgumentsSerializerAndDeserializer is used to deserialize arguments. This is broken because quotes get stripped from the chunks that get returned. This leads to a JSON deserialization exception of the combined chunks (when the arguments JSON gets parsed).
The token \":{\" is decoded to :{ and then decoded again, so losing all quotes in the process. This leads to a Jackson parse exception later when the aggregate of the chunks is (attempted to be) deserialised into the arguments.
I tried to use my own ChatFunctionCallMixIn but failed to plug that in. Also: there seems to be no way to override the mapper in OpenAiService which is kind of bummer because then I could have just plugged in a fix (in stead of patching the source below)
Would be great if this (or a better fix) is present in the next release. Thanks a bunch; really appreciate your work!