From 6d299a55c0a894e036e8257ce9a9f04d7fbf5252 Mon Sep 17 00:00:00 2001 From: Daniel <133696562+daniel-cohere@users.noreply.github.com> Date: Wed, 10 Jan 2024 22:25:29 -0500 Subject: [PATCH] docs: Update cohere.mdx, Text embedding had incorrect code snippet (#15840) text embedding code snippet was incorrect. --- docs/docs/integrations/providers/cohere.mdx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/docs/integrations/providers/cohere.mdx b/docs/docs/integrations/providers/cohere.mdx index e74ef056cc..729874a25d 100644 --- a/docs/docs/integrations/providers/cohere.mdx +++ b/docs/docs/integrations/providers/cohere.mdx @@ -58,10 +58,8 @@ print(rag.get_relevant_documents("What is cohere ai?")) ### Text Embedding ```python -from langchain_community.chat_models import ChatCohere -from langchain.retrievers import CohereRagRetriever -from langchain_core.documents import Document +from langchain_community.embeddings import CohereEmbeddings -rag = CohereRagRetriever(llm=ChatCohere()) -print(rag.get_relevant_documents("What is cohere ai?")) +embeddings = CohereEmbeddings(model="embed-english-light-v3.0") +print(embeddings.embed_documents(["This is a test document."])) ```