Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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