We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fe9cd3 commit ea6ae23Copy full SHA for ea6ae23
apps/models_provider/impl/base_chat_open_ai.py
@@ -32,8 +32,8 @@ def _convert_delta_to_message_chunk(
32
role = cast(str, _dict.get("role"))
33
content = cast(str, _dict.get("content") or "")
34
additional_kwargs: dict = {}
35
- if 'reasoning_content' in _dict or 'reasoning' in _dict:
36
- additional_kwargs['reasoning_content'] = _dict.get('reasoning_content') or _dict.get('reasoning')
+ if reasoning := _dict.get('reasoning_content') or _dict.get('reasoning'):
+ additional_kwargs['reasoning_content'] = reasoning
37
if _dict.get("function_call"):
38
function_call = dict(_dict["function_call"])
39
if "name" in function_call and function_call["name"] is None:
0 commit comments