Skip to content

Commit

Permalink
Update interpreter version to 1.8 and add interpreter commands support
Browse files Browse the repository at this point in the history
  • Loading branch information
haseeb-heaven committed Jan 5, 2024
1 parent 9282910 commit 5d56405
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -123,6 +123,8 @@ python interpreter.py -md 'code' -m 'gpt-3.5-turbo' -dc

- 📜 Command History: It has the ability to save all the commands as history.

- 📜 Command Mode: Commands entered with '/' are executed as commands like `/execute` or `/clear`.

- 🔄 Mode Selection: It allows you to select the mode of operation. You can choose from `code` for generating code, `script` for generating shell scripts, or `command` for generating single line commands.

- 🧠 Model Selection: You can set the model for code generation. By default, it uses the `code-llama` model.
Expand Down Expand Up @@ -189,6 +191,19 @@ python interpreter.py -m 'gemini-pro' -md 'code'
```python
python interpreter.py -m 'gemini-pro' -md 'vision'
```
# Interpreter Commands 🖥️

Here are the available commands:

- 🚪 `/exit` - Exit the interpreter.
- ▶️ `/execute` - Execute the last code generated.
- 📦 `/install` - Install a package from npm or pip.
- 🔄 `/mode` - Change the mode of interpreter.
- 🔄 `/model` - Change the model for interpreter.
- 🌐 `/language` - Change the language of the interpreter.
- 🧹 `/clear` - Clear the screen.
- 🆘 `/help` - Display this help message.
- 📝 `/version` - Display the version of the interpreter.


## 📖 **Examples**
Expand Down Expand Up @@ -278,6 +293,7 @@ If you're interested in contributing to **Open-Code-Interpreter**, we'd love to
🎉 **v1.5** - Added **GPT 3.5/4** models official Support.</br>
📝 **v1.6** - Updated Code Interpreter for Documents files (**JSON**, **CSV**,**XML**).</br>
🌴 **v1.7** - Added **Gemini Pro Vision** Support for Image Processing.</br>
🌴 **v1.8** - Added **Interpreter Commands Support**.</br>

## 📜 **License**

Expand Down
2 changes: 1 addition & 1 deletion interpreter
Expand Up @@ -27,7 +27,7 @@ def main():
parser.add_argument('--save_code', '-s', action='store_true', help='Save the generated code')
parser.add_argument('--mode', '-md', choices=['code', 'script', 'command','vision'], help='Select the mode (`code` for generating code, `script` for generating shell scripts, `command` for generating single line commands) `vision` for generating text from images')
parser.add_argument('--model', '-m', type=str, default='code-llama', help='Set the model for code generation. (Defaults to gpt-3.5-turbo)')
parser.add_argument('--version', '-v', action='version', version='%(prog)s 1.7')
parser.add_argument('--version', '-v', action='version', version='%(prog)s 1.8')
parser.add_argument('--lang', '-l', type=str, default='python', help='Set the interpreter language. (Defaults to Python)')
parser.add_argument('--display_code', '-dc', action='store_true', help='Display the code in output')
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion interpreter.py
Expand Up @@ -26,7 +26,7 @@ def main():
parser.add_argument('--save_code', '-s', action='store_true', help='Save the generated code')
parser.add_argument('--mode', '-md', choices=['code', 'script', 'command','vision'], help='Select the mode (`code` for generating code, `script` for generating shell scripts, `command` for generating single line commands) `vision` for generating text from images')
parser.add_argument('--model', '-m', type=str, default='code-llama', help='Set the model for code generation. (Defaults to gpt-3.5-turbo)')
parser.add_argument('--version', '-v', action='version', version='%(prog)s 1.7')
parser.add_argument('--version', '-v', action='version', version='%(prog)s 1.8')
parser.add_argument('--lang', '-l', type=str, default='python', help='Set the interpreter language. (Defaults to Python)')
parser.add_argument('--display_code', '-dc', action='store_true', help='Display the code in output')
args = parser.parse_args()
Expand Down
2 changes: 1 addition & 1 deletion libs/interpreter_lib.py
Expand Up @@ -27,7 +27,7 @@
class Interpreter:
logger = None
client = None
interpreter_version = "1.7"
interpreter_version = "1.8"

def __init__(self, args):
self.args = args
Expand Down
2 changes: 1 addition & 1 deletion libs/utility_manager.py
Expand Up @@ -178,7 +178,7 @@ def get_last_code_history(self, language='python'):
raise

def display_help(self):
display_markdown_message("Interpreter - v1.7\n\
display_markdown_message("Interpreter\n\
\n\
Commands available:\n\
\n\
Expand Down

0 comments on commit 5d56405

Please sign in to comment.