Skip to content

Commit

Permalink
fix: set correct knowledge DSN environment variables
Browse files Browse the repository at this point in the history
Signed-off-by: Donnie Adams <[email protected]>
  • Loading branch information
thedadams committed Oct 18, 2024
1 parent 5dbb7c6 commit 70959ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/services/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ func New(ctx context.Context, config Config) (*Services, error) {
devPort, config := configureDevMode(config)

if strings.HasPrefix(config.DSN, "postgres://") {
_ = os.Setenv("KNOW_VECTOR_DB", strings.Replace(config.DSN, "postgres://", "pgvector://", 1))
_ = os.Setenv("KNOW_INDEX_DSN", strings.Replace(config.DSN, "postgres://", "pgvector://", 1))
_ = os.Setenv("KNOW_VECTOR_DSN", strings.Replace(config.DSN, "postgres://", "pgvector://", 1))
_ = os.Setenv("KNOW_INDEX_DSN", config.DSN)
}

storageClient, restConfig, dbAccess, err := storage.Start(ctx, config.Config)
Expand Down

0 comments on commit 70959ad

Please sign in to comment.