-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update parsing async openai response #167
Conversation
582c37d
to
a187093
Compare
log10/_httpx_utils.py
Outdated
idx = tc[0].get("index") | ||
self.tool_calls[idx]["function"]["arguments"] += tc[0]["function"]["arguments"] | ||
|
||
if "choices" in r_json and r_json["choices"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r_json.get("choices", {})
and get()
generally is a bit more graceful when the key isn't available. Could make the rest of the code more robust/bit more concise
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
No description provided.