File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
apps/setting/models_provider/impl Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,11 @@ def _convert_delta_to_message_chunk(
24
24
_dict : Mapping [str , Any ], default_class : type [BaseMessageChunk ]
25
25
) -> BaseMessageChunk :
26
26
id_ = _dict .get ("id" )
27
- reasoning_content = cast (str , _dict .get ("reasoning_content" ) or "" )
28
27
role = cast (str , _dict .get ("role" ))
29
28
content = cast (str , _dict .get ("content" ) or "" )
30
- additional_kwargs : dict = {'reasoning_content' : reasoning_content }
29
+ additional_kwargs : dict = {}
30
+ if 'reasoning_content' in _dict :
31
+ additional_kwargs ['reasoning_content' ] = _dict .get ('reasoning_content' )
31
32
if _dict .get ("function_call" ):
32
33
function_call = dict (_dict ["function_call" ])
33
34
if "name" in function_call and function_call ["name" ] is None :
You can’t perform that action at this time.
0 commit comments