langchain.embeddings.clarifai.ClarifaiEmbeddings¶
class langchain.embeddings.clarifai.ClarifaiEmbeddings[source]¶
Bases: BaseModel, Embeddings
Clarifai embedding models.
To use, you should have the clarifai python package installed, and the
environment variable CLARIFAI_PAT set with your personal access token or pass it
as a named parameter to the constructor.
Example
from langchain.embeddings import ClarifaiEmbeddings
clarifai = ClarifaiEmbeddings(
    model="embed-english-light-v2.0", clarifai_api_key="my-api-key"
)
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param api_base: str = 'https://api.clarifai.com'¶
param app_id: Optional[str] = None¶
Clarifai application id to use.
param model_id: Optional[str] = None¶
Model id to use.
param model_version_id: Optional[str] = None¶
Model version id to use.
param pat: Optional[str] = None¶
Clarifai personal access token to use.
param stub: Any = None¶
Clarifai stub.
param userDataObject: Any = None¶
Clarifai user data object.
param user_id: Optional[str] = None¶
Clarifai user id to use.
async aembed_documents(texts: List[str]) → List[List[float]]¶
Asynchronous Embed search docs.
async aembed_query(text: str) → List[float]¶
Asynchronous Embed query text.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶