Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New-Model] Cohere/command-r #2474

Merged
merged 7 commits into from Mar 12, 2024
Merged

[New-Model] Cohere/command-r #2474

merged 7 commits into from Mar 12, 2024

Conversation

ishaan-jaff
Copy link
Contributor

@ishaan-jaff ishaan-jaff commented Mar 12, 2024

Usage

from litellm import completion

## set ENV variables
os.environ["COHERE_API_KEY"] = "cohere key"

# cohere call
response = completion(
    model="command-r", 
    messages = [{ "content": "Hello, how are you?","role": "user"}]
)

Usage - Streaming

from litellm import completion

## set ENV variables
os.environ["COHERE_API_KEY"] = "cohere key"

# cohere call
response = completion(
    model="command-r", 
    messages = [{ "content": "Hello, how are you?","role": "user"}],
    stream=True
)

for chunk in response:
    print(chunk)

Copy link

vercel bot commented Mar 12, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2024 6:16pm
litellm-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 12, 2024 6:16pm

Copy link

railway-app bot commented Mar 12, 2024

This PR is being deployed to Railway 🚅

litellm: ◻️ REMOVED

"input_cost_per_token": 0.00000050,
"output_cost_per_token": 0.0000015,
"litellm_provider": "cohere_chat",
"mode": "chat"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to support Tool Usage: https://docs.cohere.com/docs/tool-use#step-1

Can we enable function calling here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: New Model - Cohere/command-r
2 participants