From 8ea2270058b7d2a6dee8a6770aa4215434c70914 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 2 Nov 2023 10:26:02 -0700 Subject: [PATCH] (feat) cohere embedding --- docs/my-website/docs/providers/cohere.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/providers/cohere.md b/docs/my-website/docs/providers/cohere.md index d9029dc004..1d97f9f98f 100644 --- a/docs/my-website/docs/providers/cohere.md +++ b/docs/my-website/docs/providers/cohere.md @@ -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/). \ No newline at end of file +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"], +) +``` \ No newline at end of file