From 98f9364397ae7d5ad641aebb68d48cc9942a0103 Mon Sep 17 00:00:00 2001 From: imotai Date: Mon, 2 Oct 2023 08:31:48 +0800 Subject: [PATCH] feat: add openai , azure openai and codellama env sample --- README.md | 68 +++++++++++++++++---------------- env_sample/azure_env.sample | 2 + env_sample/codellama_env.sample | 14 +++++++ env_sample/openai_env.sample | 2 + 4 files changed, 54 insertions(+), 32 deletions(-) create mode 100644 env_sample/codellama_env.sample diff --git a/README.md b/README.md index b927b58..20f70bb 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,42 @@ 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]๐ŸŽง> + +``` + +Use openai for development, just update the config in the `start_sandbox.sh` with the example of [openai-env.example](./env_sample/openai_env.sample) +Use azure openai for development, just update the config in the `start_sandbox.sh` with the example of [azure-env.example](./env_sample/azure_env.sample) +Use codellama for development, just update the config in the `start_sandbox.sh` with the example of [codellama-env.example](./env_sample/codellama_env.sample) ## Supported API Service @@ -94,36 +130,4 @@ if you have any feature suggestion. please create a discuession to talk about it * [roadmap for v0.5.0](https://github.com/dbpunk-labs/octogen/issues/64) -## 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]๐ŸŽง> - -``` diff --git a/env_sample/azure_env.sample b/env_sample/azure_env.sample index 4e5139c..0198d2d 100644 --- a/env_sample/azure_env.sample +++ b/env_sample/azure_env.sample @@ -7,7 +7,9 @@ db_path=/tmp/octopus.db llm_key=azure_openai openai_api_type=azure openai_api_version=2023-07-01-preview +# tha api key openai_api_key=api_key +# the azure api base openai_api_base=base_url # the deployment_name openai_api_deployment=deployment_name diff --git a/env_sample/codellama_env.sample b/env_sample/codellama_env.sample new file mode 100644 index 0000000..ab6fb84 --- /dev/null +++ b/env_sample/codellama_env.sample @@ -0,0 +1,14 @@ +rpc_host=127.0.0.1 +rpc_port=9528 +admin_key=gennerate_admin_key +max_file_size=202400000 +max_iterations=8 +# the sqlite db path +db_path=/tmp/octogen.db +llm_key=codellama +# the llama cpp server +llama_api_base=http://127.0.0.1:8080 +max_file_size=202400000 +max_iterations=8 +log_level=debug + diff --git a/env_sample/openai_env.sample b/env_sample/openai_env.sample index 465f0d9..ebc4ee8 100644 --- a/env_sample/openai_env.sample +++ b/env_sample/openai_env.sample @@ -5,7 +5,9 @@ max_file_size=10240000 verbose=True db_path=/tmp/octopus.db llm_key=openai +# the openai api mode name openai_api_model=model_nama +# the openai api key openai_api_key=api_key max_iterations=10 log_level=debug