SAP HANA Cloud Vector Engine
SAP HANA Cloud Vector Engine is a vector store fully integrated into the
SAP HANA Cloud
database.
You'll need to install langchain-community
with pip install -qU langchain-community
to use this integration
Setting up
Installation of the HANA database driver.
# Pip install necessary package
%pip install --upgrade --quiet hdbcli
For OpenAIEmbeddings
we use the OpenAI API key from the environment.
import os
# Use OPENAI_API_KEY env variable
# os.environ["OPENAI_API_KEY"] = "Your OpenAI API key"
Create a database connection to a HANA Cloud instance.
from hdbcli import dbapi
# Use connection settings from the environment
connection = dbapi.connect(
address=os.environ.get("HANA_DB_ADDRESS"),
port=os.environ.get("HANA_DB_PORT"),
user=os.environ.get("HANA_DB_USER"),
password=os.environ.get("HANA_DB_PASSWORD"),
autocommit=True,
sslValidateCertificate=False,
)