diff --git a/.oh-my-shell/shellrc/plugins/ai/aliases.sh b/.oh-my-shell/shellrc/plugins/ai/aliases.sh deleted file mode 100644 index a2130fc..0000000 --- a/.oh-my-shell/shellrc/plugins/ai/aliases.sh +++ /dev/null @@ -1,5 +0,0 @@ -# % ai, code, default -# # Setup OpenDevin -# ; usage: ai_opendevin_run -# ; example: ai_opendevin_run "ollama/llama2:13b-chat-q4_K_M" -alias ai_opendevin_run='f_ai_opendevin_run ' diff --git a/.oh-my-shell/shellrc/plugins/ai/functions.sh b/.oh-my-shell/shellrc/plugins/ai/functions.sh deleted file mode 100644 index 4596d93..0000000 --- a/.oh-my-shell/shellrc/plugins/ai/functions.sh +++ /dev/null @@ -1,53 +0,0 @@ -# Setup opendevin using official instructions: https://github.com/OpenDevin/OpenDevin/blob/51b3ae56c75d3f00bc717849e43a600e54b9683d/docs/documentation/LOCAL_LLM_GUIDE.md?plain=1#L1 -f_ai_opendevin_run() { - local model_name="$1" - - repo_name="opendevin_$(echo "$model_name" | sha256sum | cut -d' ' -f 1)" - - dir="${_DEFAULT_DEVELOPMENT_DIR}/AI_WORKSPACES/opendevin/" - workspace_dir="$dir/workspace_${repo_name}" - - mkdir -p "$dir" - mkdir -p "$workspace_dir" - - pushd "$dir" - git -C "$repo_name" pull \ - || git clone "github.com:OpenDevin/OpenDevin.git" "$repo_name.git" - - pushd "${repo_name}.git" - # Setup OpenDevin - make build - - if ! test -f config.toml; then - make setup-config - - sed -i 's/LLM_API_KEY=.*/LLM_API_KEY="ollama"/' config.toml - sed -i "s/LLM_MODEL=.*/LLM_MODEL=\"${repo_name}\"/" config.toml - sed -i 's/LLM_EMBEDDING_MODEL=.*/LLM_EMBEDDING_MODEL="local"/' config.toml - sed -i 's|LLM_BASE_URL=.*|LLM_BASE_URL="http://localhost:11434"|' config.toml - sed -i "s/WORKSPACE_DIR=.*/WORKSPACE_DIR=\"${workspace_dir}\"/" config.toml - fi - - # Download ollama model - if echo "$model_name" | grep "ollama/"; then - ollama pull "$model_name" - fi - - # Launch ollama is not running - if curl --fail http://localhost:11434/api/tags; then - : - else - echo "ERROR: ollama is not serving" - return 1 - fi - - # Run OpenDevin - make build - make run - - echo "Launching OpenDevin UI" - open "http://localhost:3001" - popd - - popd -}