Skip to content

Commit

Permalink
Merge branch 'main' into vectordb-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Eyobyb authored Jan 19, 2024
2 parents 8c14e1d + faf3dfa commit d8c5115
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sherpa_ai/connectors/vectorstores.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def from_index(cls, namespace, openai_api_key, index_name, text_key="text"):
pinecone.init(api_key=cfg.PINECONE_API_KEY, environment=cfg.PINECONE_ENV)
logger.info(f"Loading index {index_name} from Pinecone")
index = pinecone.Index(index_name)
embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key)
return cls(namespace, index, embeddings, text_key)
embedding = OpenAIEmbeddings(openai_api_key=openai_api_key)
return cls(namespace, index, embedding, text_key)

def add_text(self, text: str, metadata={}) -> str:
metadata[self.text_key] = text
Expand Down

0 comments on commit d8c5115

Please sign in to comment.