fix(utils.py): streaming

This commit is contained in:
Krrish Dholakia 2023-11-13 18:15:14 -08:00
parent fe9c1e2b45
commit dd925d3de3
2 changed files with 19 additions and 11 deletions

View file

@ -1,13 +1,18 @@
# #### What this tests ####
# # This tests the LiteLLM Class
#### What this tests ####
# This tests the LiteLLM Class
# import sys, os
# import traceback
# import pytest
# sys.path.insert(
# 0, os.path.abspath("../..")
# ) # Adds the parent directory to the system path
# import litellm
import sys, os
import traceback
import pytest
sys.path.insert(
0, os.path.abspath("../..")
) # Adds the parent directory to the system path
import litellm
mr1 = litellm.ModelResponse(stream=True, model="gpt-3.5-turbo")
mr1.choices[0].finish_reason = "stop"
mr2 = litellm.ModelResponse(stream=True, model="gpt-3.5-turbo")
print(mr2.choices[0].finish_reason)
# litellm.set_verbose = True
# from litellm import Router
# import instructor