forked from phoenix/litellm-mirror
fix(bedrock_httpx.py): fix ai21 streaming
This commit is contained in:
parent
57e3044974
commit
4c2ef8ea64
2 changed files with 20 additions and 17 deletions
|
@ -10174,7 +10174,7 @@ class CustomStreamWrapper:
|
|||
processed_chunk = self.finish_reason_handler()
|
||||
if self.stream_options is None: # add usage as hidden param
|
||||
usage = calculate_total_usage(chunks=self.chunks)
|
||||
setattr(processed_chunk, "usage", usage)
|
||||
processed_chunk._hidden_params["usage"] = usage
|
||||
## LOGGING
|
||||
threading.Thread(
|
||||
target=self.logging_obj.success_handler,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue