Static method to create a HanaDB instance from raw texts. This method embeds the documents, creates a table if it does not exist, and adds the documents to the table.
fromTexts(
texts: string[],
metadatas: object | object[],
embeddings: EmbeddingsInterface,
dbConfig: HanaDBArgs
): Promise<HanaDB>| Name | Type | Description |
|---|---|---|
texts* | string[] | Array of text documents to add. |
metadatas* | object | object[] | metadata for each text document. |
embeddings* | EmbeddingsInterface | |
dbConfig* | HanaDBArgs | Configuration for the HanaDB. |