GooglePalmEmbeddings#
- class langchain_community.embeddings.google_palm.GooglePalmEmbeddings[source]#
Bases:
BaseModel
,Embeddings
Googleβs PaLM Embeddings 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 google_api_key: str | None = None#
- param model_name: str = 'models/embedding-gecko-001'#
Model name to use.
- 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 GooglePalmEmbeddings