🔧 chore(vector_store.py): change the way pinecone_api_key and pinecone_env are retrieved from params dictionary to improve code readability and remove unnecessary code duplication
This commit is contained in:
parent
ab11bb99a7
commit
f7afbd89b0
1 changed files with 2 additions and 2 deletions
|
|
@ -130,8 +130,8 @@ def initialize_pinecone(class_object: Type[Pinecone], params: dict):
|
|||
|
||||
import pinecone # type: ignore
|
||||
|
||||
pinecone_api_key = params.get("pinecone_api_key")
|
||||
pinecone_env = params.get("pinecone_env")
|
||||
pinecone_api_key = params.pop("pinecone_api_key")
|
||||
pinecone_env = params.pop("pinecone_env")
|
||||
|
||||
if pinecone_api_key is None or pinecone_env is None:
|
||||
if os.getenv("PINECONE_API_KEY") is not None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue