Skip to content

Commit

Permalink
minor embedding updates
Browse files Browse the repository at this point in the history
  • Loading branch information
doberst committed Dec 26, 2023
1 parent 04a4930 commit 3a6ba73
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
18 changes: 18 additions & 0 deletions docker-compose-pgvector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

version: '3.5'

services:
db:
hostname: db
image: ankane/pgvector
ports:
- 5432:5432
restart: always
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=""
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql

10 changes: 6 additions & 4 deletions llmware/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1359,11 +1359,13 @@ def __init__(self, library, model=None, model_name=None, embedding_dims=None, fu
# Connect to postgres
postgres_host = os.environ.get("USER_MANAGED_PG_HOST","localhost")
postgres_port = os.environ.get("USER_MANAGED_PG_PORT", 5432)
postgres_db_name = os.environ.get("USER_MANAGED_PG_DB_NAME", self.library.account_name)
postgres_user_name = os.environ.get("USER_MANAGED_PG_USER_NAME")
postgres_db_name = os.environ.get("USER_MANAGED_PG_DB_NAME", "postgres")
postgres_user_name = os.environ.get("USER_MANAGED_PG_USER_NAME", "postgres")
# postgres_full_schema = os.environ.get("USER_MANAGED_PG_FULL_SCHEMA", full_schema)
postgres_pw = ""


# default is no password unless user sets in os environ variable
postgres_pw = os.environ.get("USER_MANAGED_PG_PW", "")

# determines whether to use 'skinny' schema or 'full' schema
# --note: in future releases, we will be building out more support for PostGres
self.full_schema = full_schema
Expand Down

0 comments on commit 3a6ba73

Please sign in to comment.