Skip to content

Commit d7ac4bf

Browse files
committed
Update auto_answer_bot.py
1 parent 8982f7f commit d7ac4bf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

KnowledgeBaseBot/auto_answer_bot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
exit(1)
1616
MODEL_NAME = 'all-MiniLM-L6-v2'
1717
K_NEAREST_NEIGHBORS = 5 # Number of similar items to retrieve
18-
genai.configure(api_key=os.getenv('GEMINI_API_KEY'))
18+
GEMINI_API_KEY = os.getenv('GEMINI_API_KEY')
19+
if not GEMINI_API_KEY:
20+
exit("Missed GEMINI api key")
21+
genai.configure(api_key=GEMINI_API_KEY)
1922

2023
# --- Initialization ---
2124
g = Github(GITHUB_TOKEN)

0 commit comments

Comments
 (0)