(feat) cohere embedding

This commit is contained in:
ishaan-jaff
2023-11-02 10:26:02 -07:00
parent 33350c7c41
commit 8ea2270058
+14 -1
View File
@@ -41,4 +41,17 @@ for chunk in response:
print(chunk)
```
LiteLLM supports 'command', 'command-light', 'command-medium', 'command-medium-beta', 'command-xlarge-beta', 'command-nightly' models from [Cohere](https://cohere.com/).
LiteLLM supports 'command', 'command-light', 'command-medium', 'command-medium-beta', 'command-xlarge-beta', 'command-nightly' models from [Cohere](https://cohere.com/).
## Embedding
```python
from litellm import embedding
os.environ["COHERE_API_KEY"] = "cohere key"
# cohere call
response = embedding(
model="embed-english-v3.0",
input=["good morning from litellm", "this is another item"],
)
```