alpha2
This commit is contained in:
parent
3e2fd074bb
commit
b56dbb26be
|
@ -1845,15 +1845,25 @@ PINECONE_DIMENSION = int(os.getenv("PINECONE_DIMENSION", 1536)) # or 3072, 1024
|
|||
PINECONE_METRIC = os.getenv("PINECONE_METRIC", "cosine")
|
||||
PINECONE_CLOUD = os.getenv("PINECONE_CLOUD", "aws") # or "gcp" or "azure"
|
||||
|
||||
# ORACLE23AI (Oracle23ai vector search)
|
||||
# ORACLE23AI (Oracle23ai Vector Search)
|
||||
|
||||
ORACLE_DB_USER = os.environ.get("ORACLE_DB_USER", "DEMOUSER")
|
||||
ORACLE_DB_PASSWORD = os.environ.get("ORACLE_DB_PASSWORD", "Welcome123456")
|
||||
ORACLE_DB_DSN = os.environ.get("ORACLE_DB_DSN", "medium")
|
||||
ORACLE_WALLET_DIR = os.environ.get("ORACLE_WALLET_DIR", "/home/opc/adb_wallet")
|
||||
ORACLE_WALLET_PASSWORD = os.environ.get("ORACLE_WALLET_PASSWORD", "Welcome1")
|
||||
ORACLE_DB_USE_WALLET = os.environ.get("ORACLE_DB_USE_WALLET", "false").lower() == "true"
|
||||
ORACLE_DB_USER = os.environ.get("ORACLE_DB_USER", None) #
|
||||
ORACLE_DB_PASSWORD = os.environ.get("ORACLE_DB_PASSWORD", None) #
|
||||
ORACLE_DB_DSN = os.environ.get("ORACLE_DB_DSN", None) #
|
||||
ORACLE_WALLET_DIR = os.environ.get("ORACLE_WALLET_DIR", None)
|
||||
ORACLE_WALLET_PASSWORD = os.environ.get("ORACLE_WALLET_PASSWORD", None)
|
||||
ORACLE_VECTOR_LENGTH = os.environ.get("ORACLE_VECTOR_LENGTH", 768)
|
||||
|
||||
if VECTOR_DB == "oracle23ai" and not ORACLE_DB_USER or not ORACLE_DB_PASSWORD or not ORACLE_DB_DSN:
|
||||
raise ValueError(
|
||||
"Oracle23ai requires setting ORACLE_DB_USER, ORACLE_DB_PASSWORD, and ORACLE_DB_DSN."
|
||||
)
|
||||
|
||||
if VECTOR_DB == "oracle23ai" and ORACLE_DB_USE_WALLET and not ORACLE_WALLET_DIR or not ORACLE_WALLET_PASSWORD:
|
||||
raise ValueError(
|
||||
"Oracle23ai requires setting ORACLE_WALLET_DIR and ORACLE_WALLET_PASSWORD when using wallet authentication."
|
||||
)
|
||||
|
||||
####################################
|
||||
# Information Retrieval (RAG)
|
||||
|
|
|
@ -12,6 +12,7 @@ from open_webui.retrieval.vector.main import (
|
|||
)
|
||||
|
||||
from open_webui.config import (
|
||||
ORACLE_DB_USE_WALLET
|
||||
ORACLE_DB_USER,
|
||||
ORACLE_DB_PASSWORD,
|
||||
ORACLE_DB_DSN,
|
||||
|
@ -59,10 +60,10 @@ class Oracle23aiClient(VectorDBBase):
|
|||
wallet_password=ORACLE_WALLET_PASSWORD
|
||||
)
|
||||
|
||||
print(f" >>> Creating Connection Pool [{ORACLE_DB_USER}:**@{ORACLE_DB_DSN}]")
|
||||
log.info(f" >>> Creating Connection Pool [{ORACLE_DB_USER}:**@{ORACLE_DB_DSN}]")
|
||||
|
||||
with self.get_connection() as connection:
|
||||
print("Connection version:", connection.version)
|
||||
log.info("Connection version:", connection.version)
|
||||
self._initialize_database(connection)
|
||||
|
||||
print("Oracle Vector Search initialization complete.")
|
||||
|
|
Loading…
Reference in New Issue