run tests

This commit is contained in:
ishaan-jaff 2023-07-31 11:18:11 -07:00
parent 895085226c
commit b045463355
4 changed files with 6 additions and 49 deletions

View file

@ -1,29 +0,0 @@
from litellm.main import completion
import os
## Configs for Models ##
# OpenAI Configs
## End Configs for Models ##
messages = [{ "content": "Hello, how are you?","role": "user"}]
# openai call
response = completion(model="gpt-3.5-turbo", messages=messages)
print("\nOpenAI call")
print(response)
# azure openai call
response = completion("chatgpt-test", messages, azure=True)
print("\nAzure call")
print(response)
# text davinci openai call
response = completion("text-davinci-003", messages)
print("\nDavinci call")
print(response)
# cohere call
response = completion("command-nightly", messages)
print("\nCohere call")
print(response)

View file

@ -1,19 +0,0 @@
from main import embedding
import os
## Configs for Models ##
# OpenAI Configs
## End Configs for Models ##
input = ["Who is ishaan"]
# openai call
response = embedding(model="text-embedding-ada-002", input=input)
print("\nOpenAI call")
print(response)
# azure openai call
response = embedding(model="azure-embedding-mode", input=input, azure=True)
print("\nAzure OpenAI call")
print(response)

4
requirements.txt Normal file
View file

@ -0,0 +1,4 @@
openai
cohere
func_timeout
anthropic

View file

@ -10,6 +10,7 @@ setup(
],
install_requires=[
'openai',
'cohere'
'cohere',
'func_timeout'
],
)