Skip to content

Commit

Permalink
- Fixing issue while generating key
Browse files Browse the repository at this point in the history
  • Loading branch information
aiyu-ayaan committed Jun 12, 2024
1 parent eedab68 commit 8d250fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.venv
**/__pycache__/
.env
key.txt
src/gemini-cli/key.txt
dist/
build/
4 changes: 2 additions & 2 deletions src/gemini-cli/gemini-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def create_key_file():
console.print('Key cannot be empty.\nLink to generate key https://ai.google.dev/gemini-api/docs/api-key',
style='bold red')
api_key = input('Enter your key: ')
with open('../../key.txt', 'w') as f:
with open('key.txt', 'w') as f:
f.write(api_key)
f.close()
console.print('Key file created successfully')
Expand All @@ -35,7 +35,7 @@ def load_key_from_root() -> str:
str: API key
"""
try:
with open('../../key.txt', 'r') as f:
with open('key.txt', 'r') as f:
# check if the key is empty
if len(f.read()) == 0:
console.print(
Expand Down

0 comments on commit 8d250fa

Please sign in to comment.