Skip to content

Commit

Permalink
don't init pinecone if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
Southclaws committed Jan 1, 2025
1 parent bc262f0 commit f11b9e3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/infrastructure/vector/pinecone/pinecone.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ func Build() fx.Option {
}

func newPinecone(cfg config.Config) (*Client, error) {
if cfg.SemdexProvider != "pinecone" {
return nil, nil
}

c, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey: cfg.PineconeAPIKey,
})
Expand Down

0 comments on commit f11b9e3

Please sign in to comment.