mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 06:42:21 +08:00
🔧 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:
@ -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:
|
||||
|
||||
Reference in New Issue
Block a user