Skip to content

Commit 6c08d90

Browse files
authored
Big docs update, new setup tutorial
Docs update
2 parents 76ea754 + 6dee602 commit 6c08d90

File tree

11 files changed

+70
-58
lines changed

11 files changed

+70
-58
lines changed

docs/code-execution/settings.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ title: Settings
44

55
The `interpreter.computer` is responsible for executing code.
66

7-
[Click here to view `interpreter.computer` settings.](https://docs.openinterpreter.com/settings/all-settings#computer)
7+
[Click here](https://docs.openinterpreter.com/settings/all-settings#computer) to view `interpreter.computer` settings.

docs/guides/basic-usage.mdx

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,20 @@ title: Basic Usage
2828

2929
### Interactive Chat
3030

31-
To start an interactive chat in your terminal, either run `interpreter` from the command line:
31+
To start an interactive chat in your terminal, either run `interpreter` from the command line or `interpreter.chat()` from a .py file.
3232

33-
```shell
33+
<CodeGroup>
34+
35+
```shell Terminal
3436
interpreter
3537
```
3638

37-
Or `interpreter.chat()` from a .py file:
38-
39-
```python
39+
```python Python
4040
interpreter.chat()
4141
```
4242

43+
</CodeGroup>
44+
4345
---
4446

4547
### Programmatic Chat
@@ -60,18 +62,22 @@ interpreter.chat("These look great but can you make the subtitles bigger?")
6062

6163
### Start a New Chat
6264

63-
In your terminal, Open Interpreter behaves like ChatGPT and will not remember previous conversations. Simply run `interpreter` to start a new chat:
65+
In your terminal, Open Interpreter behaves like ChatGPT and will not remember previous conversations. Simply run `interpreter` to start a new chat.
6466

65-
```shell
67+
In Python, Open Interpreter remembers conversation history. If you want to start fresh, you can reset it.
68+
69+
<CodeGroup>
70+
71+
```shell Terminal
6672
interpreter
6773
```
6874

69-
In Python, Open Interpreter remembers conversation history. If you want to start fresh, you can reset it:
70-
71-
```python
75+
```python Python
7276
interpreter.messages = []
7377
```
7478

79+
</CodeGroup>
80+
7581
---
7682

7783
### Save and Restore Chats
@@ -80,13 +86,15 @@ In your terminal, Open Interpreter will save previous conversations to `<your ap
8086

8187
You can resume any of them by running `--conversations`. Use your arrow keys to select one , then press `ENTER` to resume it.
8288

83-
```shell
89+
In Python, `interpreter.chat()` returns a List of messages, which can be used to resume a conversation with `interpreter.messages = messages`.
90+
91+
<CodeGroup>
92+
93+
```shell Terminal
8494
interpreter --conversations
8595
```
8696

87-
In Python, `interpreter.chat()` returns a List of messages, which can be used to resume a conversation with `interpreter.messages = messages`:
88-
89-
```python
97+
```python Python
9098
# Save messages to 'messages'
9199
messages = interpreter.chat("My name is Killian.")
92100

@@ -97,6 +105,8 @@ interpreter.messages = []
97105
interpreter.messages = messages
98106
```
99107

108+
</CodeGroup>
109+
100110
---
101111

102112
### Configure Default Settings

docs/guides/profiles.mdx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,3 @@ interpreter.loop = True
3131
There are many settings that can be configured. [See them all
3232
here](/settings/all-settings)
3333
</Tip>
34-
35-
## Helpful settings for local models
36-
37-
Local models benefit from more coercion and guidance. This verbosity of adding extra context to messages can impact the conversational experience of Open Interpreter. The following settings allow templates to be applied to messages to improve the steering of the language model while maintaining the natural flow of conversation.
38-
39-
`interpreter.user_message_template` allows users to have their message wrapped in a template. This can be helpful steering a language model to a desired behaviour without needing the user to add extra context to their message.
40-
41-
`interpreter.always_apply_user_message_template` has all user messages to be wrapped in the template. If False, only the last User message will be wrapped.
42-
43-
`interpreter.code_output_template` wraps the output from the computer after code is run. This can help with nudging the language model to continue working or to explain outputs.
44-
45-
`interpreter.empty_code_output_template` is the message that is sent to the language model if code execution results in no output.

docs/guides/running-locally.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ interpreter.llm.api_base = "http://localhost:11434"
4949
interpreter.chat("how many files are on my desktop?")
5050
```
5151

52+
## Helpful settings for local models
53+
54+
Local models benefit from more coercion and guidance. This verbosity of adding extra context to messages can impact the conversational experience of Open Interpreter. The following settings allow templates to be applied to messages to improve the steering of the language model while maintaining the natural flow of conversation.
55+
56+
`interpreter.user_message_template` allows users to have their message wrapped in a template. This can be helpful steering a language model to a desired behaviour without needing the user to add extra context to their message.
57+
58+
`interpreter.always_apply_user_message_template` has all user messages to be wrapped in the template. If False, only the last User message will be wrapped.
59+
60+
`interpreter.code_output_template` wraps the output from the computer after code is run. This can help with nudging the language model to continue working or to explain outputs.
61+
62+
`interpreter.empty_code_output_template` is the message that is sent to the language model if code execution results in no output.
63+
5264
<Info>
5365
Other configuration settings are explained in
5466
[Settings](/settings/all-settings).

docs/language-models/introduction.mdx

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,20 @@ For this reason, we recommend starting with a **hosted** model, then switching t
1010

1111
<CardGroup>
1212

13-
<Card
14-
title="Hosted setup"
15-
icon="cloud"
16-
href="/language-models/hosted-models"
17-
>
13+
<Card title="Hosted setup" icon="cloud" href="/language-models/hosted-models">
1814
Connect to a hosted language model like GPT-4 **(recommended)**
1915
</Card>
2016

21-
<Card
22-
title="Local setup"
23-
icon="microchip"
24-
href="/language-models/local-models"
25-
>
17+
<Card title="Local setup" icon="microchip" href="/language-models/local-models">
2618
Setup a local language model like Mistral
2719
</Card>
2820

2921
</CardGroup>
3022

31-
<br/>
32-
<br/>
23+
<br />
24+
<br />
3325

34-
<span class="opacity-50">Thank you to the incredible [LiteLLM](https://litellm.ai/) team for their efforts in connecting Open Interpreter to hosted providers.</span>
26+
<Info>
27+
Thank you to the incredible [LiteLLM](https://litellm.ai/) team for their
28+
efforts in connecting Open Interpreter to hosted providers.
29+
</Info>

docs/language-models/local-models/janai.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ interpreter.context_window = 5000
4949
```
5050

5151
</CodeGroup>
52+
53+
<Warning>
54+
If Jan is producing strange output, or no output at all, make sure to update
55+
to the latest version and clean your cache.
56+
</Warning>

docs/language-models/settings.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ title: Settings
44

55
The `interpreter.llm` is responsible for running the language model.
66

7-
[Click here to view `interpreter.llm` settings.](/settings/all-settings#language-model)
7+
[Click here](/settings/all-settings#language-model) to view `interpreter.llm` settings.

docs/mint.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@
9797
{
9898
"group": "Code Execution",
9999
"pages": [
100-
"code-execution/settings",
101100
"code-execution/usage",
102101
"code-execution/computer-api",
103-
"code-execution/custom-languages"
102+
"code-execution/custom-languages",
103+
"code-execution/settings"
104104
]
105105
},
106106
{

docs/safety/introduction.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ Safety is a top priority for us at Open Interpreter. Running LLM generated code
1414

1515
## Notice
1616

17-
Open Interpreter is not responsible for any damage caused by using the package. These safety measures provide no guarantees of safety or security. Please be careful when running code generated by Open Interpreter, and make sure you understand what it will do before running it.
17+
<Warning>
18+
Open Interpreter is not responsible for any damage caused by using the
19+
package. These safety measures provide no guarantees of safety or security.
20+
Please be careful when running code generated by Open Interpreter, and make
21+
sure you understand what it will do before running it.
22+
</Warning>

docs/settings/all-settings.mdx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ interpreter --help
393393

394394
</CodeGroup>
395395

396-
### Force Task Completion
396+
### Loop (Force Task Completion)
397397

398398
Runs Open Interpreter in a loop, requiring it to admit to completing or failing every task.
399399

@@ -622,8 +622,6 @@ This property holds a list of `messages` between the user and the interpreter.
622622

623623
You can use it to restore a conversation:
624624

625-
<CodeGroup>
626-
627625
```python
628626
interpreter.chat("Hi! Can you print hello world?")
629627
@@ -652,8 +650,6 @@ print(interpreter.messages)
652650
interpreter.messages = messages # A list that resembles the one above
653651
```
654652

655-
</CodeGroup>
656-
657653
### User Message Template
658654

659655
A template applied to the User's message. `{content}` will be replaced with the user's message, then sent to the language model.

0 commit comments

Comments
 (0)