langchain.embeddings.gpt4all.GPT4AllEmbeddings¶
- class langchain.embeddings.gpt4all.GPT4AllEmbeddings(*, client: Any = None)[source]¶
Bases:
BaseModel,EmbeddingsGPT4All embedding models.
To use, you should have the gpt4all python package installed
Example
from langchain.embeddings import GPT4AllEmbeddings embeddings = GPT4AllEmbeddings()
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.
- embed_documents(texts: List[str]) List[List[float]][source]¶
Embed a list of documents using GPT4All.
- Parameters
texts – The list of texts to embed.
- Returns
List of embeddings, one for each text.