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(
2424 _dict : Mapping [str , Any ], default_class : type [BaseMessageChunk ]
2525) -> BaseMessageChunk :
2626 id_ = _dict .get ("id" )
27- reasoning_content = cast (str , _dict .get ("reasoning_content" ) or "" )
2827 role = cast (str , _dict .get ("role" ))
2928 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' )
3132 if _dict .get ("function_call" ):
3233 function_call = dict (_dict ["function_call" ])
3334 if "name" in function_call and function_call ["name" ] is None :
You can’t perform that action at this time.
0 commit comments