File tree Expand file tree Collapse file tree 2 files changed +62
-1
lines changed Expand file tree Collapse file tree 2 files changed +62
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ def make_executable_command(command: str) -> str:
1616 if command .endswith ('\n ' ):
1717 command = command [:- 1 ]
1818 command = command .strip ()
19+ command = command .split ('User: ' )[0 ]
1920 return command
2021
2122
@@ -32,7 +33,7 @@ def get_os() -> str:
3233def make_prompt (requirements : str ) -> str :
3334 return f'''You are now a translater from human language to { get_os } shell command.
3435 No explanation required, respond with only the raw shell command.
35- What should I type to shell for: { requirements } '''
36+ What should I type to shell for: { requirements } , in one line. '''
3637
3738
3839app = typer .Typer ()
Original file line number Diff line number Diff line change 1+ diff --git a/README.md b/README.md
2+ index 8c32059..80d4810 100644
3+ --- a/README.md
4+ +++ b/README.md
5+ @@ -1,40 +1,42 @@
6+ -# AiShell
7+ +# AiShell 🤖
8+
9+ A simple Python code that connects to OpenAI's ChatGPT and executes the returned results.
10+
11+ -## Examples
12+ +## Examples 💡
13+
14+ -### Simple Utility commands
15+ +### Simple Utility commands 🛠
16+
17+ 
18+
19+ -### A git helper
20+ +### A git helper 💻
21+
22+ 
23+
24+ -### A powerful git assistant: "add all files & amend last commit & push"
25+ +### A powerful git assistant 💪🏻👨💻💻: "add all files & amend last commit & push"
26+
27+ 
28+
29+ +## Installation
30+
31+ -## Prerequisites
32+ +```sh
33+ +curl -sL https://raw.githubusercontent.com/code-yeongyu/AiShell/master/install.sh | sh
34+ +```
35+ +
36+ +## Prerequisites 📚
37+
38+ - Python 3.9.5
39+ - Poetry
40+ - OpenAI API Key
41+
42+ -## Getting Started
43+ +## Getting Started 🚀
44+
45+ 1. Create account on OpenAI
46+ 1. Go to <https://platform.openai.com/account/api-keys>, Copy API key
47+ -1. Set the API key as an environment variable OPENAI_API_KEY or inject it directly into the code by editing it.
48+ -1. Clone this repository to your local machine using git clone <repository-url>
49+ -1. Install the dependencies by running poetry install in your terminal
50+ -1. Start AiShell by running poetry run python3 aishell/main.py
51+ +1. Set the API key as an environment variable `OPENAI_API_KEY` or inject it directly into the code by editing it.
52+ +1. [Install](#installation)
53+
54+ -## Contributions
55+ +## Contributions 💬
56+
57+ Feel free to contribute to AiShell by adding more functionality or fixing bugs. Some suggestions for contributions include:
58+
59+ -- Adding the ability to execute AiShell as a system command aishell <command>
60+ - Publishing AiShell to PyPI so that others can easily download and use it
You can’t perform that action at this time.
0 commit comments