forked from phoenix/litellm-mirror
fix(utils.py): add more logging
This commit is contained in:
parent
6e87d1ca18
commit
632d6e0bff
4 changed files with 4 additions and 0 deletions
BIN
dist/litellm-1.12.6.dev2-py3-none-any.whl
vendored
Normal file
BIN
dist/litellm-1.12.6.dev2-py3-none-any.whl
vendored
Normal file
Binary file not shown.
BIN
dist/litellm-1.12.6.dev2.tar.gz
vendored
Normal file
BIN
dist/litellm-1.12.6.dev2.tar.gz
vendored
Normal file
Binary file not shown.
|
@ -202,10 +202,12 @@ async def acompletion(*args, **kwargs):
|
|||
|
||||
async def _async_streaming(response, model, custom_llm_provider, args):
|
||||
try:
|
||||
print_verbose(f"received response in _async_streaming: {response}")
|
||||
async for line in response:
|
||||
print_verbose(f"line in async streaming: {line}")
|
||||
yield line
|
||||
except Exception as e:
|
||||
print_verbose(f"error raised _async_streaming: {str(e)}")
|
||||
raise exception_type(
|
||||
model=model, custom_llm_provider=custom_llm_provider, original_exception=e, completion_kwargs=args,
|
||||
)
|
||||
|
|
|
@ -5688,6 +5688,7 @@ class CustomStreamWrapper:
|
|||
chunk = self.completion_stream
|
||||
else:
|
||||
chunk = next(self.completion_stream)
|
||||
print_verbose(f"value of chunk: {chunk} ")
|
||||
if chunk is not None and chunk != b'':
|
||||
print_verbose(f"PROCESSED CHUNK PRE CHUNK CREATOR: {chunk}")
|
||||
response = self.chunk_creator(chunk=chunk)
|
||||
|
@ -5728,6 +5729,7 @@ class CustomStreamWrapper:
|
|||
raise StopAsyncIteration
|
||||
else: # temporary patch for non-aiohttp async calls
|
||||
# example - boto3 bedrock llms
|
||||
print_verbose(f"ENTERS __NEXT__ LOOP")
|
||||
processed_chunk = next(self)
|
||||
asyncio.create_task(self.logging_obj.async_success_handler(processed_chunk,))
|
||||
print_verbose(f"PROCESSED CHUNK IN __ANEXT__: {processed_chunk}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue