Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions RetrievalAugmentedGeneration/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def get_vector_index() -> VectorStoreIndex:

logger.info(f"Using {config.vector_store.name} as vector store")
if config.vector_store.name == "pgvector":
connection_string = f"postgresql://{os.getenv('POSTGRES_USER', '')}:{os.getenv('POSTGRES_PASSWORD', '')}@{config.vector_store.url}"
db_name = "vector_db"
db_name = os.getenv('POSTGRES_DB', 'vector_db')
connection_string = f"postgresql://{os.getenv('POSTGRES_USER', '')}:{os.getenv('POSTGRES_PASSWORD', '')}@{config.vector_store.url}/{db_name}"

conn = psycopg2.connect(connection_string)
conn.autocommit = True
Expand Down
6 changes: 5 additions & 1 deletion deploy/compose/compose.env
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,15 @@ export RAG_EXAMPLE="developer_rag"
# [OPTIONAL] the config file for chain server w.r.t. pwd
export APP_CONFIG_FILE=/dev/null

# parameters for PGVector, update this when using PGVector Vecotor store
# parameters for PGVector, update this when using PGVector Vector store
# export POSTGRES_PASSWORD=password
# export POSTGRES_USER=postgres
# export POSTGRES_DB=api

# Update this line when using an external PGVector Vector store
# export POSTGRES_HOST_IP=pgvector
# export POSTGRES_PORT_NUMBER=5432

### Riva Parameters:

# Riva Speech API URI: Riva Server IP address/hostname and port
Expand Down
2 changes: 1 addition & 1 deletion deploy/compose/docker-compose-pgvector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ services:
EXAMPLE_NAME: ${RAG_EXAMPLE}
command: --port 8081 --host 0.0.0.0
environment:
APP_VECTORSTORE_URL: "pgvector:5432"
APP_VECTORSTORE_URL: "${POSTGRES_HOST_IP:-pgvector}:${POSTGRES_PORT_NUMBER:-5432}"
APP_VECTORSTORE_NAME: "pgvector"
APP_LLM_SERVERURL: "llm:8001"
APP_LLM_MODELNAME: "ensemble"
Expand Down