File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1+
2+ ## 3.19.1 – 2025-03-11
3+
4+ 1 . Fix bug where None is sent as delta in azure
5+
16## 3.19.0 – 2025-03-04
27
381 . Add support for tool calls in OpenAI and Anthropic.
Original file line number Diff line number Diff line change @@ -122,9 +122,10 @@ def generator():
122122 usage_stats ["cache_read_input_tokens" ] = chunk .usage .prompt_tokens_details .cached_tokens
123123
124124 if hasattr (chunk , "choices" ) and chunk .choices and len (chunk .choices ) > 0 :
125- content = chunk .choices [0 ].delta .content
126- if content :
127- accumulated_content .append (content )
125+ if chunk .choices [0 ].delta and chunk .choices [0 ].delta .content :
126+ content = chunk .choices [0 ].delta .content
127+ if content :
128+ accumulated_content .append (content )
128129
129130 # Process tool calls
130131 tool_calls = getattr (chunk .choices [0 ].delta , "tool_calls" , None )
Original file line number Diff line number Diff line change @@ -120,9 +120,10 @@ async def async_generator():
120120 usage_stats ["cache_read_input_tokens" ] = chunk .usage .prompt_tokens_details .cached_tokens
121121
122122 if hasattr (chunk , "choices" ) and chunk .choices and len (chunk .choices ) > 0 :
123- content = chunk .choices [0 ].delta .content
124- if content :
125- accumulated_content .append (content )
123+ if chunk .choices [0 ].delta and chunk .choices [0 ].delta .content :
124+ content = chunk .choices [0 ].delta .content
125+ if content :
126+ accumulated_content .append (content )
126127
127128 # Process tool calls
128129 tool_calls = getattr (chunk .choices [0 ].delta , "tool_calls" , None )
Original file line number Diff line number Diff line change 1- VERSION = "3.19.0 "
1+ VERSION = "3.19.1 "
22
33if __name__ == "__main__" :
44 print (VERSION , end = "" ) # noqa: T201
You can’t perform that action at this time.
0 commit comments