Skip to content

Commit

Permalink
1.3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelKronander committed Sep 21, 2023
1 parent 4babf89 commit 00611ef
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand All @@ -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/*`
6 changes: 3 additions & 3 deletions copilot/context.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 5 additions & 5 deletions copilot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down
8 changes: 4 additions & 4 deletions copilot/messages_builder.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
4 changes: 2 additions & 2 deletions copilot/open_ai_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion copilot/parse_args.py
Original file line number Diff line number Diff line change
@@ -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():
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name ='terminal-copilot',
version ='1.2.2',
version ='1.3.3',
author ='Methexis',
author_email ='[email protected]',
url ='https://github.com/Methexis-Inc/terminal-copilot',
Expand All @@ -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
)

0 comments on commit 00611ef

Please sign in to comment.