From e30011ac94cd8a31678568046b8bacc4407268d6 Mon Sep 17 00:00:00 2001 From: Dan Barr Date: Wed, 5 Feb 2025 17:02:34 -0500 Subject: [PATCH] Add Open Interpreter docs --- docs/about/changelog.md | 6 ++ docs/index.md | 3 + docs/integrations/open-interpreter.mdx | 94 ++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 docs/integrations/open-interpreter.mdx diff --git a/docs/about/changelog.md b/docs/about/changelog.md index 9cd569b..e4ee855 100644 --- a/docs/about/changelog.md +++ b/docs/about/changelog.md @@ -13,6 +13,12 @@ Major features and changes are noted here. To review all updates, see the Related: [Upgrade CodeGate](../how-to/install.md#upgrade-codegate) +- **New integration: Open Interpreter** - xx Feb\ + 2025 CodeGate v0.1.16 introduces support for + [Open Interpreter](https://github.com/openinterpreter/open-interpreter) with + OpenAI-compatible APIs. Review the + [integration guide](../integrations/open-interpreter.mdx) to get started. + - **New integration: Cline** - 28 Jan, 2025\ CodeGate version 0.1.14 adds support for [Cline](https://cline.bot/) with Anthropic, OpenAI, Ollama, and LM Studio. See the diff --git a/docs/index.md b/docs/index.md index 1ca1bc8..33643fe 100644 --- a/docs/index.md +++ b/docs/index.md @@ -60,6 +60,9 @@ AI coding assistants / IDEs: CodeGate supports Ollama, Anthropic, OpenAI-compatible APIs, and LM Studio with Cline. +- **[Open Interpreter](./integrations/open-interpreter.mdx)** with + OpenAI-compatible APIs + As the project evolves, we plan to add support for more IDE assistants and AI model providers. diff --git a/docs/integrations/open-interpreter.mdx b/docs/integrations/open-interpreter.mdx new file mode 100644 index 0000000..84ee43f --- /dev/null +++ b/docs/integrations/open-interpreter.mdx @@ -0,0 +1,94 @@ +--- +title: Use CodeGate with Open Interpreter +description: Configure Open Interpreter to use CodeGate +sidebar_label: Open Interpreter +sidebar_position: 70 +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +[Open Interpreter](https://github.com/openinterpreter/open-interpreter) lets +LLMs run code locally through a ChatGPT-like interface in your terminal. + +CodeGate works with [OpenAI](https://openai.com/api/) and OpenAI-compatible APIs +through Open Interpreter. + +:::note + +This guide assumes you have already installed Open Interpreter using their +[installation instructions](https://docs.openinterpreter.com/getting-started/setup). + +::: + +## Configure Open Interpreter to use CodeGate + +To configure Open Interpreter to send requests through CodeGate, run +`interpreter` with the +[API base setting](https://docs.openinterpreter.com/settings/all-settings#api-base) +set to CodeGate's local API port, `http://localhost:8989/openai`. + +By default, CodeGate connects to the [OpenAI API](https://openai.com/api/). To +use a different OpenAI-compatible endpoint, set the `CODEGATE_OPENAI_URL` +[configuration parameter](../how-to/configure.md#config-parameters) when you run +CodeGate. + + + + ```bash + interpreter --api_base http://localhost:8989/openai --api_key YOUR_API_KEY --model MODEL_NAME + ``` + + + + 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 + ``` + + + + +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. + +::: + +## Verify configuration + +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". + +## Next steps + +Learn more about [CodeGate's features](../features/index.mdx) and explore the +[dashboard](../how-to/dashboard.md). + +## Remove CodeGate + +If you decide to stop using CodeGate, follow these steps to remove it and revert +your environment. + +1. Quit Open Interpreter (Ctrl+C) and re-run it without + the API base parameter. + +1. Stop and remove the CodeGate container: + + ```bash + docker stop codegate && docker rm codegate + ``` + +1. If you launched CodeGate with a persistent volume, delete it to remove the + CodeGate database and other files: + + ```bash + docker volume rm codegate_volume + ```