mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-23 05:33:48 +00:00
fix: include input_tokens in Anthropic streaming message_delta usage
This commit is contained in:
parent
10724d057a
commit
0c82e22cfe
1 changed files with 1 additions and 1 deletions
|
|
@ -743,7 +743,7 @@ async def openai_stream_to_anthropic_stream(openai_stream_generator, model: str
|
|||
'stop_reason': stop_reason,
|
||||
'stop_sequence': None,
|
||||
},
|
||||
'usage': {'output_tokens': output_tokens},
|
||||
'usage': {'input_tokens': input_tokens, 'output_tokens': output_tokens},
|
||||
}
|
||||
yield f'event: message_delta\ndata: {json.dumps(message_delta)}\n\n'.encode()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue