fix: patch the streaming issue in the openai client for when inner_thoughts_in_kwargs is off [LET-4146] (#4350)

fix: patch the streaming issue in the openai client for when inner_thoughts_in_kwargs is off
This commit is contained in:
Charles Packer
2025-09-02 12:44:25 -07:00
committed by GitHub
parent b8a198688f
commit 9d49eff204
2 changed files with 3 additions and 1 deletions

View File

@@ -35,13 +35,14 @@ class OpenAIStreamingInterface:
is_openai_proxy: bool = False,
messages: Optional[list] = None,
tools: Optional[list] = None,
put_inner_thoughts_in_kwarg: bool = True,
):
self.use_assistant_message = use_assistant_message
self.assistant_message_tool_name = DEFAULT_MESSAGE_TOOL
self.assistant_message_tool_kwarg = DEFAULT_MESSAGE_TOOL_KWARG
self.optimistic_json_parser: OptimisticJSONParser = OptimisticJSONParser()
self.function_args_reader = JSONInnerThoughtsExtractor(wait_for_first_key=True) # TODO: pass in kwarg
self.function_args_reader = JSONInnerThoughtsExtractor(wait_for_first_key=put_inner_thoughts_in_kwarg)
self.function_name_buffer = None
self.function_args_buffer = None
self.function_id_buffer = None