forked from phoenix/litellm-mirror
good shit
This commit is contained in:
parent
918a286e12
commit
e037318344
4 changed files with 153 additions and 0 deletions
30
completion_test.py
Normal file
30
completion_test.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
from 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)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue