Skip to content

dbpunk-labs/octogen

This branch is 1 commit ahead of main.

Folders and files

NameName
Last commit message
Last commit date
Nov 7, 2023
Oct 16, 2023
Dec 13, 2023
Nov 4, 2023
Oct 23, 2023
Oct 7, 2023
Nov 5, 2023
Oct 17, 2023
Sep 12, 2023
Oct 20, 2023
Oct 31, 2023
Dec 13, 2023
Nov 12, 2023
Dec 13, 2023
Oct 27, 2023
Oct 29, 2023
Nov 12, 2023
Oct 24, 2023
Oct 18, 2023
Sep 24, 2023
Sep 17, 2023
Oct 27, 2023
Oct 27, 2023
Aug 5, 2024
Oct 19, 2023
Feb 24, 2024

Repository files navigation

GitHub Workflow Status (with event) PyPI - Version PyPI - Downloads Gitter

ไธญๆ–‡

Octogen

an open-source code interpreter
ไธ€ๆฌพๅผ€ๆบๅฏๆœฌๅœฐ้ƒจ็ฝฒ็š„ไปฃ็ ่งฃ้‡Šๅ™จ

News

  • 2023-10-24 ๐ŸŽ‰ Octogen v0.5.0 has been released ๐ŸŽ‰
octogen_demo.mp4
Supported OSs Supported Interpreters Supported Dev Enviroment

Getting Started

Requirement

  • python 3.10 and above
  • pip
  • docker 24.0.0 and above, or podman

To deploy Octogen, the user needs permission to run Docker commands.
To use codellama, your host must have at least 8 CPUs and 16 GB of RAM.

Install the octogen on your local computer

  1. Install og_up
pip install og_up
  1. Set up the Octogen service
og_up

You have the following options to select

  • OpenAI , recommanded for daily use
  • Azure OpenAI
  • CodeLlama,
  • Octogen agent services powered by GPT4 and Codellama 34B

The default is using docker as container engine. use podman with flag --use_podman

  1. Execute the command og, you will see the following output
Welcome to use octogenโค๏ธ . To ask a programming question, simply type your question and press esc + enter
You can use /help to look for help

[1]๐ŸŽง>

Development

Prepare the environment

git clone https://github.com/dbpunk-labs/octogen.git
cd octogen
python3 -m venv octogen_venv
source octogen_venv/bin/activate
pip install -r requirements.txt

Run the sandbox including Agent with mock model and Kernel

$ bash start_sandbox.sh
$ og

Welcome to use octogenโค๏ธ . To ask a programming question, simply type your question and press esc + 
enter
Use /help for help

[1]๐ŸŽง>hello
โ•ญโ”€ ๐Ÿ™Octogen โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                                                     โ”‚
โ”‚  0 ๐Ÿง  how can I help you today?                                                                     โ”‚
โ”‚                                                                                                     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
[2]๐ŸŽง>

  • To use openai for development, just update the config in the start_sandbox.sh with the example of openai-env.example
  • To use azure openai for development, just update the config in the start_sandbox.sh with the example of azure-env.example
  • To use codellama for development, just update the config in the start_sandbox.sh with the example of codellama-env.example

Supported API Service

name type status installation
Openai GPT 3.5/4 LLM โœ… fully supported use og_up then choose the OpenAI
Azure Openai GPT 3.5/4 LLM โœ… fully supported use og_up then choose the Azure OpenAI
LLama.cpp Server LLM โœ”๏ธ supported use og_up then choose the CodeLlama
Octopus Agent Service Code Interpreter โœ… supported apply api key from octogen.dev then use og_up then choose the Octogen

The internal of local deployment

octogen-internal

  • Octogen Kernel: The code execution engine, based on notebook kernels.
  • Octogen Agent: Manages client requests, uses ReAct to process complex tasks, and stores user-assembled applications.
  • Octogen Terminal Cli: Accepts user requests, sends them to the Agent, and renders rich results. Currently supports Discord, iTerm2, and Kitty terminals.

Features

  • Automatically execute AI-generated code in a Docker environment.
  • Experiment feature, render images in iTerm2 and kitty.
  • Upload files with the /up command and you can use it in your prompt
  • Experiment feature, assemble code blocks into an application and you can run the code directly by /run command
  • Support copying output to the clipboard with /cc command
  • Support prompt histories stored in the octopus cli

if you have any feature suggestion. please create a discuession to talk about it

Roadmap