mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix(main.py): fix streaming_chunk_builder to return usage
This commit is contained in:
parent
b1db3a38d7
commit
5a9a3aa89c
6 changed files with 133 additions and 117 deletions
|
@ -93,11 +93,11 @@ def test_async_fallbacks():
|
|||
response = await router.acompletion(**kwargs)
|
||||
# response = await response
|
||||
print(f"response: {response}")
|
||||
router.flush_cache()
|
||||
except litellm.Timeout as e:
|
||||
pass
|
||||
except Exception as e:
|
||||
pytest.fail(f"An exception occurred: {e}")
|
||||
router.flush_cache()
|
||||
|
||||
asyncio.run(test_get_response())
|
||||
|
||||
|
@ -110,8 +110,8 @@ def test_sync_context_window_fallbacks():
|
|||
kwargs["messages"] = [{"role": "user", "content": sample_text}]
|
||||
response = router.completion(**kwargs)
|
||||
print(f"response: {response}")
|
||||
router.flush_cache()
|
||||
except Exception as e:
|
||||
print(e)
|
||||
router.flush_cache()
|
||||
|
||||
# test_sync_context_window_fallbacks()
|
Loading…
Add table
Add a link
Reference in a new issue