Static method to create a FakeVectorStore instance from an array of
texts. It creates a Document for each text and metadata pair, and
adds them to the store.
fromTexts(
texts: string[],
metadatas: object | object[],
embeddings: EmbeddingsInterface,
dbConfig: FakeVectorStoreArgs
): Promise<FakeVectorStore>| Name | Type | Description |
|---|---|---|
texts* | string[] | Array of texts to be added to the store. |
metadatas* | object | object[] | Array or single object of metadata corresponding to the texts. |
embeddings* | EmbeddingsInterface |
|
dbConfig | FakeVectorStoreArgs | Optional |