Skip to content

Commit

Permalink
[fix]: Added an exception in main.py if pinecone_api_key is not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
keenborder786 committed Apr 7, 2023
1 parent c6d9022 commit b983faa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,12 @@ def parse_arguments():
# Make a constant:
user_input = "Determine which next command to use, and respond using the format specified above:"

# raise an exception if pinecone_api_key or region is not provided
if not cfg.pinecone_api_key or not cfg.pinecone_region: raise Exception("Please provide pinecone_api_key and pinecone_region")
# Initialize memory and make sure it is empty.
# this is particularly important for indexing and referencing pinecone memory
memory = PineconeMemory()
memory.clear()

print('Using memory of type: ' + memory.__class__.__name__)

# Interaction Loop
Expand Down

0 comments on commit b983faa

Please sign in to comment.