forked from phoenix/litellm-mirror
(fix) async+stream logger - building complete resp
This commit is contained in:
parent
b14e75773e
commit
6af3e73495
1 changed files with 2 additions and 2 deletions
|
@ -856,7 +856,7 @@ class Logging:
|
||||||
print_verbose(f"success callbacks: {litellm.success_callback}")
|
print_verbose(f"success callbacks: {litellm.success_callback}")
|
||||||
## BUILD COMPLETE STREAMED RESPONSE
|
## BUILD COMPLETE STREAMED RESPONSE
|
||||||
complete_streaming_response = None
|
complete_streaming_response = None
|
||||||
if self.stream == True and self.model_call_details.get("litellm_params", {}).get("acompletion", False) == True:
|
if self.stream == True and self.model_call_details.get("litellm_params", {}).get("acompletion", False) == False: # only call stream chunk builder if it's not acompletion()
|
||||||
# if it's acompletion == True, chunks are built/appended in async_success_handler
|
# if it's acompletion == True, chunks are built/appended in async_success_handler
|
||||||
if result.choices[0].finish_reason is not None: # if it's the last chunk
|
if result.choices[0].finish_reason is not None: # if it's the last chunk
|
||||||
streaming_chunks = self.streaming_chunks + [result]
|
streaming_chunks = self.streaming_chunks + [result]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue