DSPy: The framework for programming—not prompting—language models
Python
Updating Cohere model names
Jay Alammarad186160b7d8
diff --git a/docs/language_models_client.md b/docs/language_models_client.mdindex 05e784a77..9edb54980 100644--- a/docs/language_models_client.md+++ b/docs/language_models_client.md@@ -80,7 +80,7 @@ After generation, the completions are post-processed based on the `model_type` p### Usage```python-lm = dsp.Cohere(model='command-xlarge-nightly')+lm = dsp.Cohere(model='command-nightly')```### Constructor@@ -91,14 +91,14 @@ The constructor initializes the base class `LM` and verifies the `api_key` to seclass Cohere(LM):def __init__(self,- model: str = "command-xlarge-nightly",+ model: str = "command-nightly",api_key: Optional[str] = None,stop_sequences: List[str] = [],):```**Parameters:**-- `model` (_str_): Cohere pretrained models. Defaults to `command-xlarge-nightly`.+- `model` (_str_): Cohere pretrained models. Defaults to `command-nightly`.- `api_key` (_Optional[str]_, _optional_): API provider from Cohere. Defaults to None.- `stop_sequences` (_List[str]_, _optional_): List of stopping tokens to end generation.diff --git a/dsp/modules/cohere.py b/dsp/modules/cohere.pyindex 789704cac..876c80086 100644--- a/dsp/modules/cohere.py+++ b/dsp/modules/cohere.py@@ -31,12 +31,12 @@ def giveup_hdlr(details):class Cohere(LM):"""Wrapper around Cohere's API.- Currently supported models include `medium-20221108`, `xlarge-20221108`, `command-medium-nightly`, and `command-xlarge-nightly`.+ Currently supported models include `command`, `command-nightly`, `command-light`, `command-light-nightly`."""def __init__(self,- model: str = "command-xlarge-nightly",+ model: str = "command-nightly",api_key: Optional[str] = None,stop_sequences: list[str] = [],):@@ -45,7 +45,7 @@ class Cohere(LM):----------model : strWhich pre-trained model from Cohere to use?- Choices are ['medium-20221108', 'xlarge-20221108', 'command-medium-nightly', 'command-xlarge-nightly']+ Choices are [`command`, `command-nightly`, `command-light`, `command-light-nightly`]api_key : strThe API key for Cohere.It can be obtained from https://dashboard.cohere.ai/register.