Skip to content

Commit

Permalink
Serialize usage to JSON properly, closes #614
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Nov 6, 2024
1 parent 245e025 commit 3352eb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llm/default_plugins/openai_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def combine_chunks(chunks: List) -> dict:

for item in chunks:
if item.usage:
usage = dict(item.usage)
usage = item.usage.dict()
for choice in item.choices:
if choice.logprobs and hasattr(choice.logprobs, "top_logprobs"):
logprobs.append(
Expand Down

0 comments on commit 3352eb9

Please sign in to comment.