Skip to content

Commit

Permalink
Fix install (#20)
Browse files Browse the repository at this point in the history
* bump

* fix installation
  • Loading branch information
adamyodinsky authored Apr 3, 2023
1 parent fd61c6c commit 60c498f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "terminalgpt"
version = "1.0.13"
version = "1.0.14"
description = "AI chat asistent in your terminal powered by OpenAI GPT-3.5"
authors = ["Adam Yodinsky <[email protected]>"]
keywords=["ai", "chat", "terminal", "openai", "gpt3", "chatGPT", "assistant", "gpt3.5", "terminalGPT", "gpt-3.5-turbo"]
Expand Down
12 changes: 8 additions & 4 deletions terminalgpt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ def cli(ctx):
)
ctx.obj["TOKEN_LIMIT"] = config.API_TOKEN_LIMIT - config.SAFETY_BUFFER

encryption.check_api_key()
key = encryption.get_encryption_key(config.KEY_PATH)
openai.api_key = encryption.decrypt(config.SECRET_PATH, key)


@click.command(
help="Creating a secret api key for the chatbot."
Expand Down Expand Up @@ -73,6 +69,10 @@ def install():
def new(ctx):
"""Start a new conversation."""

encryption.check_api_key()
key = encryption.get_encryption_key(config.KEY_PATH)
openai.api_key = encryption.decrypt(config.SECRET_PATH, key)

messages = [
config.INIT_SYSTEM_MESSAGE,
]
Expand All @@ -91,6 +91,10 @@ def new(ctx):
def load(ctx):
"""Load a previous conversation."""

encryption.check_api_key()
key = encryption.get_encryption_key(config.KEY_PATH)
openai.api_key = encryption.decrypt(config.SECRET_PATH, key)

# get conversations list
conversations = conv.get_conversations()

Expand Down

0 comments on commit 60c498f

Please sign in to comment.