class HanaDBEmbeddings interface for generating vector embeddings from text queries, enabling vector-based similarity searches.
Returns a string representing the type of vector store, which subclasses must implement to identify their specific vector storage type.
Adds an array of documents to the table. The documents are first
converted to vectors using the embedDocuments method of the
embeddings instance.
Adds an array of vectors and corresponding documents to the database. The vectors and documents are batch inserted into the database.
Creates a VectorStoreRetriever instance with flexible configuration options.
Checks if the specified column exists in the table and validates its data type and length.
Creates an HNSW vector index on a specified table and vector column with optional build and search configurations. If no configurations are provided, default parameters from the database are used. If provided values exceed the valid ranges, an error will be raised. The index is always created in ONLINE mode.
Deletes entries from the table based on the provided filter.
Return documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.
Return docs most similar to query.
Return docs most similar to the given embedding.
Return documents and score values most similar to query.
Performs a similarity search based on vector comparison and returns documents along with their similarity scores and vectors.
Creates an instance of HanaDB from an array of
Document instances. The documents are added to the database.
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.
The name of the serializable. Override to provide an alias or to preserve the serialized module name in minified environments.
Implemented as a static method to support loading logic.
Parses a string representation of a float array and returns an array of numbers.
Sanitizes the input to integer. Throws an error if the value is less than lower bound.
Sanitizes a list to ensure all elements are floats (numbers in TypeScript). Throws an error if any element is not a number.
Sanitizes the input string by removing characters that are not alphanumeric or underscores.