Skip to content

Commit

Permalink
Add new Cohere models (#834)
Browse files Browse the repository at this point in the history
* Add new Cohere models

Added `command-r` and `command-r-plus` models

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
srdas and pre-commit-ci[bot] authored Jun 14, 2024
1 parent a3b3ce0 commit f875fef
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/jupyter-ai-magics/jupyter_ai_magics/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,15 @@ def is_api_key_exc(cls, e: Exception):
class CohereProvider(BaseProvider, Cohere):
id = "cohere"
name = "Cohere"
# Source: https://docs.cohere.com/reference/generate
models = ["command", "command-nightly", "command-light", "command-light-nightly"]
# Source: https://docs.cohere.com/reference/generate; https://docs.cohere.com/docs/models
models = [
"command",
"command-nightly",
"command-light",
"command-light-nightly",
"command-r-plus",
"command-r",
]
model_id_key = "model"
pypi_package_deps = ["cohere"]
auth_strategy = EnvAuthStrategy(name="COHERE_API_KEY")
Expand Down

0 comments on commit f875fef

Please sign in to comment.