HANAVectorEmbeddings
- class hana_ai.vectorstore.embedding_service.HANAVectorEmbeddings(connection_context, model_version='SAP_NEB.20240715')
PAL embedding model.
- Parameters:
- connection_contextConnectionContext
Connection context.
- model_versionstr, optional
Model version. Default to 'SAP_NEB.20240715'
Methods
__call__
(input)Call self as a function.
aembed_documents
(texts)Asynchronous Embed search docs.
aembed_query
(text)Asynchronous Embed query text.
embed_documents
(texts)Embed multiple documents.
embed_query
(text)Embed a single query.
get_text_embedding_batch
(texts[, show_progress])Get text embedding batch.
- embed_documents(texts: List[str]) → List[List[float]]
Embed multiple documents.
- Parameters:
- textsList[str]
List of texts.
- Returns:
- List[List[float]]
List of embeddings.
- embed_query(text: str) → List[float]
Embed a single query.
- Parameters:
- textstr
Text.
- Returns:
- List[float]
Embedding.
- get_text_embedding_batch(texts: List[str], show_progress=False, **kwargs)
Get text embedding batch.
- Parameters:
- textsList[str]
List of texts.
- Returns:
- List[List[float]]
List of embeddings.
- async aembed_documents(texts: list[str]) → list[list[float]]
Asynchronous Embed search docs.
- Args:
texts: List of text to embed.
- Returns:
List of embeddings.
- async aembed_query(text: str) → list[float]
Asynchronous Embed query text.
- Args:
text: Text to embed.
- Returns:
Embedding.