Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devv #5

Merged
merged 83 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
5b6080f
Fixed a bug in setup_text_llm
kylehh Sep 29, 2023
6ea4cb6
chore: update test suite
ericrallen Sep 28, 2023
1f5f05f
@EricRAllen's test suite
KillianLucas Oct 5, 2023
443f765
Merge pull request #560 from kylehh/bug_setup_text_llm
KillianLucas Oct 6, 2023
11200b2
New documentation site: https://docs.openinterpreter.com/
KillianLucas Oct 8, 2023
370b3ef
feat: add %tokens magic command that counts tokens via tiktoken
ericrallen Oct 8, 2023
a1895e7
feat: add estimated cost from litellm to token counter
ericrallen Oct 8, 2023
ba72cb7
fix: add note about only including current messages
ericrallen Oct 8, 2023
1115cc6
chore: add %tokens to README
ericrallen Oct 8, 2023
eef23fd
fix: include generated code in token count; round to 6 decimals
ericrallen Oct 8, 2023
a294b34
Put quotes around sys.executable (bug fix)
KillianLucas Oct 9, 2023
55344ba
Merge branch 'main' of https://github.com/KillianLucas/open-interpreter
KillianLucas Oct 9, 2023
86a6430
Merge pull request #607 from InterwebAlchemy/feature/token-count
KillianLucas Oct 9, 2023
7847843
Added powershell language
Oct 10, 2023
08899a1
Adding Mistral support
KillianLucas Oct 10, 2023
29eb06c
Merge branch 'main' of https://github.com/KillianLucas/open-interpreter
KillianLucas Oct 10, 2023
5c2e01e
Removed /archive, adding Mistral support
KillianLucas Oct 10, 2023
130d367
Removed /archive, adding Mistral support
KillianLucas Oct 10, 2023
4513400
First version of ooba-powered setup_local_text_llm
KillianLucas Oct 10, 2023
ffc2d68
First version of ooba-powered setup_local_text_llm
KillianLucas Oct 10, 2023
e37c125
Second version of ooba-powered setup_local_text_llm
KillianLucas Oct 10, 2023
856835e
Testing tests
KillianLucas Oct 10, 2023
8d4e92d
More flexible tests
KillianLucas Oct 10, 2023
6574e01
Paused math test
KillianLucas Oct 10, 2023
eb7b7b5
Improved tests
KillianLucas Oct 11, 2023
b0fb3d7
feat: add support for loading different config.yaml files
ericrallen Oct 9, 2023
6f788e7
feat: add optional prompt token/cost estimate to %tokens
ericrallen Oct 10, 2023
f299c9e
Paused math test
KillianLucas Oct 11, 2023
97251c6
Switched tests to turbo
KillianLucas Oct 11, 2023
baf36b1
More Ooba
KillianLucas Oct 11, 2023
492a62e
Using Eric's tests
KillianLucas Oct 11, 2023
8ec9492
Merge pull request #609 from InterwebAlchemy/feature/more-configs
KillianLucas Oct 11, 2023
b7315d2
Merge branch 'feature/estimate-tokens' of https://github.com/Interweb…
KillianLucas Oct 11, 2023
acef59e
Merge branch 'InterwebAlchemy-feature/estimate-tokens'
KillianLucas Oct 11, 2023
d6829b0
Deleted archive files
KillianLucas Oct 11, 2023
fade9ff
Deleted archive files, adding @DaveChini Powershell
KillianLucas Oct 11, 2023
4945e65
Merge branch 'main' into local
KillianLucas Oct 11, 2023
c9aeda5
The Local Update
KillianLucas Oct 11, 2023
a9bf6a8
The Local Update
KillianLucas Oct 11, 2023
7b43471
Alignment
KillianLucas Oct 11, 2023
798de26
Alignment
KillianLucas Oct 11, 2023
c93eb67
Fixed shell blocks not ending on error bug
KillianLucas Oct 11, 2023
358728b
Added useful flags to generator
KillianLucas Oct 11, 2023
8d465fe
Fixed Mistral HTML entities + backticks problem
KillianLucas Oct 11, 2023
f01ef6b
Fixed Mistral HTML entities + backticks problem
KillianLucas Oct 11, 2023
687b895
OpenAI messages -> text LLMs are now non-function-calling
KillianLucas Oct 11, 2023
88a0c6b
OpenAI messages -> text LLMs are now non-function-calling
KillianLucas Oct 11, 2023
e397265
Better messaging
KillianLucas Oct 11, 2023
9890b12
Incremented version, updated litellm
KillianLucas Oct 11, 2023
d815394
Skipping nested test
KillianLucas Oct 11, 2023
a66ca33
Exposed Procedures
KillianLucas Oct 12, 2023
27ddc8d
Merge branch 'main' of https://github.com/KillianLucas/open-interpreter
KillianLucas Oct 12, 2023
8081961
Exposed get_relevant_procedures_string
KillianLucas Oct 12, 2023
3c923e5
Better procedures exposure
KillianLucas Oct 12, 2023
42a6905
Better procedures exposure
KillianLucas Oct 12, 2023
771274f
Exits properly in colab
KillianLucas Oct 12, 2023
15c4ecf
Better exposed procedures
KillianLucas Oct 12, 2023
c3d4f06
Better exposed procedures
KillianLucas Oct 12, 2023
cb5e510
More powerful reset function, incremented version
KillianLucas Oct 12, 2023
57b28a7
WELCOME HACKERS!
KillianLucas Oct 12, 2023
d42e13c
Welcome hackers!
KillianLucas Oct 12, 2023
8724240
Fix typo in setup_text_llm.py
eltociear Oct 12, 2023
4c06964
Welcome hackers!
KillianLucas Oct 12, 2023
1e8a665
The OI hackathon has wrapped! Thank you everyone!
KillianLucas Oct 13, 2023
89018c6
THE HACKATHON IS ON
KillianLucas Oct 13, 2023
1b8a42a
● The Open Interpreter Hackathon has been extended!
KillianLucas Oct 13, 2023
c32a5ed
Join the hackathon! https://lablab.ai/event/open-interpreter-hackathon
KillianLucas Oct 13, 2023
f52e83b
Thank you hackathon participants!
KillianLucas Oct 14, 2023
8a3402c
Fix "depracated" typo
jamiew Oct 15, 2023
50aede2
Update python.py
leifktaylor Oct 15, 2023
b5ac239
Update python.py
leifktaylor Oct 15, 2023
7fb99e5
Merge pull request #642 from jamiew/main
KillianLucas Oct 16, 2023
fd45f6c
Merge pull request #643 from leifktaylor/leifktaylor-patch-1
KillianLucas Oct 16, 2023
30f8114
resolve merge conflicts
unaidedelf8777 Oct 16, 2023
93df2ad
Merge pull request #632 from eltociear/patch-2
KillianLucas Oct 16, 2023
8813d26
Fix indentation in language_map.py
smwyzi Oct 17, 2023
63b3c27
Merge pull request #648 from smwyzi/main
KillianLucas Oct 18, 2023
ab5259d
Made semgrep optional, updated packages, pinned LiteLLM
KillianLucas Oct 19, 2023
fdf0af3
Fixed end_of_message and end_of_code flags
KillianLucas Oct 19, 2023
e770bd0
Add container timeout for easier server integration of OI. controllab…
unaidedelf8777 Oct 20, 2023
df2a44f
Merge remote-tracking branch 'upstream/main' into devv
unaidedelf8777 Oct 20, 2023
3907b16
Update things, resolve merge conflicts.
unaidedelf8777 Oct 20, 2023
295ddfa
fixed the tests, since they imported and assumed that was a instance,…
unaidedelf8777 Oct 20, 2023
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
99 changes: 90 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

![banner 2](https://github.com/KillianLucas/open-interpreter/assets/63927363/c1aec011-6d3c-4960-ab55-749326b8a7c9)
<h1 align="center">● Open Interpreter</h1>

<p align="center">
<a href="https://discord.gg/6p3fD6rBVm">
Expand All @@ -9,14 +8,19 @@
<a href="README_ZH.md"><img src="https://img.shields.io/badge/文档-中文版-white.svg" alt="ZH doc"/></a>
<a href="README_IN.md"><img src="https://img.shields.io/badge/Hindi-white.svg" alt="IN doc"/></a>
<img src="https://img.shields.io/static/v1?label=license&message=MIT&color=white&style=flat" alt="License"/>
<br><br>
<b>Open Interpreter</b> lets language models run code on your computer.<br>
<br>
<br>
<b>Let language models run code on your computer.</b><br>
An open-source, locally running implementation of OpenAI's Code Interpreter.<br>
<br><a href="https://openinterpreter.com">Get early access to the desktop app</a>‎ ‎ |‎ ‎ <b><a href="https://docs.openinterpreter.com/">Read our new docs</a></b><br>
</p>

<br>

![poster](https://github.com/KillianLucas/open-interpreter/assets/63927363/08f0d493-956b-4d49-982e-67d4b20c4b56)

<br>

```shell
pip install open-interpreter
```
Expand Down Expand Up @@ -236,13 +240,14 @@ In the interactive mode, you can use the below commands to enhance your experien

**Available Commands:**
• `%debug [true/false]`: Toggle debug mode. Without arguments or with 'true', it
enters debug mode. With 'false', it exits debug mode.
• `%reset`: Resets the current session.
• `%undo`: Remove previous messages and its response from the message history.
enters debug mode. With 'false', it exits debug mode.
• `%reset`: Resets the current session.
• `%undo`: Remove previous messages and its response from the message history.
• `%save_message [path]`: Saves messages to a specified JSON path. If no path is
provided, it defaults to 'messages.json'.
provided, it defaults to 'messages.json'.
• `%load_message [path]`: Loads messages from a specified JSON path. If no path
is provided, it defaults to 'messages.json'.
is provided, it defaults to 'messages.json'.
• `%tokens [prompt]`: Calculate the tokens used by the current conversation's messages and estimate their cost, and optionally calculate the tokens and estimated cost of a `prompt` if one is provided. Relies on [LiteLLM's `cost_per_token()` method](https://docs.litellm.ai/docs/completion/token_usage#2-cost_per_token) for estimated cost.
• `%help`: Show the help message.

### Configuration
Expand All @@ -257,6 +262,82 @@ Run the following command to open the configuration file:
interpreter --config
```

#### Multiple Configuration Files

Open Interpreter supports multiple `config.yaml` files, allowing you to easily switch between configurations via the `--config_file` argument.

**Note**: `--config_file` accepts either a file name or a file path. File names will use the default configuration directory, while file paths will use the specified path.

To create or edit a new configuration, run:

```
interpreter --config --config_file $config_path
```

To have Open Interpreter load a specific configuration file run:

```
interpreter --config_file $config_path
```

**Note**: Replace `$config_path` with the name of or path to your configuration file.

##### CLI Example

1. Create a new `config.turbo.yaml` file
```
interpreter --config --config_file config.turbo.yaml
```
2. Edit the `config.turbo.yaml` file to set `model` to `gpt-3.5-turbo`
3. Run Open Interpreter with the `config.turbo.yaml` configuration
```
interpreter --config_file config.turbo.yaml
```

##### Python Example

You can also load configuration files when calling Open Interpreter from Python scripts:

```python
import os
import interpreter

currentPath = os.path.dirname(os.path.abspath(__file__))
config_path=os.path.join(currentPath, './config.test.yaml')

interpreter.extend_config(config_path=config_path)

message = "What operating system are we on?"

for chunk in interpreter.chat(message, display=False, stream=True):
print(chunk)
```

## Sample FastAPI Server

The generator update enables Open Interpreter to be controlled via HTTP REST endpoints:

```python
# server.py

from fastapi import FastAPI, Response
import interpreter

app = FastAPI()

@app.get("/chat")
def chat_endpoint(message):
return Response(interpreter.chat(message, stream=True), media_type="text/event-stream")

@app.get("/history")
def history_endpoint():
return interpreter.messages
```
```shell
pip install fastapi uvicorn
uvicorn server:app --reload
```

## Safety Notice

Since generated code is executed in your local environment, it can interact with your files and system settings, potentially leading to unexpected outcomes like data loss or security risks.
Expand Down
43 changes: 0 additions & 43 deletions interpreter/archive/(wip)_model_explorer.py

This file was deleted.

8 changes: 0 additions & 8 deletions interpreter/archive/README.md

This file was deleted.

212 changes: 0 additions & 212 deletions interpreter/archive/cli.py

This file was deleted.

Loading