mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
cohere docs update
This commit is contained in:
parent
254b0386c4
commit
eb970967fd
1 changed files with 0 additions and 5 deletions
|
@ -18,15 +18,10 @@ os.environ["COHERE_API_KEY"] = ""
|
||||||
from litellm import completion
|
from litellm import completion
|
||||||
|
|
||||||
## set ENV variables
|
## set ENV variables
|
||||||
os.environ["OPENAI_API_KEY"] = "openai key"
|
|
||||||
os.environ["COHERE_API_KEY"] = "cohere key"
|
os.environ["COHERE_API_KEY"] = "cohere key"
|
||||||
|
|
||||||
|
|
||||||
messages = [{ "content": "Hello, how are you?","role": "user"}]
|
messages = [{ "content": "Hello, how are you?","role": "user"}]
|
||||||
|
|
||||||
# openai call
|
|
||||||
response = completion(model="gpt-3.5-turbo", messages=messages)
|
|
||||||
|
|
||||||
# cohere call
|
# cohere call
|
||||||
response = completion("command-nightly", messages)
|
response = completion("command-nightly", messages)
|
||||||
```
|
```
|
Loading…
Add table
Add a link
Reference in a new issue