Creates a new FaissStore from an array of texts, their corresponding metadata, and an Embeddings object.
fromTexts(
texts: string[],
metadatas: object | object[],
embeddings: EmbeddingsInterface,
dbConfig: __type
): Promise<FaissStore>| Name | Type | Description |
|---|---|---|
texts* | string[] | An array of texts. |
metadatas* | object | object[] | An array of metadata corresponding to the texts, or a single metadata object to be used for all texts. |
embeddings* | EmbeddingsInterface | An Embeddings object. |
dbConfig | __type | An optional configuration object for the document store. |