Skip to content

Fix: check response usage is not None - #1599

Merged
Chi Wang (sonichi) merged 2 commits into
microsoft:mainfrom
olgavrou:check_usage
Feb 8, 2024
Merged

Chi Wang (sonichi) merged 2 commits into
microsoft:mainfrom
olgavrou:check_usage

Conversation

@olgavrou

@olgavrou olgavrou commented Feb 8, 2024

Copy link
Copy Markdown
Contributor

Why are these changes needed?

usage in response is Optional but we never check if it is there, so this fixes that

Related issue number

resolves #1579

Checks

Comment thread autogen/oai/client.py Resolved
@sonichi
Chi Wang (sonichi) added this pull request to the merge queue Feb 8, 2024
Merged via the queue into microsoft:main with commit 58d77bc Feb 8, 2024
Tian Wei (whiskyboy) pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024

This branch had an error being deployed

1 failed deployment
openai1 โ€” 6fc2ffe0 Deployed Feb 8, 2024 by olgavrou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'NoneType' object has no attribute 'prompt_tokens'

3 participants