diff --git a/README.md b/README.md index 79527ed..f8656e3 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,6 @@ Terminal-copilot can be called with optional command line arguments: - `-hist`, `--history`: Enables the inclusion of terminal history in the prompt sent to the OpenAI API. May potentially send sensitive information to OpenAI and increase the number of tokens used. - `-j`, `--json`: Output data as JSON instead of using an interactive prompt. - `-c`, `--count`: The number of commands to output when JSON output is specified. -- `-c`, `--count`: The number of commands to output when JSON output is specified. - `-m`, `--model`: The model to use. Defaults to gpt-3.5-turbo. - `-ns`, `--no-stream`: Disable streaming the command into the terminal (by default, streaming is enabled). @@ -59,5 +58,9 @@ Thank you for considering contributing to terminal-copilot! Together, we can mak 3. `python setup.py install` ### Packaging for PyPi -1. `python setup.py sdist bdist_wheel` -2. `twine upload dist/*` +First make sure you have `pip install wheel` and `pip install twine` installed. +Then run the following commands: +0. Modify version in `setup.py` +1. `rm -rf dist` +2. `python setup.py sdist bdist_wheel` +3. `twine upload dist/*` \ No newline at end of file diff --git a/copilot/context.py b/copilot/context.py index 679b09e..e1f0afb 100644 --- a/copilot/context.py +++ b/copilot/context.py @@ -1,9 +1,9 @@ from dataclasses import dataclass -from conversation import Model -from parse_os import OperatingSystem - +from copilot.conversation import Model +from copilot.parse_os import OperatingSystem +# dataclass for context @dataclass class Context: shell: str diff --git a/copilot/main.py b/copilot/main.py index f508fc4..fa1b4e7 100644 --- a/copilot/main.py +++ b/copilot/main.py @@ -9,11 +9,11 @@ import json from copilot import history -from conversation import Conversation -from open_ai_adapter import request_cmds, stream_cmd_into_terminal -from parse_os import parse_operating_system, OperatingSystem -from parse_args import parse_terminal_copilot_args -from messages_builder import Context, build_conversation +from copilot.conversation import Conversation +from copilot.open_ai_adapter import request_cmds, stream_cmd_into_terminal +from copilot.parse_os import parse_operating_system, OperatingSystem +from copilot.parse_args import parse_terminal_copilot_args +from copilot.messages_builder import Context, build_conversation def is_unix_system(): diff --git a/copilot/messages_builder.py b/copilot/messages_builder.py index 1dce329..4e47ab2 100644 --- a/copilot/messages_builder.py +++ b/copilot/messages_builder.py @@ -1,7 +1,7 @@ -from context import Context -from conversation import Conversation -from sample_conversations import unix_fish_sample_conversations -from sample_conversations import unix_bourne_sample_conversations, windows_cmd_sample_conversations +from copilot.context import Context +from copilot.conversation import Conversation +from copilot.sample_conversations import unix_fish_sample_conversations +from copilot.sample_conversations import unix_bourne_sample_conversations, windows_cmd_sample_conversations def user_message(context: Context): diff --git a/copilot/open_ai_adapter.py b/copilot/open_ai_adapter.py index 932da12..511f55c 100644 --- a/copilot/open_ai_adapter.py +++ b/copilot/open_ai_adapter.py @@ -2,8 +2,8 @@ import openai -from conversation import Conversation -from strip import strip_cmd, strip_choices +from copilot.conversation import Conversation +from copilot.strip import strip_cmd, strip_choices def _create_chat_completion(conversation, n, stream=False): diff --git a/copilot/parse_args.py b/copilot/parse_args.py index e018e80..6b59b50 100644 --- a/copilot/parse_args.py +++ b/copilot/parse_args.py @@ -1,6 +1,6 @@ import argparse -from conversation import argparse_model_type, Model +from copilot.conversation import argparse_model_type, Model def parse_terminal_copilot_args(): diff --git a/setup.py b/setup.py index 3edeea1..40aa6e4 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( name ='terminal-copilot', - version ='1.2.2', + version ='1.3.3', author ='Methexis', author_email ='joelkronander@gmail.com', url ='https://github.com/Methexis-Inc/terminal-copilot', @@ -24,12 +24,12 @@ 'copilot=copilot.main:main' ] }, - classifiers =( + classifiers =[ "Programming Language :: Python :: 3", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", - ), - keywords ='terminal copilot openai gpt3', + ], + keywords ='terminal copilot openai gpt3 gpt4 gpt3.5', install_requires = requirements, zip_safe = False ) \ No newline at end of file