cohere[patch]: add cohere as a partner package (#19049)

Description: adds support for langchain_cohere

---------

Co-authored-by: Harry M <127103098+harry-cohere@users.noreply.github.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
billytrend-cohere
2024-03-25 15:23:47 -05:00
committed by GitHub
parent 727d5023ce
commit 63343b4987
38 changed files with 2331 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
from typing import Any, Dict, List, Optional
from langchain_core._api.deprecation import deprecated
from langchain_core.embeddings import Embeddings
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
from langchain_core.utils import get_from_dict_or_env
@@ -7,6 +8,11 @@ from langchain_core.utils import get_from_dict_or_env
from langchain_community.llms.cohere import _create_retry_decorator
@deprecated(
since="0.0.30",
removal="0.2.0",
alternative_import="langchain_cohere.CohereEmbeddings",
)
class CohereEmbeddings(BaseModel, Embeddings):
"""Cohere embedding models.