fix:completion fails when client=True&no email set

This commit is contained in:
ishaan-jaff 2023-09-08 12:36:21 -07:00
parent 411db63133
commit 5a047d8b7a
3 changed files with 5 additions and 6 deletions

View file

@ -15,10 +15,6 @@ from litellm import embedding, completion, text_completion, completion_cost
litellm.vertex_project = "pathrise-convert-1606954137718"
litellm.vertex_location = "us-central1"
litellm.use_client = True
# from infisical import InfisicalClient
# litellm.set_verbose = True
# litellm.secret_manager_client = InfisicalClient(token=os.environ["INFISICAL_TOKEN"])
user_message = "Write a short poem about the sky"
messages = [{"content": user_message, "role": "user"}]
@ -217,6 +213,7 @@ def test_completion_openai_prompt():
def test_completion_text_openai():
try:
# litellm.set_verbose=True
response = completion(model="text-davinci-003", messages=messages)
# Add any assertions here to check the response
print(response)