PremAIEmbeddings#
- class langchain_community.embeddings.premai.PremAIEmbeddings[source]#
Bases:
BaseModel
,Embeddings
Premβs Embedding APIs
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 client: Any = None#
- param max_retries: int = 1#
Max number of retries for tenacity
- param model: str [Required]#
The Embedding model to choose from
- param premai_api_key: SecretStr | None = None#
Prem AI API Key. Get it here: https://app.premai.io/api_keys/
- Constraints:
type = string
writeOnly = True
format = password
- param project_id: int [Required]#
The project ID in which the experiments or deployments are carried out. You can find all your projects here: https://app.premai.io/projects/
- param show_progress_bar: bool = False#
Whether to show a tqdm progress bar. Must have tqdm installed.
- async aembed_documents(texts: List[str]) List[List[float]] #
Asynchronous Embed search docs.
- Parameters:
texts (List[str]) β List of text to embed.
- Returns:
List of embeddings.
- Return type:
List[List[float]]
- async aembed_query(text: str) List[float] #
Asynchronous Embed query text.
- Parameters:
text (str) β Text to embed.
- Returns:
Embedding.
- Return type:
List[float]
Examples using PremAIEmbeddings