mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
run tests
This commit is contained in:
parent
895085226c
commit
b045463355
4 changed files with 6 additions and 49 deletions
|
@ -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)
|
|
|
@ -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
4
requirements.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
openai
|
||||||
|
cohere
|
||||||
|
func_timeout
|
||||||
|
anthropic
|
3
setup.py
3
setup.py
|
@ -10,6 +10,7 @@ setup(
|
||||||
],
|
],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
'openai',
|
'openai',
|
||||||
'cohere'
|
'cohere',
|
||||||
|
'func_timeout'
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue