title | description | sidebar_label | sidebar_position |
---|---|---|---|
Use CodeGate with Open Interpreter |
Configure Open Interpreter to use CodeGate |
Open Interpreter |
70 |
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
Open Interpreter lets LLMs run code locally through a ChatGPT-like interface in your terminal.
CodeGate works with OpenAI and compatible APIs through Open Interpreter.
You can also configure CodeGate muxing to select your provider and model using workspaces.
:::note
This guide assumes you have already installed Open Interpreter using their installation instructions.
:::
To configure Open Interpreter to send requests through CodeGate, run
interpreter
with the
API base setting
set to CodeGate's local API port, http://localhost:8989/<provider>
.
When you run interpreter
, the API key parameter is required but the value is
not used. The --model
setting must start with openai/
but the actual model
is determined by your CodeGate workspace.
</TabItem>
<TabItem value="dev" label="v1.0 dev branch">
If you are running Open Interpreter's v1.0
[development branch](https://github.com/OpenInterpreter/open-interpreter/tree/development):
```bash
interpreter --api-base http://localhost:8989/v1/mux --api-key fake-value-not-used --model openai/fake-value-not-used
```
</TabItem>
</TabItem>
<TabItem value="dev" label="v1.0 dev branch">
If you are running Open Interpreter's v1.0
[development branch](https://github.com/OpenInterpreter/open-interpreter/tree/development):
```bash
interpreter --api-base http://localhost:8989/openai --api-key YOUR_API_KEY --model MODEL_NAME
```
</TabItem>
Replace YOUR_API_KEY
with your OpenAI API key, and MODEL_NAME
with your
desired model, like openai/gpt-4o-mini
.
:::info
The --model
parameter value must start with openai/
for CodeGate to properly
handle the request.
:::
To verify that you've successfully connected Open Interpreter to CodeGate, type
codegate version
into the Open Interpreter chat. You should receive a response
like "CodeGate version 0.1.16".
Learn more about CodeGate's features and explore the dashboard.