mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-25 21:36:52 +08:00
Rename OpenDevin to OpenHands (#3472)
* Replace OpenDevin with OpenHands * Update CONTRIBUTING.md * Update README.md * Update README.md * update poetry lock; move opendevin folder to openhands * fix env var * revert image references in docs * revert permissions * revert permissions --------- Co-authored-by: Xingyao Wang <xingyao6@illinois.edu>
This commit is contained in:
parent
83f36c1d66
commit
01ae22ef57
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "OpenDevin Codespaces",
|
||||
"name": "OpenHands Codespaces",
|
||||
"image": "mcr.microsoft.com/devcontainers/universal",
|
||||
"customizations":{
|
||||
"vscode":{
|
||||
|
||||
6
.github/ISSUE_TEMPLATE/bug_template.yml
vendored
6
.github/ISSUE_TEMPLATE/bug_template.yml
vendored
@ -1,5 +1,5 @@
|
||||
name: Bug
|
||||
description: Report a problem with OpenDevin
|
||||
description: Report a problem with OpenHands
|
||||
title: '[Bug]: '
|
||||
labels: ['bug']
|
||||
body:
|
||||
@ -28,8 +28,8 @@ body:
|
||||
- type: textarea
|
||||
id: current-version
|
||||
attributes:
|
||||
label: Current OpenDevin version
|
||||
description: What version of OpenDevin are you using? If you're running in docker, tell us the tag you're using (e.g. ghcr.io/opendevin/opendevin:0.3.1).
|
||||
label: Current OpenHands version
|
||||
description: What version of OpenHands are you using? If you're running in docker, tell us the tag you're using (e.g. ghcr.io/all-hands-ai/openhands:0.3.1).
|
||||
render: bash
|
||||
validations:
|
||||
required: true
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,6 +1,6 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Suggest an idea for OpenDevin features
|
||||
about: Suggest an idea for OpenHands features
|
||||
title: ''
|
||||
labels: 'enhancement'
|
||||
assignees: ''
|
||||
|
||||
4
.github/workflows/deploy-docs.yml
vendored
4
.github/workflows/deploy-docs.yml
vendored
@ -17,7 +17,7 @@ on:
|
||||
jobs:
|
||||
# Build the documentation website
|
||||
build:
|
||||
if: github.repository == 'OpenDevin/OpenDevin'
|
||||
if: github.repository == 'All-Hands-AI/OpenHands'
|
||||
name: Build Docusaurus
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -47,7 +47,7 @@ jobs:
|
||||
|
||||
# Deploy the documentation website
|
||||
deploy:
|
||||
if: github.ref == 'refs/heads/main' && github.repository == 'OpenDevin/OpenDevin'
|
||||
if: github.ref == 'refs/heads/main' && github.repository == 'All-Hands-AI/OpenHands'
|
||||
name: Deploy to GitHub Pages
|
||||
runs-on: ubuntu-latest
|
||||
# This job only runs on "main" so only run one of these jobs at a time
|
||||
|
||||
2
.github/workflows/dummy-agent-test.yml
vendored
2
.github/workflows/dummy-agent-test.yml
vendored
@ -27,7 +27,7 @@ jobs:
|
||||
- name: Run tests
|
||||
run: |
|
||||
set -e
|
||||
poetry run python opendevin/core/main.py -t "do a flip" -d ./workspace/ -c DummyAgent
|
||||
poetry run python openhands/core/main.py -t "do a flip" -d ./workspace/ -c DummyAgent
|
||||
- name: Check exit code
|
||||
run: |
|
||||
if [ $? -ne 0 ]; then
|
||||
|
||||
12
.github/workflows/gchr_app.yml
vendored
12
.github/workflows/gchr_app.yml
vendored
@ -21,7 +21,7 @@ on:
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
# Builds the OpenDevin Docker images
|
||||
# Builds the OpenHands Docker images
|
||||
ghcr_build:
|
||||
name: Build App Image
|
||||
runs-on: ubuntu-latest
|
||||
@ -32,7 +32,7 @@ jobs:
|
||||
packages: write
|
||||
strategy:
|
||||
matrix:
|
||||
image: ['opendevin']
|
||||
image: ['openhands']
|
||||
platform: ['amd64', 'arm64']
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -72,7 +72,7 @@ jobs:
|
||||
path: /tmp/${{ matrix.image }}_image_${{ matrix.platform }}.tar
|
||||
retention-days: 14
|
||||
|
||||
# Push the OpenDevin and sandbox Docker images to the ghcr.io repository
|
||||
# Push the OpenHands and sandbox Docker images to the ghcr.io repository
|
||||
ghcr_push:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ghcr_build]
|
||||
@ -84,7 +84,7 @@ jobs:
|
||||
packages: write
|
||||
strategy:
|
||||
matrix:
|
||||
image: ['opendevin']
|
||||
image: ['openhands']
|
||||
platform: ['amd64', 'arm64']
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@ -113,7 +113,7 @@ jobs:
|
||||
docker tag $loaded_image $image_name:${tag}_${{ matrix.platform }}
|
||||
docker push $image_name:${tag}_${{ matrix.platform }}
|
||||
done
|
||||
# Creates and pushes the OpenDevin and sandbox Docker image manifests
|
||||
# Creates and pushes the OpenHands and sandbox Docker image manifests
|
||||
create_manifest:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ghcr_build, ghcr_push]
|
||||
@ -122,7 +122,7 @@ jobs:
|
||||
tags: ${{ needs.ghcr_build.outputs.tags }}
|
||||
strategy:
|
||||
matrix:
|
||||
image: ['opendevin']
|
||||
image: ['openhands']
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
4
.github/workflows/ghcr.yml
vendored
4
.github/workflows/ghcr.yml
vendored
@ -68,7 +68,7 @@ jobs:
|
||||
- name: Install Python dependencies using Poetry
|
||||
run: make install-python-dependencies
|
||||
- name: Create source distribution and Dockerfile
|
||||
run: poetry run python3 opendevin/runtime/utils/runtime_build.py --base_image ${{ matrix.base_image }} --build_folder containers/runtime --force_rebuild
|
||||
run: poetry run python3 openhands/runtime/utils/runtime_build.py --base_image ${{ matrix.base_image }} --build_folder containers/runtime --force_rebuild
|
||||
- name: Build and export image
|
||||
id: build
|
||||
run: |
|
||||
@ -191,7 +191,7 @@ jobs:
|
||||
# Print the full name of the image
|
||||
echo "Loaded Docker image: $image_name"
|
||||
|
||||
TEST_RUNTIME=${{ matrix.runtime_type }} SANDBOX_USER_ID=$(id -u) SANDBOX_CONTAINER_IMAGE=$image_name TEST_IN_CI=true poetry run pytest --cov=agenthub --cov=opendevin --cov-report=xml -s ./tests/unit/test_runtime.py
|
||||
TEST_RUNTIME=${{ matrix.runtime_type }} SANDBOX_USER_ID=$(id -u) SANDBOX_CONTAINER_IMAGE=$image_name TEST_IN_CI=true poetry run pytest --cov=agenthub --cov=openhands --cov-report=xml -s ./tests/unit/test_runtime.py
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
env:
|
||||
|
||||
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@ -46,4 +46,4 @@ jobs:
|
||||
- name: Install pre-commit
|
||||
run: pip install pre-commit==3.7.0
|
||||
- name: Run pre-commit hooks
|
||||
run: pre-commit run --files opendevin/**/* agenthub/**/* evaluation/**/* tests/**/* --show-diff-on-failure --config ./dev_config/python/.pre-commit-config.yaml
|
||||
run: pre-commit run --files openhands/**/* agenthub/**/* evaluation/**/* tests/**/* --show-diff-on-failure --config ./dev_config/python/.pre-commit-config.yaml
|
||||
|
||||
4
.github/workflows/py-unit-tests.yml
vendored
4
.github/workflows/py-unit-tests.yml
vendored
@ -82,7 +82,7 @@ jobs:
|
||||
- name: Build Environment
|
||||
run: make build
|
||||
- name: Run Tests
|
||||
run: poetry run pytest --forked --cov=agenthub --cov=opendevin --cov-report=xml ./tests/unit -k "not test_runtime.py"
|
||||
run: poetry run pytest --forked --cov=agenthub --cov=openhands --cov-report=xml ./tests/unit -k "not test_runtime.py"
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
env:
|
||||
@ -111,7 +111,7 @@ jobs:
|
||||
- name: Build Environment
|
||||
run: make build
|
||||
- name: Run Tests
|
||||
run: poetry run pytest --forked --cov=agenthub --cov=opendevin --cov-report=xml ./tests/unit -k "not test_runtime.py"
|
||||
run: poetry run pytest --forked --cov=agenthub --cov=openhands --cov-report=xml ./tests/unit -k "not test_runtime.py"
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v4
|
||||
env:
|
||||
|
||||
8
.github/workflows/review-pr.yml
vendored
8
.github/workflows/review-pr.yml
vendored
@ -1,5 +1,5 @@
|
||||
# Workflow that uses OpenDevin to review a pull request. PR must be labeled 'review-this'
|
||||
name: Use OpenDevin to Review Pull Request
|
||||
# Workflow that uses OpenHands to review a pull request. PR must be labeled 'review-this'
|
||||
name: Use OpenHands to Review Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@ -49,7 +49,7 @@ jobs:
|
||||
export PATH="/github/home/.local/bin:$PATH"
|
||||
poetry install --without evaluation,llama-index
|
||||
poetry run playwright install --with-deps chromium
|
||||
- name: Run OpenDevin
|
||||
- name: Run OpenHands
|
||||
env:
|
||||
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
|
||||
LLM_MODEL: ${{ vars.LLM_MODEL }}
|
||||
@ -60,7 +60,7 @@ jobs:
|
||||
export PYTHONPATH=$(pwd):$PYTHONPATH
|
||||
export WORKSPACE_MOUNT_PATH=$GITHUB_WORKSPACE
|
||||
export WORKSPACE_BASE=$GITHUB_WORKSPACE
|
||||
echo -e "/exit\n" | poetry run python opendevin/core/main.py -i 50 -f task.txt
|
||||
echo -e "/exit\n" | poetry run python openhands/core/main.py -i 50 -f task.txt
|
||||
rm task.txt
|
||||
- name: Check if review file is non-empty
|
||||
id: check_file
|
||||
|
||||
24
.github/workflows/solve-issue.yml
vendored
24
.github/workflows/solve-issue.yml
vendored
@ -1,5 +1,5 @@
|
||||
# Workflow that uses OpenDevin to resolve a GitHub issue. Issue must be labeled 'solve-this'
|
||||
name: Use OpenDevin to Resolve GitHub Issue
|
||||
# Workflow that uses OpenHands to resolve a GitHub issue. Issue must be labeled 'solve-this'
|
||||
name: Use OpenHands to Resolve GitHub Issue
|
||||
|
||||
on:
|
||||
issues:
|
||||
@ -15,7 +15,7 @@ jobs:
|
||||
if: github.event.label.name == 'solve-this'
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/opendevin/opendevin
|
||||
image: ghcr.io/all-hands-ai/openhands
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
steps:
|
||||
@ -39,7 +39,7 @@ jobs:
|
||||
export PATH="/github/home/.local/bin:$PATH"
|
||||
poetry install --without evaluation,llama-index
|
||||
poetry run playwright install --with-deps chromium
|
||||
- name: Run OpenDevin
|
||||
- name: Run OpenHands
|
||||
env:
|
||||
ISSUE_TITLE: ${{ github.event.issue.title }}
|
||||
ISSUE_BODY: ${{ github.event.issue.body }}
|
||||
@ -50,14 +50,14 @@ jobs:
|
||||
export PATH="/github/home/.local/bin:$PATH"
|
||||
# Append path to correctly import package, note: must set pwd at first
|
||||
export PYTHONPATH=$(pwd):$PYTHONPATH
|
||||
WORKSPACE_MOUNT_PATH=$GITHUB_WORKSPACE poetry run python ./opendevin/core/main.py -i 50 -f task.txt -d $GITHUB_WORKSPACE
|
||||
WORKSPACE_MOUNT_PATH=$GITHUB_WORKSPACE poetry run python ./openhands/core/main.py -i 50 -f task.txt -d $GITHUB_WORKSPACE
|
||||
rm task.txt
|
||||
- name: Setup Git, Create Branch, and Commit Changes
|
||||
run: |
|
||||
# Setup Git configuration
|
||||
git config --global --add safe.directory $PWD
|
||||
git config --global user.name 'OpenDevin'
|
||||
git config --global user.email 'OpenDevin@users.noreply.github.com'
|
||||
git config --global user.name 'OpenHands'
|
||||
git config --global user.email 'OpenHands@users.noreply.github.com'
|
||||
|
||||
# Create a unique branch name with a timestamp
|
||||
BRANCH_NAME="fix/${{ github.event.issue.number }}-$(date +%Y%m%d%H%M%S)"
|
||||
@ -69,7 +69,7 @@ jobs:
|
||||
git add --all -- ':!task.txt'
|
||||
|
||||
# Commit the changes, if any
|
||||
git commit -m "OpenDevin: Resolve Issue #${{ github.event.issue.number }}"
|
||||
git commit -m "OpenHands: Resolve Issue #${{ github.event.issue.number }}"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "No changes to commit."
|
||||
exit 0
|
||||
@ -91,9 +91,9 @@ jobs:
|
||||
run: |
|
||||
# Create PR and capture URL
|
||||
PR_URL=$(gh pr create \
|
||||
--title "OpenDevin: Resolve Issue #2" \
|
||||
--body "This PR was generated by OpenDevin to resolve issue #2" \
|
||||
--repo "foragerr/OpenDevin" \
|
||||
--title "OpenHands: Resolve Issue #2" \
|
||||
--body "This PR was generated by OpenHands to resolve issue #2" \
|
||||
--repo "foragerr/OpenHands" \
|
||||
--head "${{ github.head_ref }}" \
|
||||
--base "${{ env.DEFAULT_BRANCH }}" \
|
||||
| grep -o 'https://github.com/[^ ]*')
|
||||
@ -110,4 +110,4 @@ jobs:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
gh issue comment ${{ github.event.issue.number }} \
|
||||
-b "OpenDevin raised [PR #${{ env.PR_NUMBER }}](${{ env.PR_URL }}) to resolve this issue."
|
||||
-b "OpenHands raised [PR #${{ env.PR_NUMBER }}](${{ env.PR_URL }}) to resolve this issue."
|
||||
|
||||
@ -1,35 +1,35 @@
|
||||
# Contributing
|
||||
|
||||
Thanks for your interest in contributing to OpenDevin! We welcome and appreciate contributions.
|
||||
Thanks for your interest in contributing to OpenHands! We welcome and appreciate contributions.
|
||||
|
||||
## How Can I Contribute?
|
||||
|
||||
There are many ways that you can contribute:
|
||||
|
||||
1. **Download and use** OpenDevin, and send [issues](https://github.com/OpenDevin/OpenDevin/issues) when you encounter something that isn't working or a feature that you'd like to see.
|
||||
1. **Download and use** OpenHands, and send [issues](https://github.com/All-Hands-AI/OpenHands/issues) when you encounter something that isn't working or a feature that you'd like to see.
|
||||
2. **Send feedback** after each session by [clicking the thumbs-up thumbs-down buttons](https://docs.all-hands.dev/modules/usage/feedback), so we can see where things are working and failing, and also build an open dataset for training code agents.
|
||||
3. **Improve the Codebase** by sending PRs (see details below). In particular, we have some [good first issue](https://github.com/OpenDevin/OpenDevin/labels/good%20first%20issue) issues that may be ones to start on.
|
||||
3. **Improve the Codebase** by sending PRs (see details below). In particular, we have some [good first issue](https://github.com/All-Hands-AI/OpenHands/labels/good%20first%20issue) issues that may be ones to start on.
|
||||
|
||||
## Understanding OpenDevin's CodeBase
|
||||
## Understanding OpenHands's CodeBase
|
||||
|
||||
To understand the codebase, please refer to the README in each module:
|
||||
- [frontend](./frontend/README.md)
|
||||
- [agenthub](./agenthub/README.md)
|
||||
- [evaluation](./evaluation/README.md)
|
||||
- [opendevin](./opendevin/README.md)
|
||||
- [server](./opendevin/server/README.md)
|
||||
- [openhands](./openhands/README.md)
|
||||
- [server](./openhands/server/README.md)
|
||||
|
||||
When you write code, it is also good to write tests. Please navigate to the `tests` folder to see existing test suites.
|
||||
At the moment, we have two kinds of tests: `unit` and `integration`. Please refer to the README for each test suite. These tests also run on GitHub's continuous integration to ensure quality of the project.
|
||||
|
||||
## Sending Pull Requests to OpenDevin
|
||||
## Sending Pull Requests to OpenHands
|
||||
|
||||
### 1. Fork the Official Repository
|
||||
Fork the [OpenDevin repository](https://github.com/OpenDevin/OpenDevin) into your own account.
|
||||
Fork the [OpenHands repository](https://github.com/All-Hands-AI/OpenHands) into your own account.
|
||||
Clone your own forked repository into your local environment:
|
||||
|
||||
```shell
|
||||
git clone git@github.com:<YOUR-USERNAME>/OpenDevin.git
|
||||
git clone git@github.com:<YOUR-USERNAME>/OpenHands.git
|
||||
```
|
||||
|
||||
### 2. Configure Git
|
||||
@ -38,8 +38,8 @@ Set the official repository as your [upstream](https://www.atlassian.com/git/tut
|
||||
Add the original repository as upstream:
|
||||
|
||||
```shell
|
||||
cd OpenDevin
|
||||
git remote add upstream git@github.com:OpenDevin/OpenDevin.git
|
||||
cd OpenHands
|
||||
git remote add upstream git@github.com:All-Hands-AI/OpenHands.git
|
||||
```
|
||||
|
||||
Verify that the remote is set:
|
||||
@ -62,7 +62,7 @@ git push origin main
|
||||
|
||||
### 4. Set up the Development Environment
|
||||
|
||||
We have a separate doc [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md) that tells you how to set up a development workflow.
|
||||
We have a separate doc [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) that tells you how to set up a development workflow.
|
||||
|
||||
### 5. Write Code and Commit It
|
||||
|
||||
@ -80,13 +80,13 @@ git push origin my_branch
|
||||
* On GitHub, go to the page of your forked repository, and create a Pull Request:
|
||||
- Click on `Branches`
|
||||
- Click on the `...` beside your branch and click on `New pull request`
|
||||
- Set `base repository` to `OpenDevin/OpenDevin`
|
||||
- Set `base repository` to `All-Hands-AI/OpenHands`
|
||||
- Set `base` to `main`
|
||||
- Click `Create pull request`
|
||||
|
||||
The PR should appear in [OpenDevin PRs](https://github.com/OpenDevin/OpenDevin/pulls).
|
||||
The PR should appear in [OpenHands PRs](https://github.com/All-Hands-AI/OpenHands/pulls).
|
||||
|
||||
Then the OpenDevin team will review your code.
|
||||
Then the OpenHands team will review your code.
|
||||
|
||||
## PR Rules
|
||||
|
||||
@ -109,7 +109,7 @@ For example, a PR title could be:
|
||||
- `refactor: modify package path`
|
||||
- `feat(frontend): xxxx`, where `(frontend)` means that this PR mainly focuses on the frontend component.
|
||||
|
||||
You may also check out previous PRs in the [PR list](https://github.com/OpenDevin/OpenDevin/pulls).
|
||||
You may also check out previous PRs in the [PR list](https://github.com/All-Hands-AI/OpenHands/pulls).
|
||||
|
||||
### 2. Pull Request description
|
||||
- If your PR is small (such as a typo fix), you can go brief.
|
||||
|
||||
10
CREDITS.md
10
CREDITS.md
@ -2,19 +2,19 @@
|
||||
|
||||
## Contributors
|
||||
|
||||
We would like to thank all the [contributors](https://github.com/opendevin/opendevin/graphs/contributors) who have helped make OpenDevin possible. Your dedication and hard work are greatly appreciated.
|
||||
We would like to thank all the [contributors](https://github.com/All-Hands-AI/OpenHands/graphs/contributors) who have helped make OpenHands possible. Your dedication and hard work are greatly appreciated.
|
||||
|
||||
## Open Source Projects
|
||||
|
||||
OpenDevin includes and adapts the following open source projects. We are grateful for their contributions to the open source community:
|
||||
OpenHands includes and adapts the following open source projects. We are grateful for their contributions to the open source community:
|
||||
|
||||
#### [SWE Agent](https://github.com/princeton-nlp/swe-agent)
|
||||
- License: MIT License
|
||||
- Description: Adapted for use in OpenDevin's agenthub
|
||||
- Description: Adapted for use in OpenHands's agenthub
|
||||
|
||||
#### [Aider](https://github.com/paul-gauthier/aider)
|
||||
- License: Apache License 2.0
|
||||
- Description: AI pair programming tool. OpenDevin has adapted and integrated its linter module for code-related tasks in [`agentskills utilities`](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/agent_skills/utils/aider)
|
||||
- Description: AI pair programming tool. OpenHands has adapted and integrated its linter module for code-related tasks in [`agentskills utilities`](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/agent_skills/utils/aider)
|
||||
|
||||
#### [BrowserGym](https://github.com/ServiceNow/BrowserGym)
|
||||
- License: Apache License 2.0
|
||||
@ -22,7 +22,7 @@ OpenDevin includes and adapts the following open source projects. We are gratefu
|
||||
|
||||
|
||||
### Reference Implementations for Evaluation Benchmarks
|
||||
OpenDevin integrates code of the reference implementations for the following agent evaluation benchmarks:
|
||||
OpenHands integrates code of the reference implementations for the following agent evaluation benchmarks:
|
||||
|
||||
#### [HumanEval](https://github.com/openai/human-eval)
|
||||
- License: MIT License
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
# Development Guide
|
||||
This guide is for people working on OpenDevin and editing the source code.
|
||||
If you wish to contribute your changes, check out the [CONTRIBUTING.md](https://github.com/OpenDevin/OpenDevin/blob/main/CONTRIBUTING.md) on how to clone and setup the project initially before moving on.
|
||||
Otherwise, you can clone the OpenDevin project directly.
|
||||
This guide is for people working on OpenHands and editing the source code.
|
||||
If you wish to contribute your changes, check out the [CONTRIBUTING.md](https://github.com/All-Hands-AI/OpenHands/blob/main/CONTRIBUTING.md) on how to clone and setup the project initially before moving on.
|
||||
Otherwise, you can clone the OpenHands project directly.
|
||||
|
||||
## Start the server for development
|
||||
### 1. Requirements
|
||||
@ -29,14 +29,14 @@ mamba install conda-forge::poetry
|
||||
```
|
||||
|
||||
### 2. Build and Setup The Environment
|
||||
Begin by building the project which includes setting up the environment and installing dependencies. This step ensures that OpenDevin is ready to run on your system:
|
||||
Begin by building the project which includes setting up the environment and installing dependencies. This step ensures that OpenHands is ready to run on your system:
|
||||
|
||||
```bash
|
||||
make build
|
||||
```
|
||||
|
||||
### 3. Configuring the Language Model
|
||||
OpenDevin supports a diverse array of Language Models (LMs) through the powerful [litellm](https://docs.litellm.ai) library. By default, we've chosen the mighty GPT-4 from OpenAI as our go-to model, but the world is your oyster! You can unleash the potential of Anthropic's suave Claude, the enigmatic Llama, or any other LM that piques your interest.
|
||||
OpenHands supports a diverse array of Language Models (LMs) through the powerful [litellm](https://docs.litellm.ai) library. By default, we've chosen the mighty GPT-4 from OpenAI as our go-to model, but the world is your oyster! You can unleash the potential of Anthropic's suave Claude, the enigmatic Llama, or any other LM that piques your interest.
|
||||
|
||||
To configure the LM of your choice, run:
|
||||
|
||||
@ -44,20 +44,20 @@ To configure the LM of your choice, run:
|
||||
make setup-config
|
||||
```
|
||||
|
||||
This command will prompt you to enter the LLM API key, model name, and other variables ensuring that OpenDevin is tailored to your specific needs. Note that the model name will apply only when you run headless. If you use the UI, please set the model in the UI.
|
||||
This command will prompt you to enter the LLM API key, model name, and other variables ensuring that OpenHands is tailored to your specific needs. Note that the model name will apply only when you run headless. If you use the UI, please set the model in the UI.
|
||||
|
||||
Note: If you have previously run OpenDevin using the docker command, you may have already set some environmental variables in your terminal. The final configurations are set from highest to lowest priority:
|
||||
Note: If you have previously run OpenHands using the docker command, you may have already set some environmental variables in your terminal. The final configurations are set from highest to lowest priority:
|
||||
Environment variables > config.toml variables > default variables
|
||||
|
||||
**Note on Alternative Models:**
|
||||
Some alternative models may prove more challenging to tame than others. Fear not, brave adventurer! We shall soon unveil LLM-specific documentation to guide you on your quest.
|
||||
And if you've already mastered the art of wielding a model other than OpenAI's GPT, we encourage you to share your setup instructions with us by creating instructions and adding it [to our documentation](https://github.com/OpenDevin/OpenDevin/tree/main/docs/modules/usage/llms).
|
||||
And if you've already mastered the art of wielding a model other than OpenAI's GPT, we encourage you to share your setup instructions with us by creating instructions and adding it [to our documentation](https://github.com/All-Hands-AI/OpenHands/tree/main/docs/modules/usage/llms).
|
||||
|
||||
For a full list of the LM providers and models available, please consult the [litellm documentation](https://docs.litellm.ai/docs/providers).
|
||||
|
||||
### 4. Running the application
|
||||
#### Option A: Run the Full Application
|
||||
Once the setup is complete, launching OpenDevin is as simple as running a single command. This command starts both the backend and frontend servers seamlessly, allowing you to interact with OpenDevin:
|
||||
Once the setup is complete, launching OpenHands is as simple as running a single command. This command starts both the backend and frontend servers seamlessly, allowing you to interact with OpenHands:
|
||||
```bash
|
||||
make run
|
||||
```
|
||||
@ -75,10 +75,10 @@ make run
|
||||
|
||||
### 6. LLM Debugging
|
||||
If you encounter any issues with the Language Model (LM) or you're simply curious, you can inspect the actual LLM prompts and responses. To do so, export DEBUG=1 in the environment and restart the backend.
|
||||
OpenDevin will then log the prompts and responses in the logs/llm/CURRENT_DATE directory, allowing you to identify the causes.
|
||||
OpenHands will then log the prompts and responses in the logs/llm/CURRENT_DATE directory, allowing you to identify the causes.
|
||||
|
||||
### 7. Help
|
||||
Need assistance or information on available targets and commands? The help command provides all the necessary guidance to ensure a smooth experience with OpenDevin.
|
||||
Need assistance or information on available targets and commands? The help command provides all the necessary guidance to ensure a smooth experience with OpenHands.
|
||||
```bash
|
||||
make help
|
||||
```
|
||||
|
||||
20
Makefile
20
Makefile
@ -1,8 +1,8 @@
|
||||
SHELL=/bin/bash
|
||||
# Makefile for OpenDevin project
|
||||
# Makefile for OpenHands project
|
||||
|
||||
# Variables
|
||||
DOCKER_IMAGE = ghcr.io/opendevin/sandbox:main
|
||||
DOCKER_IMAGE = ghcr.io/openhands/sandbox:main
|
||||
BACKEND_PORT = 3000
|
||||
BACKEND_HOST = "127.0.0.1:$(BACKEND_PORT)"
|
||||
FRONTEND_PORT = 3001
|
||||
@ -166,7 +166,7 @@ install-pre-commit-hooks:
|
||||
|
||||
lint-backend:
|
||||
@echo "$(YELLOW)Running linters...$(RESET)"
|
||||
@poetry run pre-commit run --files opendevin/**/* agenthub/**/* evaluation/**/* --show-diff-on-failure --config $(PRE_COMMIT_CONFIG_PATH)
|
||||
@poetry run pre-commit run --files openhands/**/* agenthub/**/* evaluation/**/* --show-diff-on-failure --config $(PRE_COMMIT_CONFIG_PATH)
|
||||
|
||||
lint-frontend:
|
||||
@echo "$(YELLOW)Running linters for frontend...$(RESET)"
|
||||
@ -190,7 +190,7 @@ build-frontend:
|
||||
# Start backend
|
||||
start-backend:
|
||||
@echo "$(YELLOW)Starting backend...$(RESET)"
|
||||
@poetry run uvicorn opendevin.server.listen:app --port $(BACKEND_PORT) --reload --reload-exclude "workspace/*"
|
||||
@poetry run uvicorn openhands.server.listen:app --port $(BACKEND_PORT) --reload --reload-exclude "workspace/*"
|
||||
|
||||
# Start frontend
|
||||
start-frontend:
|
||||
@ -205,7 +205,7 @@ _run_setup:
|
||||
fi
|
||||
@mkdir -p logs
|
||||
@echo "$(YELLOW)Starting backend server...$(RESET)"
|
||||
@poetry run uvicorn opendevin.server.listen:app --port $(BACKEND_PORT) &
|
||||
@poetry run uvicorn openhands.server.listen:app --port $(BACKEND_PORT) &
|
||||
@echo "$(YELLOW)Waiting for the backend to start...$(RESET)"
|
||||
@until nc -z localhost $(BACKEND_PORT); do sleep 0.1; done
|
||||
@echo "$(GREEN)Backend started successfully.$(RESET)"
|
||||
@ -280,7 +280,7 @@ setup-config-prompts:
|
||||
# Clean up all caches
|
||||
clean:
|
||||
@echo "$(YELLOW)Cleaning up caches...$(RESET)"
|
||||
@rm -rf opendevin/.cache
|
||||
@rm -rf openhands/.cache
|
||||
@echo "$(GREEN)Caches cleaned up successfully.$(RESET)"
|
||||
|
||||
# Help
|
||||
@ -289,11 +289,11 @@ help:
|
||||
@echo "Targets:"
|
||||
@echo " $(GREEN)build$(RESET) - Build project, including environment setup and dependencies."
|
||||
@echo " $(GREEN)lint$(RESET) - Run linters on the project."
|
||||
@echo " $(GREEN)setup-config$(RESET) - Setup the configuration for OpenDevin by providing LLM API key,"
|
||||
@echo " $(GREEN)setup-config$(RESET) - Setup the configuration for OpenHands by providing LLM API key,"
|
||||
@echo " LLM Model name, and workspace directory."
|
||||
@echo " $(GREEN)start-backend$(RESET) - Start the backend server for the OpenDevin project."
|
||||
@echo " $(GREEN)start-frontend$(RESET) - Start the frontend server for the OpenDevin project."
|
||||
@echo " $(GREEN)run$(RESET) - Run the OpenDevin application, starting both backend and frontend servers."
|
||||
@echo " $(GREEN)start-backend$(RESET) - Start the backend server for the OpenHands project."
|
||||
@echo " $(GREEN)start-frontend$(RESET) - Start the frontend server for the OpenHands project."
|
||||
@echo " $(GREEN)run$(RESET) - Run the OpenHands application, starting both backend and frontend servers."
|
||||
@echo " Backend Log file will be stored in the 'logs' directory."
|
||||
@echo " $(GREEN)help$(RESET) - Display this help message, providing information on available targets."
|
||||
|
||||
|
||||
82
README.md
82
README.md
@ -18,40 +18,40 @@
|
||||
-->
|
||||
|
||||
<div align="center">
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/graphs/contributors"><img src="https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge&color=blue" alt="Contributors"></a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/network/members"><img src="https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge&color=blue" alt="Forks"></a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/stargazers"><img src="https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge&color=blue" alt="Stargazers"></a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/issues"><img src="https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge&color=blue" alt="Issues"></a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE"><img src="https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge&color=blue" alt="MIT License"></a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/blob/main/CREDITS.md"><img src="https://img.shields.io/badge/Project-Credits-blue?style=for-the-badge&color=blue" alt="Credits"></a>
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/graphs/contributors"><img src="https://img.shields.io/github/contributors/All-Hands-AI/OpenHands?style=for-the-badge&color=blue" alt="Contributors"></a>
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/network/members"><img src="https://img.shields.io/github/forks/All-Hands-AI/OpenHands?style=for-the-badge&color=blue" alt="Forks"></a>
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/stargazers"><img src="https://img.shields.io/github/stars/All-Hands-AI/OpenHands?style=for-the-badge&color=blue" alt="Stargazers"></a>
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/issues"><img src="https://img.shields.io/github/issues/All-Hands-AI/OpenHands?style=for-the-badge&color=blue" alt="Issues"></a>
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE"><img src="https://img.shields.io/github/license/All-Hands-AI/OpenHands?style=for-the-badge&color=blue" alt="MIT License"></a>
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/blob/main/CREDITS.md"><img src="https://img.shields.io/badge/Project-Credits-blue?style=for-the-badge&color=blue" alt="Credits"></a>
|
||||
<br/>
|
||||
<a href="https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw"><img src="https://img.shields.io/badge/Slack-Join%20Us-red?logo=slack&logoColor=white&style=for-the-badge" alt="Join our Slack community"></a>
|
||||
<a href="https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw"><img src="https://img.shields.io/badge/Slack-Join%20Us-red?logo=slack&logoColor=white&style=for-the-badge" alt="Join our Slack community"></a>
|
||||
<a href="https://discord.gg/ESHStjSjD4"><img src="https://img.shields.io/badge/Discord-Join%20Us-purple?logo=discord&logoColor=white&style=for-the-badge" alt="Join our Discord community"></a>
|
||||
<a href="https://codecov.io/github/opendevin/opendevin?branch=main"><img alt="CodeCov" src="https://img.shields.io/codecov/c/github/opendevin/opendevin?style=for-the-badge"></a>
|
||||
<a href="https://codecov.io/github/All-Hands-AI/OpenHands?branch=main"><img alt="CodeCov" src="https://img.shields.io/codecov/c/github/All-Hands-AI/OpenHands?style=for-the-badge"></a>
|
||||
</div>
|
||||
|
||||
<!-- PROJECT LOGO -->
|
||||
<div align="center">
|
||||
<img src="./docs/static/img/logo.png" alt="Logo" width="200" height="200">
|
||||
<h1 align="center">OpenDevin: Code Less, Make More</h1>
|
||||
<a href="https://docs.all-hands.dev/modules/usage/intro"><img src="https://img.shields.io/badge/Documentation-OpenDevin-blue?logo=googledocs&logoColor=white&style=for-the-badge" alt="Check out the documentation"></a>
|
||||
<h1 align="center">OpenHands: Code Less, Make More</h1>
|
||||
<a href="https://docs.all-hands.dev/modules/usage/intro"><img src="https://img.shields.io/badge/Documentation-OpenHands-blue?logo=googledocs&logoColor=white&style=for-the-badge" alt="Check out the documentation"></a>
|
||||
<a href="https://arxiv.org/abs/2407.16741"><img src="https://img.shields.io/badge/Paper-%20on%20Arxiv-red?logo=arxiv&style=for-the-badge" alt="Paper on Arxiv"></a>
|
||||
<br/>
|
||||
<a href="https://huggingface.co/spaces/OpenDevin/evaluation"><img src="https://img.shields.io/badge/Evaluation-Benchmark%20on%20HF%20Space-green?logo=huggingface&style=for-the-badge" alt="Evaluation Benchmark"></a>
|
||||
<a href="https://huggingface.co/spaces/OpenHands/evaluation"><img src="https://img.shields.io/badge/Evaluation-Benchmark%20on%20HF%20Space-green?logo=huggingface&style=for-the-badge" alt="Evaluation Benchmark"></a>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
Welcome to OpenDevin, a platform for autonomous software engineers, powered by AI and LLMs.
|
||||
Welcome to OpenHands, a platform for autonomous software engineers, powered by AI and LLMs.
|
||||
|
||||
OpenDevin agents collaborate with human developers to write code, fix bugs, and ship features.
|
||||
OpenHands agents collaborate with human developers to write code, fix bugs, and ship features.
|
||||
|
||||

|
||||
|
||||
## ⚡ Getting Started
|
||||
OpenDevin works best with Docker version 26.0.0+ (Docker Desktop 4.31.0+).
|
||||
OpenHands works best with Docker version 26.0.0+ (Docker Desktop 4.31.0+).
|
||||
You must be using Linux, Mac OS, or WSL on Windows.
|
||||
|
||||
To start OpenDevin in a docker container, run the following commands in your terminal:
|
||||
To start OpenHands in a docker container, run the following commands in your terminal:
|
||||
|
||||
> [!WARNING]
|
||||
> When you run the following command, files in `./workspace` may be modified or deleted.
|
||||
@ -66,30 +66,30 @@ docker run -it \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-p 3000:3000 \
|
||||
--add-host host.docker.internal:host-gateway \
|
||||
--name opendevin-app-$(date +%Y%m%d%H%M%S) \
|
||||
--name openhands-app-$(date +%Y%m%d%H%M%S) \
|
||||
ghcr.io/opendevin/opendevin:0.8
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> By default, this command pulls the `latest` tag, which represents the most recent release of OpenDevin. You have other options as well:
|
||||
> - For a specific release version, use `ghcr.io/opendevin/opendevin:<OpenDevin_version>` (replace <OpenDevin_version> with the desired version number).
|
||||
> By default, this command pulls the `latest` tag, which represents the most recent release of OpenHands. You have other options as well:
|
||||
> - For a specific release version, use `ghcr.io/opendevin/opendevin:<OpenHands_version>` (replace <OpenHands_version> with the desired version number).
|
||||
> - For the most up-to-date development version, use `ghcr.io/opendevin/opendevin:main`. This version may be **(unstable!)** and is recommended for testing or development purposes only.
|
||||
>
|
||||
> Choose the tag that best suits your needs based on stability requirements and desired features.
|
||||
|
||||
You'll find OpenDevin running at [http://localhost:3000](http://localhost:3000) with access to `./workspace`. To have OpenDevin operate on your code, place it in `./workspace`.
|
||||
OpenDevin will only have access to this workspace folder. The rest of your system will not be affected as it runs in a secured docker sandbox.
|
||||
You'll find OpenHands running at [http://localhost:3000](http://localhost:3000) with access to `./workspace`. To have OpenHands operate on your code, place it in `./workspace`.
|
||||
OpenHands will only have access to this workspace folder. The rest of your system will not be affected as it runs in a secured docker sandbox.
|
||||
|
||||
Upon opening OpenDevin, you must select the appropriate `Model` and enter the `API Key` within the settings that should pop up automatically. These can be set at any time by selecting
|
||||
Upon opening OpenHands, you must select the appropriate `Model` and enter the `API Key` within the settings that should pop up automatically. These can be set at any time by selecting
|
||||
the `Settings` button (gear icon) in the UI. If the required `Model` does not exist in the list, you can manually enter it in the text box.
|
||||
|
||||
For the development workflow, see [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md).
|
||||
For the development workflow, see [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md).
|
||||
|
||||
Are you having trouble? Check out our [Troubleshooting Guide](https://docs.all-hands.dev/modules/usage/troubleshooting).
|
||||
|
||||
## 🚀 Documentation
|
||||
|
||||
To learn more about the project, and for tips on using OpenDevin,
|
||||
To learn more about the project, and for tips on using OpenHands,
|
||||
**check out our [documentation](https://docs.all-hands.dev/modules/usage/intro)**.
|
||||
|
||||
There you'll find resources on how to use different LLM providers (like ollama and Anthropic's Claude),
|
||||
@ -97,29 +97,29 @@ troubleshooting resources, and advanced configuration options.
|
||||
|
||||
## 🤝 How to Contribute
|
||||
|
||||
OpenDevin is a community-driven project, and we welcome contributions from everyone.
|
||||
OpenHands is a community-driven project, and we welcome contributions from everyone.
|
||||
Whether you're a developer, a researcher, or simply enthusiastic about advancing the field of
|
||||
software engineering with AI, there are many ways to get involved:
|
||||
|
||||
- **Code Contributions:** Help us develop new agents, core functionality, the frontend and other interfaces, or sandboxing solutions.
|
||||
- **Research and Evaluation:** Contribute to our understanding of LLMs in software engineering, participate in evaluating the models, or suggest improvements.
|
||||
- **Feedback and Testing:** Use the OpenDevin toolset, report bugs, suggest features, or provide feedback on usability.
|
||||
- **Feedback and Testing:** Use the OpenHands toolset, report bugs, suggest features, or provide feedback on usability.
|
||||
|
||||
For details, please check [CONTRIBUTING.md](./CONTRIBUTING.md).
|
||||
|
||||
## 🤖 Join Our Community
|
||||
|
||||
Whether you're a developer, a researcher, or simply enthusiastic about OpenDevin, we'd love to have you in our community.
|
||||
Whether you're a developer, a researcher, or simply enthusiastic about OpenHands, we'd love to have you in our community.
|
||||
Let's make software engineering better together!
|
||||
|
||||
- [Slack workspace](https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) - Here we talk about research, architecture, and future development.
|
||||
- [Slack workspace](https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) - Here we talk about research, architecture, and future development.
|
||||
- [Discord server](https://discord.gg/ESHStjSjD4) - This is a community-run server for general discussion, questions, and feedback.
|
||||
|
||||
## 📈 Progress
|
||||
|
||||
<p align="center">
|
||||
<a href="https://star-history.com/#OpenDevin/OpenDevin&Date">
|
||||
<img src="https://api.star-history.com/svg?repos=OpenDevin/OpenDevin&type=Date" width="500" alt="Star History Chart">
|
||||
<a href="https://star-history.com/#All-Hands-AI/OpenHands&Date">
|
||||
<img src="https://api.star-history.com/svg?repos=All-Hands-AI/OpenHands&type=Date" width="500" alt="Star History Chart">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
@ -127,22 +127,22 @@ Let's make software engineering better together!
|
||||
|
||||
Distributed under the MIT License. See [`LICENSE`](./LICENSE) for more information.
|
||||
|
||||
[contributors-shield]: https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge
|
||||
[contributors-url]: https://github.com/OpenDevin/OpenDevin/graphs/contributors
|
||||
[forks-shield]: https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge
|
||||
[forks-url]: https://github.com/OpenDevin/OpenDevin/network/members
|
||||
[stars-shield]: https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge
|
||||
[stars-url]: https://github.com/OpenDevin/OpenDevin/stargazers
|
||||
[issues-shield]: https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge
|
||||
[issues-url]: https://github.com/OpenDevin/OpenDevin/issues
|
||||
[license-shield]: https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge
|
||||
[license-url]: https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE
|
||||
[contributors-shield]: https://img.shields.io/github/contributors/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[contributors-url]: https://github.com/All-Hands-AI/OpenHands/graphs/contributors
|
||||
[forks-shield]: https://img.shields.io/github/forks/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[forks-url]: https://github.com/All-Hands-AI/OpenHands/network/members
|
||||
[stars-shield]: https://img.shields.io/github/stars/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[stars-url]: https://github.com/All-Hands-AI/OpenHands/stargazers
|
||||
[issues-shield]: https://img.shields.io/github/issues/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[issues-url]: https://github.com/All-Hands-AI/OpenHands/issues
|
||||
[license-shield]: https://img.shields.io/github/license/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[license-url]: https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE
|
||||
|
||||
## 🙏 Acknowledgements
|
||||
|
||||
OpenDevin is built by a large number of contributors, and every contribution is greatly appreciated! We also build upon other open source projects, and we are deeply thankful for their work.
|
||||
OpenHands is built by a large number of contributors, and every contribution is greatly appreciated! We also build upon other open source projects, and we are deeply thankful for their work.
|
||||
|
||||
For a list of open source projects and licenses used in OpenDevin, please see our [CREDITS.md](./CREDITS.md) file.
|
||||
For a list of open source projects and licenses used in OpenHands, please see our [CREDITS.md](./CREDITS.md) file.
|
||||
|
||||
## 📚 Cite
|
||||
|
||||
|
||||
@ -7,17 +7,17 @@ Contributors from different backgrounds and interests can choose to contribute t
|
||||
|
||||
## Constructing an Agent
|
||||
|
||||
The abstraction for an agent can be found [here](../opendevin/controller/agent.py).
|
||||
The abstraction for an agent can be found [here](../openhands/controller/agent.py).
|
||||
|
||||
Agents are run inside of a loop. At each iteration, `agent.step()` is called with a
|
||||
[State](../opendevin/controller/state/state.py) input, and the agent must output an [Action](../opendevin/events/action).
|
||||
[State](../openhands/controller/state/state.py) input, and the agent must output an [Action](../openhands/events/action).
|
||||
|
||||
Every agent also has a `self.llm` which it can use to interact with the LLM configured by the user.
|
||||
See the [LiteLLM docs for `self.llm.completion`](https://docs.litellm.ai/docs/completion).
|
||||
|
||||
## State
|
||||
|
||||
The `state` represents the running state of an agent in the OpenDevin system. The class handles saving and restoring the agent session. It is serialized in a pickle.
|
||||
The `state` represents the running state of an agent in the OpenHands system. The class handles saving and restoring the agent session. It is serialized in a pickle.
|
||||
|
||||
The State object stores information about:
|
||||
|
||||
@ -46,17 +46,17 @@ The agent can add and modify subtasks through the `AddTaskAction` and `ModifyTas
|
||||
|
||||
Here is a list of available Actions, which can be returned by `agent.step()`:
|
||||
|
||||
- [`CmdRunAction`](../opendevin/events/action/commands.py) - Runs a command inside a sandboxed terminal
|
||||
- [`IPythonRunCellAction`](../opendevin/events/action/commands.py) - Execute a block of Python code interactively (in Jupyter notebook) and receives `CmdOutputObservation`. Requires setting up `jupyter` [plugin](../opendevin/runtime/plugins) as a requirement.
|
||||
- [`FileReadAction`](../opendevin/events/action/files.py) - Reads the content of a file
|
||||
- [`FileWriteAction`](../opendevin/events/action/files.py) - Writes new content to a file
|
||||
- [`BrowseURLAction`](../opendevin/events/action/browse.py) - Gets the content of a URL
|
||||
- [`AddTaskAction`](../opendevin/events/action/tasks.py) - Adds a subtask to the plan
|
||||
- [`ModifyTaskAction`](../opendevin/events/action/tasks.py) - Changes the state of a subtask.
|
||||
- [`AgentFinishAction`](../opendevin/events/action/agent.py) - Stops the control loop, allowing the user/delegator agent to enter a new task
|
||||
- [`AgentRejectAction`](../opendevin/events/action/agent.py) - Stops the control loop, allowing the user/delegator agent to enter a new task
|
||||
- [`AgentFinishAction`](../opendevin/events/action/agent.py) - Stops the control loop, allowing the user to enter a new task
|
||||
- [`MessageAction`](../opendevin/events/action/message.py) - Represents a message from an agent or the user
|
||||
- [`CmdRunAction`](../openhands/events/action/commands.py) - Runs a command inside a sandboxed terminal
|
||||
- [`IPythonRunCellAction`](../openhands/events/action/commands.py) - Execute a block of Python code interactively (in Jupyter notebook) and receives `CmdOutputObservation`. Requires setting up `jupyter` [plugin](../openhands/runtime/plugins) as a requirement.
|
||||
- [`FileReadAction`](../openhands/events/action/files.py) - Reads the content of a file
|
||||
- [`FileWriteAction`](../openhands/events/action/files.py) - Writes new content to a file
|
||||
- [`BrowseURLAction`](../openhands/events/action/browse.py) - Gets the content of a URL
|
||||
- [`AddTaskAction`](../openhands/events/action/tasks.py) - Adds a subtask to the plan
|
||||
- [`ModifyTaskAction`](../openhands/events/action/tasks.py) - Changes the state of a subtask.
|
||||
- [`AgentFinishAction`](../openhands/events/action/agent.py) - Stops the control loop, allowing the user/delegator agent to enter a new task
|
||||
- [`AgentRejectAction`](../openhands/events/action/agent.py) - Stops the control loop, allowing the user/delegator agent to enter a new task
|
||||
- [`AgentFinishAction`](../openhands/events/action/agent.py) - Stops the control loop, allowing the user to enter a new task
|
||||
- [`MessageAction`](../openhands/events/action/message.py) - Represents a message from an agent or the user
|
||||
|
||||
To serialize and deserialize an action, you can use:
|
||||
- `action.to_dict()` to serialize the action to a dictionary to be sent to the UI, including a user-friendly string representation of the message
|
||||
@ -70,12 +70,12 @@ But they may also appear as a result of asynchronous events (e.g. a message from
|
||||
|
||||
Here is a list of available Observations:
|
||||
|
||||
- [`CmdOutputObservation`](../opendevin/events/observation/commands.py)
|
||||
- [`BrowserOutputObservation`](../opendevin/events/observation/browse.py)
|
||||
- [`FileReadObservation`](../opendevin/events/observation/files.py)
|
||||
- [`FileWriteObservation`](../opendevin/events/observation/files.py)
|
||||
- [`ErrorObservation`](../opendevin/events/observation/error.py)
|
||||
- [`SuccessObservation`](../opendevin/events/observation/success.py)
|
||||
- [`CmdOutputObservation`](../openhands/events/observation/commands.py)
|
||||
- [`BrowserOutputObservation`](../openhands/events/observation/browse.py)
|
||||
- [`FileReadObservation`](../openhands/events/observation/files.py)
|
||||
- [`FileWriteObservation`](../openhands/events/observation/files.py)
|
||||
- [`ErrorObservation`](../openhands/events/observation/error.py)
|
||||
- [`SuccessObservation`](../openhands/events/observation/success.py)
|
||||
|
||||
You can use `observation.to_dict()` and `observation_from_dict` to serialize and deserialize observations.
|
||||
|
||||
@ -94,7 +94,7 @@ sending a prompt to the LLM, then parsing the response into an `Action`.
|
||||
|
||||
## Agent Delegation
|
||||
|
||||
OpenDevin is a multi-agentic system. Agents can delegate tasks to other agents, whether
|
||||
OpenHands is a multi-agentic system. Agents can delegate tasks to other agents, whether
|
||||
prompted by the user, or when the agent decides to ask another agent for help. For example,
|
||||
the `CodeActAgent` might delegate to the `BrowsingAgent` to answer questions that involve browsing
|
||||
the web. The Delegator Agent forwards tasks to micro-agents, such as 'RepoStudyAgent' to study a repo,
|
||||
@ -102,7 +102,7 @@ or 'VerifierAgent' to verify a task completion.
|
||||
|
||||
### Understanding the terminology
|
||||
|
||||
A `task` is an end-to-end conversation between OpenDevin (the whole system) and the user,
|
||||
A `task` is an end-to-end conversation between OpenHands (the whole system) and the user,
|
||||
which might involve one or more inputs from the user. It starts with an initial input
|
||||
(typically a task statement) from the user, and ends with either an `AgentFinishAction`
|
||||
initiated by the agent, a stop initiated by the user, or an error.
|
||||
@ -113,7 +113,7 @@ itself. Otherwise, a `task` consists of multiple `subtasks`, each executed by
|
||||
one agent.
|
||||
|
||||
For example, considering a task from the user: `tell me how many GitHub stars
|
||||
OpenDevin repo has`. Let's assume the default agent is CodeActAgent.
|
||||
OpenHands repo has`. Let's assume the default agent is CodeActAgent.
|
||||
|
||||
```
|
||||
-- TASK STARTS (SUBTASK 0 STARTS) --
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from opendevin.controller.agent import Agent
|
||||
from openhands.controller.agent import Agent
|
||||
|
||||
from .micro.agent import MicroAgent
|
||||
from .micro.registry import all_microagents
|
||||
|
||||
@ -8,7 +8,7 @@ This folder implements the basic BrowserGym [demo agent](https://github.com/Serv
|
||||
Note that for browsing tasks, GPT-4 is usually a requirement to get reasonable results, due to the complexity of the web page structures.
|
||||
|
||||
```
|
||||
poetry run python ./opendevin/core/main.py \
|
||||
poetry run python ./openhands/core/main.py \
|
||||
-i 10 \
|
||||
-t "tell me the usa's president using google search" \
|
||||
-c BrowsingAgent \
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from opendevin.controller.agent import Agent
|
||||
from openhands.controller.agent import Agent
|
||||
|
||||
from .browsing_agent import BrowsingAgent
|
||||
|
||||
|
||||
@ -4,22 +4,22 @@ from browsergym.core.action.highlevel import HighLevelActionSet
|
||||
from browsergym.utils.obs import flatten_axtree_to_str
|
||||
|
||||
from agenthub.browsing_agent.response_parser import BrowsingResponseParser
|
||||
from opendevin.controller.agent import Agent
|
||||
from opendevin.controller.state.state import State
|
||||
from opendevin.core.config import AgentConfig
|
||||
from opendevin.core.logger import opendevin_logger as logger
|
||||
from opendevin.core.message import Message, TextContent
|
||||
from opendevin.events.action import (
|
||||
from openhands.controller.agent import Agent
|
||||
from openhands.controller.state.state import State
|
||||
from openhands.core.config import AgentConfig
|
||||
from openhands.core.logger import openhands_logger as logger
|
||||
from openhands.core.message import Message, TextContent
|
||||
from openhands.events.action import (
|
||||
Action,
|
||||
AgentFinishAction,
|
||||
BrowseInteractiveAction,
|
||||
MessageAction,
|
||||
)
|
||||
from opendevin.events.event import EventSource
|
||||
from opendevin.events.observation import BrowserOutputObservation
|
||||
from opendevin.events.observation.observation import Observation
|
||||
from opendevin.llm.llm import LLM
|
||||
from opendevin.runtime.plugins import (
|
||||
from openhands.events.event import EventSource
|
||||
from openhands.events.observation import BrowserOutputObservation
|
||||
from openhands.events.observation.observation import Observation
|
||||
from openhands.llm.llm import LLM
|
||||
from openhands.runtime.plugins import (
|
||||
PluginRequirement,
|
||||
)
|
||||
|
||||
@ -165,7 +165,7 @@ class BrowsingAgent(Agent):
|
||||
|
||||
prev_action_str = '\n'.join(prev_actions)
|
||||
# if the final BrowserInteractiveAction exec BrowserGym's send_msg_to_user,
|
||||
# we should also send a message back to the user in OpenDevin and call it a day
|
||||
# we should also send a message back to the user in OpenHands and call it a day
|
||||
if (
|
||||
isinstance(last_action, BrowseInteractiveAction)
|
||||
and last_action.browsergym_send_msg_to_user
|
||||
|
||||
@ -12,7 +12,7 @@ from browsergym.core.action.base import AbstractActionSet
|
||||
from browsergym.core.action.highlevel import HighLevelActionSet
|
||||
from browsergym.core.action.python import PythonActionSet
|
||||
|
||||
from opendevin.runtime.browser.browser_env import BrowserEnv
|
||||
from openhands.runtime.browser.browser_env import BrowserEnv
|
||||
|
||||
from .utils import (
|
||||
ParseError,
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import ast
|
||||
|
||||
from opendevin.controller.action_parser import ActionParser, ResponseParser
|
||||
from opendevin.core.logger import opendevin_logger as logger
|
||||
from opendevin.events.action import (
|
||||
from openhands.controller.action_parser import ActionParser, ResponseParser
|
||||
from openhands.core.logger import openhands_logger as logger
|
||||
from openhands.events.action import (
|
||||
Action,
|
||||
BrowseInteractiveAction,
|
||||
)
|
||||
|
||||
@ -9,17 +9,17 @@ The conceptual idea is illustrated below. At each turn, the agent can:
|
||||
- Execute any valid Linux `bash` command
|
||||
- Execute any valid `Python` code with [an interactive Python interpreter](https://ipython.org/). This is simulated through `bash` command, see plugin system below for more details.
|
||||
|
||||

|
||||

|
||||
|
||||
## Plugin System
|
||||
|
||||
To make the CodeAct agent more powerful with only access to `bash` action space, CodeAct agent leverages OpenDevin's plugin system:
|
||||
- [Jupyter plugin](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/jupyter): for IPython execution via bash command
|
||||
- [SWE-agent tool plugin](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/swe_agent_commands): Powerful bash command line tools for software development tasks introduced by [swe-agent](https://github.com/princeton-nlp/swe-agent).
|
||||
To make the CodeAct agent more powerful with only access to `bash` action space, CodeAct agent leverages OpenHands's plugin system:
|
||||
- [Jupyter plugin](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/jupyter): for IPython execution via bash command
|
||||
- [SWE-agent tool plugin](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/swe_agent_commands): Powerful bash command line tools for software development tasks introduced by [swe-agent](https://github.com/princeton-nlp/swe-agent).
|
||||
|
||||
## Demo
|
||||
|
||||
https://github.com/OpenDevin/OpenDevin/assets/38853559/f592a192-e86c-4f48-ad31-d69282d5f6ac
|
||||
https://github.com/All-Hands-AI/OpenHands/assets/38853559/f592a192-e86c-4f48-ad31-d69282d5f6ac
|
||||
|
||||
*Example of CodeActAgent with `gpt-4-turbo-2024-04-09` performing a data science task (linear regression)*
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from opendevin.controller.agent import Agent
|
||||
from openhands.controller.agent import Agent
|
||||
|
||||
from .codeact_agent import CodeActAgent
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import re
|
||||
|
||||
from opendevin.controller.action_parser import ActionParser, ResponseParser
|
||||
from opendevin.events.action import (
|
||||
from openhands.controller.action_parser import ActionParser, ResponseParser
|
||||
from openhands.events.action import (
|
||||
Action,
|
||||
AgentDelegateAction,
|
||||
AgentFinishAction,
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import os
|
||||
|
||||
from agenthub.codeact_agent.action_parser import CodeActResponseParser
|
||||
from opendevin.controller.agent import Agent
|
||||
from opendevin.controller.state.state import State
|
||||
from opendevin.core.config import AgentConfig
|
||||
from opendevin.core.message import ImageContent, Message, TextContent
|
||||
from opendevin.events.action import (
|
||||
from openhands.controller.agent import Agent
|
||||
from openhands.controller.state.state import State
|
||||
from openhands.core.config import AgentConfig
|
||||
from openhands.core.message import ImageContent, Message, TextContent
|
||||
from openhands.events.action import (
|
||||
Action,
|
||||
AgentDelegateAction,
|
||||
AgentFinishAction,
|
||||
@ -13,21 +13,21 @@ from opendevin.events.action import (
|
||||
IPythonRunCellAction,
|
||||
MessageAction,
|
||||
)
|
||||
from opendevin.events.observation import (
|
||||
from openhands.events.observation import (
|
||||
AgentDelegateObservation,
|
||||
CmdOutputObservation,
|
||||
IPythonRunCellObservation,
|
||||
)
|
||||
from opendevin.events.observation.error import ErrorObservation
|
||||
from opendevin.events.observation.observation import Observation
|
||||
from opendevin.events.serialization.event import truncate_content
|
||||
from opendevin.llm.llm import LLM
|
||||
from opendevin.runtime.plugins import (
|
||||
from openhands.events.observation.error import ErrorObservation
|
||||
from openhands.events.observation.observation import Observation
|
||||
from openhands.events.serialization.event import truncate_content
|
||||
from openhands.llm.llm import LLM
|
||||
from openhands.runtime.plugins import (
|
||||
AgentSkillsRequirement,
|
||||
JupyterRequirement,
|
||||
PluginRequirement,
|
||||
)
|
||||
from opendevin.utils.prompt import PromptManager
|
||||
from openhands.utils.prompt import PromptManager
|
||||
|
||||
|
||||
class CodeActAgent(Agent):
|
||||
@ -47,7 +47,7 @@ class CodeActAgent(Agent):
|
||||
- Execute any valid Linux `bash` command
|
||||
- Execute any valid `Python` code with [an interactive Python interpreter](https://ipython.org/). This is simulated through `bash` command, see plugin system below for more details.
|
||||
|
||||

|
||||

|
||||
|
||||
"""
|
||||
|
||||
|
||||
@ -95,8 +95,8 @@ Collecting click>=8.1.3
|
||||
Using cached click-8.1.7-py3-none-any.whl (97 kB)
|
||||
Collecting itsdangerous>=2.1.2
|
||||
Using cached itsdangerous-2.2.0-py3-none-any.whl (16 kB)
|
||||
Requirement already satisfied: Jinja2>=3.1.2 in /home/opendevin/.local/lib/python3.10/site-packages (from flask) (3.1.3)
|
||||
Requirement already satisfied: MarkupSafe>=2.0 in /home/opendevin/.local/lib/python3.10/site-packages (from Jinja2>=3.1.2->flask) (2.1.5)
|
||||
Requirement already satisfied: Jinja2>=3.1.2 in /home/openhands/.local/lib/python3.10/site-packages (from flask) (3.1.3)
|
||||
Requirement already satisfied: MarkupSafe>=2.0 in /home/openhands/.local/lib/python3.10/site-packages (from Jinja2>=3.1.2->flask) (2.1.5)
|
||||
Installing collected packages: Werkzeug, itsdangerous, click, blinker, flask
|
||||
Successfully installed Werkzeug-3.0.2 blinker-1.7.0 click-8.1.7 flask-3.0.3 itsdangerous-2.2.0
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# CodeAct (SWE Edit Specialized)
|
||||
|
||||
This agent is an adaptation of the original [SWE Agent](https://swe-agent.com/) based on CodeAct using the `agentskills` library of OpenDevin.
|
||||
This agent is an adaptation of the original [SWE Agent](https://swe-agent.com/) based on CodeAct using the `agentskills` library of OpenHands.
|
||||
|
||||
Its intended use is **solving GitHub issues**.
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from opendevin.controller.agent import Agent
|
||||
from openhands.controller.agent import Agent
|
||||
|
||||
from .codeact_swe_agent import CodeActSWEAgent
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import re
|
||||
|
||||
from opendevin.controller.action_parser import ActionParser
|
||||
from opendevin.events.action import (
|
||||
from openhands.controller.action_parser import ActionParser
|
||||
from openhands.events.action import (
|
||||
Action,
|
||||
AgentFinishAction,
|
||||
CmdRunAction,
|
||||
|
||||
@ -5,26 +5,26 @@ from agenthub.codeact_swe_agent.prompt import (
|
||||
SYSTEM_SUFFIX,
|
||||
)
|
||||
from agenthub.codeact_swe_agent.response_parser import CodeActSWEResponseParser
|
||||
from opendevin.controller.agent import Agent
|
||||
from opendevin.controller.state.state import State
|
||||
from opendevin.core.config import AgentConfig
|
||||
from opendevin.core.message import ImageContent, Message, TextContent
|
||||
from opendevin.events.action import (
|
||||
from openhands.controller.agent import Agent
|
||||
from openhands.controller.state.state import State
|
||||
from openhands.core.config import AgentConfig
|
||||
from openhands.core.message import ImageContent, Message, TextContent
|
||||
from openhands.events.action import (
|
||||
Action,
|
||||
AgentFinishAction,
|
||||
CmdRunAction,
|
||||
IPythonRunCellAction,
|
||||
MessageAction,
|
||||
)
|
||||
from opendevin.events.observation import (
|
||||
from openhands.events.observation import (
|
||||
CmdOutputObservation,
|
||||
IPythonRunCellObservation,
|
||||
)
|
||||
from opendevin.events.observation.error import ErrorObservation
|
||||
from opendevin.events.observation.observation import Observation
|
||||
from opendevin.events.serialization.event import truncate_content
|
||||
from opendevin.llm.llm import LLM
|
||||
from opendevin.runtime.plugins import (
|
||||
from openhands.events.observation.error import ErrorObservation
|
||||
from openhands.events.observation.observation import Observation
|
||||
from openhands.events.serialization.event import truncate_content
|
||||
from openhands.llm.llm import LLM
|
||||
from openhands.runtime.plugins import (
|
||||
AgentSkillsRequirement,
|
||||
JupyterRequirement,
|
||||
PluginRequirement,
|
||||
@ -42,7 +42,7 @@ def get_in_context_example() -> str:
|
||||
class CodeActSWEAgent(Agent):
|
||||
VERSION = '1.6'
|
||||
"""
|
||||
This agent is an adaptation of the original [SWE Agent](https://swe-agent.com/) based on CodeAct 1.5 using the `agentskills` library of OpenDevin.
|
||||
This agent is an adaptation of the original [SWE Agent](https://swe-agent.com/) based on CodeAct 1.5 using the `agentskills` library of OpenHands.
|
||||
|
||||
It is intended use is **solving Github issues**.
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from opendevin.runtime.plugins import AgentSkillsRequirement
|
||||
from openhands.runtime.plugins import AgentSkillsRequirement
|
||||
|
||||
_AGENT_SKILLS_DOCS = AgentSkillsRequirement.documentation
|
||||
|
||||
|
||||
@ -4,8 +4,8 @@ from agenthub.codeact_swe_agent.action_parser import (
|
||||
CodeActSWEActionParserIPythonRunCell,
|
||||
CodeActSWEActionParserMessage,
|
||||
)
|
||||
from opendevin.controller.action_parser import ResponseParser
|
||||
from opendevin.events.action import Action
|
||||
from openhands.controller.action_parser import ResponseParser
|
||||
from openhands.events.action import Action
|
||||
|
||||
|
||||
class CodeActSWEResponseParser(ResponseParser):
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from opendevin.controller.agent import Agent
|
||||
from openhands.controller.agent import Agent
|
||||
|
||||
from .agent import DelegatorAgent
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
from opendevin.controller.agent import Agent
|
||||
from opendevin.controller.state.state import State
|
||||
from opendevin.core.config import AgentConfig
|
||||
from opendevin.events.action import Action, AgentDelegateAction, AgentFinishAction
|
||||
from opendevin.events.observation import AgentDelegateObservation
|
||||
from opendevin.llm.llm import LLM
|
||||
from openhands.controller.agent import Agent
|
||||
from openhands.controller.state.state import State
|
||||
from openhands.core.config import AgentConfig
|
||||
from openhands.events.action import Action, AgentDelegateAction, AgentFinishAction
|
||||
from openhands.events.observation import AgentDelegateObservation
|
||||
from openhands.llm.llm import LLM
|
||||
|
||||
|
||||
class DelegatorAgent(Agent):
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from opendevin.controller.agent import Agent
|
||||
from openhands.controller.agent import Agent
|
||||
|
||||
from .agent import DummyAgent
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
from typing import TypedDict, Union
|
||||
|
||||
from opendevin.controller.agent import Agent
|
||||
from opendevin.controller.state.state import State
|
||||
from opendevin.core.config import AgentConfig
|
||||
from opendevin.core.schema import AgentState
|
||||
from opendevin.events.action import (
|
||||
from openhands.controller.agent import Agent
|
||||
from openhands.controller.state.state import State
|
||||
from openhands.core.config import AgentConfig
|
||||
from openhands.core.schema import AgentState
|
||||
from openhands.events.action import (
|
||||
Action,
|
||||
AddTaskAction,
|
||||
AgentFinishAction,
|
||||
@ -17,7 +17,7 @@ from opendevin.events.action import (
|
||||
MessageAction,
|
||||
ModifyTaskAction,
|
||||
)
|
||||
from opendevin.events.observation import (
|
||||
from openhands.events.observation import (
|
||||
AgentStateChangedObservation,
|
||||
CmdOutputObservation,
|
||||
FileReadObservation,
|
||||
@ -25,8 +25,8 @@ from opendevin.events.observation import (
|
||||
NullObservation,
|
||||
Observation,
|
||||
)
|
||||
from opendevin.events.serialization.event import event_to_dict
|
||||
from opendevin.llm.llm import LLM
|
||||
from openhands.events.serialization.event import event_to_dict
|
||||
from openhands.llm.llm import LLM
|
||||
|
||||
"""
|
||||
FIXME: There are a few problems this surfaced
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
from jinja2 import BaseLoader, Environment
|
||||
|
||||
from opendevin.controller.agent import Agent
|
||||
from opendevin.controller.state.state import State
|
||||
from opendevin.core.config import AgentConfig
|
||||
from opendevin.core.message import ImageContent, Message, TextContent
|
||||
from opendevin.core.utils import json
|
||||
from opendevin.events.action import Action
|
||||
from opendevin.events.serialization.action import action_from_dict
|
||||
from opendevin.events.serialization.event import event_to_memory
|
||||
from opendevin.llm.llm import LLM
|
||||
from opendevin.memory.history import ShortTermHistory
|
||||
from openhands.controller.agent import Agent
|
||||
from openhands.controller.state.state import State
|
||||
from openhands.core.config import AgentConfig
|
||||
from openhands.core.message import ImageContent, Message, TextContent
|
||||
from openhands.core.utils import json
|
||||
from openhands.events.action import Action
|
||||
from openhands.events.serialization.action import action_from_dict
|
||||
from openhands.events.serialization.event import event_to_memory
|
||||
from openhands.llm.llm import LLM
|
||||
from openhands.memory.history import ShortTermHistory
|
||||
|
||||
from .instructions import instructions
|
||||
from .registry import all_microagents
|
||||
|
||||
@ -4,7 +4,7 @@ CommitWriterAgent can help write git commit message. Example:
|
||||
|
||||
```bash
|
||||
WORKSPACE_MOUNT_PATH="`PWD`" \
|
||||
poetry run python opendevin/core/main.py -t "dummy task" -c CommitWriterAgent -d ./
|
||||
poetry run python openhands/core/main.py -t "dummy task" -c CommitWriterAgent -d ./
|
||||
```
|
||||
|
||||
This agent is special in the sense that it doesn't need a task. Once called,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
from opendevin.controller.agent import Agent
|
||||
from openhands.controller.agent import Agent
|
||||
|
||||
from .agent import PlannerAgent
|
||||
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
from agenthub.planner_agent.response_parser import PlannerResponseParser
|
||||
from opendevin.controller.agent import Agent
|
||||
from opendevin.controller.state.state import State
|
||||
from opendevin.core.config import AgentConfig
|
||||
from opendevin.core.message import ImageContent, Message, TextContent
|
||||
from opendevin.events.action import Action, AgentFinishAction
|
||||
from opendevin.llm.llm import LLM
|
||||
from openhands.controller.agent import Agent
|
||||
from openhands.controller.state.state import State
|
||||
from openhands.core.config import AgentConfig
|
||||
from openhands.core.message import ImageContent, Message, TextContent
|
||||
from openhands.events.action import Action, AgentFinishAction
|
||||
from openhands.llm.llm import LLM
|
||||
|
||||
from .prompt import get_prompt_and_images
|
||||
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
from opendevin.controller.state.state import State
|
||||
from opendevin.core.logger import opendevin_logger as logger
|
||||
from opendevin.core.schema import ActionType
|
||||
from opendevin.core.utils import json
|
||||
from opendevin.events.action import (
|
||||
from openhands.controller.state.state import State
|
||||
from openhands.core.logger import openhands_logger as logger
|
||||
from openhands.core.schema import ActionType
|
||||
from openhands.core.utils import json
|
||||
from openhands.events.action import (
|
||||
Action,
|
||||
NullAction,
|
||||
)
|
||||
from opendevin.events.serialization.action import action_from_dict
|
||||
from opendevin.events.serialization.event import event_to_memory
|
||||
from openhands.events.serialization.action import action_from_dict
|
||||
from openhands.events.serialization.event import event_to_memory
|
||||
|
||||
HISTORY_SIZE = 20
|
||||
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
from opendevin.controller.action_parser import ResponseParser
|
||||
from opendevin.core.utils import json
|
||||
from opendevin.events.action import (
|
||||
from openhands.controller.action_parser import ResponseParser
|
||||
from openhands.core.utils import json
|
||||
from openhands.events.action import (
|
||||
Action,
|
||||
)
|
||||
from opendevin.events.serialization.action import action_from_dict
|
||||
from openhands.events.serialization.action import action_from_dict
|
||||
|
||||
|
||||
class PlannerResponseParser(ResponseParser):
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
###################### OpenDevin Configuration Example ######################
|
||||
###################### OpenHands Configuration Example ######################
|
||||
#
|
||||
# All settings have default values, so you only need to uncomment and
|
||||
# modify what you want to change
|
||||
@ -55,8 +55,8 @@ workspace_base = "./workspace"
|
||||
# Path to rewrite the workspace mount path to
|
||||
#workspace_mount_rewrite = ""
|
||||
|
||||
# Run as devin
|
||||
#run_as_devin = true
|
||||
# Run as openhands
|
||||
#run_as_openhands = true
|
||||
|
||||
# Runtime environment
|
||||
#runtime = "eventstream"
|
||||
|
||||
@ -7,6 +7,6 @@ by the `ghcr.yml` workflow.
|
||||
## Building Manually
|
||||
|
||||
```bash
|
||||
docker build -f containers/app/Dockerfile -t opendevin .
|
||||
docker build -f containers/app/Dockerfile -t openhands .
|
||||
docker build -f containers/sandbox/Dockerfile -t sandbox .
|
||||
```
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
ARG OPEN_DEVIN_BUILD_VERSION=dev
|
||||
ARG OPENHANDS_BUILD_VERSION=dev
|
||||
FROM node:21.7.2-bookworm-slim AS frontend-builder
|
||||
|
||||
WORKDIR /app
|
||||
@ -32,15 +32,15 @@ FROM python:3.12.3-slim AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ARG OPEN_DEVIN_BUILD_VERSION #re-declare for this section
|
||||
ARG OPENHANDS_BUILD_VERSION #re-declare for this section
|
||||
|
||||
ENV RUN_AS_DEVIN=true
|
||||
ENV RUN_AS_OPENHANDS=true
|
||||
# A random number--we need this to be different from the user's UID on the host machine
|
||||
ENV OPENDEVIN_USER_ID=42420
|
||||
ENV OPENHANDS_USER_ID=42420
|
||||
ENV SANDBOX_API_HOSTNAME=host.docker.internal
|
||||
ENV USE_HOST_NETWORK=false
|
||||
ENV WORKSPACE_BASE=/opt/workspace_base
|
||||
ENV OPEN_DEVIN_BUILD_VERSION=$OPEN_DEVIN_BUILD_VERSION
|
||||
ENV OPENHANDS_BUILD_VERSION=$OPENHANDS_BUILD_VERSION
|
||||
RUN mkdir -p $WORKSPACE_BASE
|
||||
|
||||
RUN apt-get update -y \
|
||||
@ -52,41 +52,41 @@ RUN sed -i 's/^UID_MIN.*/UID_MIN 499/' /etc/login.defs
|
||||
RUN sed -i 's/^UID_MAX.*/UID_MAX 1000000/' /etc/login.defs
|
||||
|
||||
RUN groupadd app
|
||||
RUN useradd -l -m -u $OPENDEVIN_USER_ID -s /bin/bash opendevin && \
|
||||
usermod -aG app opendevin && \
|
||||
usermod -aG sudo opendevin && \
|
||||
RUN useradd -l -m -u $OPENHANDS_USER_ID -s /bin/bash openhands && \
|
||||
usermod -aG app openhands && \
|
||||
usermod -aG sudo openhands && \
|
||||
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
RUN chown -R opendevin:app /app && chmod -R 770 /app
|
||||
RUN sudo chown -R opendevin:app $WORKSPACE_BASE && sudo chmod -R 770 $WORKSPACE_BASE
|
||||
USER opendevin
|
||||
RUN chown -R openhands:app /app && chmod -R 770 /app
|
||||
RUN sudo chown -R openhands:app $WORKSPACE_BASE && sudo chmod -R 770 $WORKSPACE_BASE
|
||||
USER openhands
|
||||
|
||||
ENV VIRTUAL_ENV=/app/.venv \
|
||||
PATH="/app/.venv/bin:$PATH" \
|
||||
PYTHONPATH='/app'
|
||||
|
||||
COPY --chown=opendevin:app --chmod=770 --from=backend-builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
|
||||
COPY --chown=openhands:app --chmod=770 --from=backend-builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
|
||||
RUN playwright install --with-deps chromium
|
||||
|
||||
COPY --chown=opendevin:app --chmod=770 ./opendevin ./opendevin
|
||||
COPY --chown=opendevin:app --chmod=777 ./opendevin/runtime/plugins ./opendevin/runtime/plugins
|
||||
COPY --chown=opendevin:app --chmod=770 ./agenthub ./agenthub
|
||||
COPY --chown=opendevin:app --chmod=770 ./pyproject.toml ./pyproject.toml
|
||||
COPY --chown=opendevin:app --chmod=770 ./poetry.lock ./poetry.lock
|
||||
COPY --chown=opendevin:app --chmod=770 ./README.md ./README.md
|
||||
COPY --chown=opendevin:app --chmod=770 ./MANIFEST.in ./MANIFEST.in
|
||||
COPY --chown=openhands:app --chmod=770 ./openhands ./openhands
|
||||
COPY --chown=openhands:app --chmod=777 ./openhands/runtime/plugins ./openhands/runtime/plugins
|
||||
COPY --chown=openhands:app --chmod=770 ./agenthub ./agenthub
|
||||
COPY --chown=openhands:app --chmod=770 ./pyproject.toml ./pyproject.toml
|
||||
COPY --chown=openhands:app --chmod=770 ./poetry.lock ./poetry.lock
|
||||
COPY --chown=openhands:app --chmod=770 ./README.md ./README.md
|
||||
COPY --chown=openhands:app --chmod=770 ./MANIFEST.in ./MANIFEST.in
|
||||
|
||||
# This is run as "opendevin" user, and will create __pycache__ with opendevin:opendevin ownership
|
||||
RUN python opendevin/core/download.py # No-op to download assets
|
||||
# This is run as "openhands" user, and will create __pycache__ with openhands:openhands ownership
|
||||
RUN python openhands/core/download.py # No-op to download assets
|
||||
# Add this line to set group ownership of all files/directories not already in "app" group
|
||||
# opendevin:opendevin -> opendevin:app
|
||||
# openhands:openhands -> openhands:app
|
||||
RUN find /app \! -group app -exec chgrp app {} +
|
||||
|
||||
COPY --chown=opendevin:app --chmod=770 --from=frontend-builder /app/dist ./frontend/dist
|
||||
COPY --chown=opendevin:app --chmod=770 ./containers/app/entrypoint.sh /app/entrypoint.sh
|
||||
COPY --chown=openhands:app --chmod=770 --from=frontend-builder /app/dist ./frontend/dist
|
||||
COPY --chown=openhands:app --chmod=770 ./containers/app/entrypoint.sh /app/entrypoint.sh
|
||||
|
||||
USER root
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
CMD ["uvicorn", "opendevin.server.listen:app", "--host", "0.0.0.0", "--port", "3000"]
|
||||
CMD ["uvicorn", "openhands.server.listen:app", "--host", "0.0.0.0", "--port", "3000"]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
DOCKER_REGISTRY=ghcr.io
|
||||
DOCKER_ORG=opendevin
|
||||
DOCKER_IMAGE=opendevin
|
||||
DOCKER_ORG=all-hands-ai
|
||||
DOCKER_IMAGE=openhands
|
||||
DOCKER_BASE_DIR="."
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
echo "Starting OpenDevin..."
|
||||
echo "Starting OpenHands..."
|
||||
if [[ $NO_SETUP == "true" ]]; then
|
||||
echo "Skipping setup, running as $(whoami)"
|
||||
"$@"
|
||||
@ -9,7 +9,7 @@ if [[ $NO_SETUP == "true" ]]; then
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "The OpenDevin entrypoint.sh must run as root"
|
||||
echo "The OpenHands entrypoint.sh must run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -19,11 +19,11 @@ if [ -z "$SANDBOX_USER_ID" ]; then
|
||||
fi
|
||||
|
||||
if [[ "$SANDBOX_USER_ID" -eq 0 ]]; then
|
||||
echo "Running OpenDevin as root"
|
||||
export RUN_AS_DEVIN=false
|
||||
echo "Running OpenHands as root"
|
||||
export RUN_AS_OPENHANDS=false
|
||||
mkdir -p /root/.cache/ms-playwright/
|
||||
if [ -d "/home/opendevin/.cache/ms-playwright/" ]; then
|
||||
mv /home/opendevin/.cache/ms-playwright/ /root/.cache/
|
||||
if [ -d "/home/openhands/.cache/ms-playwright/" ]; then
|
||||
mv /home/openhands/.cache/ms-playwright/ /root/.cache/
|
||||
fi
|
||||
"$@"
|
||||
else
|
||||
@ -32,9 +32,9 @@ else
|
||||
echo "User enduser already exists. Skipping creation."
|
||||
else
|
||||
if ! useradd -l -m -u $SANDBOX_USER_ID -s /bin/bash enduser; then
|
||||
echo "Failed to create user enduser with id $SANDBOX_USER_ID. Moving opendevin user."
|
||||
echo "Failed to create user enduser with id $SANDBOX_USER_ID. Moving openhands user."
|
||||
incremented_id=$(($SANDBOX_USER_ID + 1))
|
||||
usermod -u $incremented_id opendevin
|
||||
usermod -u $incremented_id openhands
|
||||
if ! useradd -l -m -u $SANDBOX_USER_ID -s /bin/bash enduser; then
|
||||
echo "Failed to create user enduser with id $SANDBOX_USER_ID for a second time. Exiting."
|
||||
exit 1
|
||||
@ -42,7 +42,7 @@ else
|
||||
fi
|
||||
fi
|
||||
usermod -aG app enduser
|
||||
# get the user group of /var/run/docker.sock and set opendevin to that group
|
||||
# get the user group of /var/run/docker.sock and set openhands to that group
|
||||
DOCKER_SOCKET_GID=$(stat -c '%g' /var/run/docker.sock)
|
||||
echo "Docker socket group id: $DOCKER_SOCKET_GID"
|
||||
if getent group $DOCKER_SOCKET_GID; then
|
||||
@ -54,8 +54,8 @@ else
|
||||
|
||||
mkdir -p /home/enduser/.cache/huggingface/hub/
|
||||
mkdir -p /home/enduser/.cache/ms-playwright/
|
||||
if [ -d "/home/opendevin/.cache/ms-playwright/" ]; then
|
||||
mv /home/opendevin/.cache/ms-playwright/ /home/enduser/.cache/
|
||||
if [ -d "/home/openhands/.cache/ms-playwright/" ]; then
|
||||
mv /home/openhands/.cache/ms-playwright/ /home/enduser/.cache/
|
||||
fi
|
||||
|
||||
usermod -aG $DOCKER_SOCKET_GID enduser
|
||||
|
||||
@ -8,7 +8,7 @@ platform=$3
|
||||
echo "Building: $image_name for platform: $platform"
|
||||
tags=()
|
||||
|
||||
OPEN_DEVIN_BUILD_VERSION="dev"
|
||||
OPENHANDS_BUILD_VERSION="dev"
|
||||
|
||||
if [[ -n $GITHUB_REF_NAME ]]; then
|
||||
# check if ref name is a version number
|
||||
@ -19,13 +19,13 @@ if [[ -n $GITHUB_REF_NAME ]]; then
|
||||
tags+=("latest")
|
||||
fi
|
||||
sanitized=$(echo "$GITHUB_REF_NAME" | sed 's/[^a-zA-Z0-9.-]\+/-/g')
|
||||
OPEN_DEVIN_BUILD_VERSION=$sanitized
|
||||
OPENHANDS_BUILD_VERSION=$sanitized
|
||||
tag=$(echo "$sanitized" | tr '[:upper:]' '[:lower:]') # lower case is required in tagging
|
||||
tags+=("$tag")
|
||||
fi
|
||||
echo "Tags: ${tags[@]}"
|
||||
|
||||
if [[ "$image_name" == "opendevin" ]]; then
|
||||
if [[ "$image_name" == "openhands" ]]; then
|
||||
dir="./containers/app"
|
||||
elif [[ "$image_name" == "od_runtime" ]]; then
|
||||
dir="./containers/runtime"
|
||||
@ -73,7 +73,7 @@ echo "Output image will be saved to: $output_image"
|
||||
|
||||
docker buildx build \
|
||||
$args \
|
||||
--build-arg OPEN_DEVIN_BUILD_VERSION="$OPEN_DEVIN_BUILD_VERSION" \
|
||||
--build-arg OPENHANDS_BUILD_VERSION="$OPENHANDS_BUILD_VERSION" \
|
||||
--platform linux/$platform \
|
||||
--provenance=false \
|
||||
-f "$dir/Dockerfile" \
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# How to build custom E2B sandbox for OpenDevin
|
||||
# How to build custom E2B sandbox for OpenHands
|
||||
|
||||
[E2B](https://e2b.dev) is an [open-source](https://github.com/e2b-dev/e2b) secure cloud environment (sandbox) made for running AI-generated code and agents. E2B offers [Python](https://pypi.org/project/e2b/) and [JS/TS](https://www.npmjs.com/package/e2b) SDK to spawn and control these sandboxes.
|
||||
|
||||
@ -11,5 +11,5 @@
|
||||
|
||||
1. Build the sandbox
|
||||
```sh
|
||||
e2b template build --dockerfile ./Dockerfile --name "open-devin"
|
||||
e2b template build --dockerfile ./Dockerfile --name "openhands"
|
||||
```
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
# This is a config for E2B sandbox template.
|
||||
# You can use 'template_id' (785n69crgahmz0lkdw9h) or 'template_name (open-devin) from this config to spawn a sandbox:
|
||||
# You can use 'template_id' (785n69crgahmz0lkdw9h) or 'template_name (openhands) from this config to spawn a sandbox:
|
||||
|
||||
# Python SDK
|
||||
# from e2b import Sandbox
|
||||
# sandbox = Sandbox(template='open-devin')
|
||||
# sandbox = Sandbox(template='openhands')
|
||||
|
||||
# JS SDK
|
||||
# import { Sandbox } from 'e2b'
|
||||
# const sandbox = await Sandbox.create({ template: 'open-devin' })
|
||||
# const sandbox = await Sandbox.create({ template: 'openhands' })
|
||||
|
||||
dockerfile = "Dockerfile"
|
||||
template_name = "open-devin"
|
||||
template_name = "openhands"
|
||||
template_id = "785n69crgahmz0lkdw9h"
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
# Dynamic constructed Dockerfile
|
||||
|
||||
This folder builds runtime image (sandbox), which will use a `Dockerfile` that is dynamically generated depends on the `base_image` AND a [Python source distribution](https://docs.python.org/3.10/distutils/sourcedist.html) that's based on the current commit of `opendevin`.
|
||||
This folder builds runtime image (sandbox), which will use a `Dockerfile` that is dynamically generated depends on the `base_image` AND a [Python source distribution](https://docs.python.org/3.10/distutils/sourcedist.html) that's based on the current commit of `openhands`.
|
||||
|
||||
The following command will generate Dockerfile for `ubuntu:22.04` and the source distribution `.tar` into `containers/runtime`.
|
||||
|
||||
```bash
|
||||
poetry run python3 opendevin/runtime/utils/runtime_build.py \
|
||||
poetry run python3 openhands/runtime/utils/runtime_build.py \
|
||||
--base_image ubuntu:22.04 \
|
||||
--build_folder containers/runtime
|
||||
```
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
DOCKER_REGISTRY=ghcr.io
|
||||
DOCKER_ORG=opendevin
|
||||
DOCKER_ORG=all-hands-ai
|
||||
DOCKER_BASE_DIR="./containers/runtime"
|
||||
DOCKER_IMAGE=od_runtime
|
||||
# These variables will be appended by the runtime_build.py script
|
||||
|
||||
@ -28,17 +28,17 @@ RUN mkdir -p -m0755 /var/run/sshd
|
||||
# symlink python3 to python
|
||||
RUN ln -s /usr/bin/python3 /usr/bin/python
|
||||
|
||||
# ==== OpenDevin Runtime Client ====
|
||||
RUN mkdir -p /opendevin && mkdir -p /opendevin/logs && chmod 777 /opendevin/logs
|
||||
# ==== OpenHands Runtime Client ====
|
||||
RUN mkdir -p /openhands && mkdir -p /openhands/logs && chmod 777 /openhands/logs
|
||||
RUN wget --progress=bar:force -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
|
||||
RUN bash Miniforge3.sh -b -p /opendevin/miniforge3
|
||||
RUN chmod -R g+w /opendevin/miniforge3
|
||||
RUN bash -c ". /opendevin/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"
|
||||
RUN echo "" > /opendevin/bash.bashrc
|
||||
RUN bash Miniforge3.sh -b -p /openhands/miniforge3
|
||||
RUN chmod -R g+w /openhands/miniforge3
|
||||
RUN bash -c ". /openhands/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"
|
||||
RUN echo "" > /openhands/bash.bashrc
|
||||
RUN rm -f Miniforge3.sh
|
||||
|
||||
# - agentskills dependencies
|
||||
RUN /opendevin/miniforge3/bin/pip install --upgrade pip
|
||||
RUN /opendevin/miniforge3/bin/pip install jupyterlab notebook jupyter_kernel_gateway flake8
|
||||
RUN /opendevin/miniforge3/bin/pip install python-docx PyPDF2 python-pptx pylatexenc openai
|
||||
RUN /opendevin/miniforge3/bin/pip install python-dotenv toml termcolor pydantic python-docx pyyaml docker pexpect tenacity e2b browsergym minio
|
||||
RUN /openhands/miniforge3/bin/pip install --upgrade pip
|
||||
RUN /openhands/miniforge3/bin/pip install jupyterlab notebook jupyter_kernel_gateway flake8
|
||||
RUN /openhands/miniforge3/bin/pip install python-docx PyPDF2 python-pptx pylatexenc openai
|
||||
RUN /openhands/miniforge3/bin/pip install python-dotenv toml termcolor pydantic python-docx pyyaml docker pexpect tenacity e2b browsergym minio
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
DOCKER_REGISTRY=ghcr.io
|
||||
DOCKER_ORG=opendevin
|
||||
DOCKER_ORG=all-hands-ai
|
||||
DOCKER_IMAGE=sandbox
|
||||
DOCKER_BASE_DIR="."
|
||||
|
||||
@ -38,6 +38,6 @@ repos:
|
||||
- id: mypy
|
||||
additional_dependencies:
|
||||
[types-requests, types-setuptools, types-pyyaml, types-toml]
|
||||
entry: mypy --config-file dev_config/python/mypy.ini opendevin/ agenthub/
|
||||
entry: mypy --config-file dev_config/python/mypy.ini openhands/ agenthub/
|
||||
always_run: true
|
||||
pass_filenames: false
|
||||
|
||||
@ -3,7 +3,7 @@ import type { Config } from "@docusaurus/types";
|
||||
import { themes as prismThemes } from "prism-react-renderer";
|
||||
|
||||
const config: Config = {
|
||||
title: "OpenDevin",
|
||||
title: "OpenHands",
|
||||
tagline: "An Open Platform for AI Software Developers as Generalist Agents",
|
||||
favicon: "img/logo.png",
|
||||
|
||||
@ -12,8 +12,8 @@ const config: Config = {
|
||||
baseUrl: "/",
|
||||
|
||||
// GitHub pages deployment config.
|
||||
organizationName: "OpenDevin",
|
||||
projectName: "OpenDevin",
|
||||
organizationName: "All-Hands-AI",
|
||||
projectName: "OpenHands",
|
||||
trailingSlash: false,
|
||||
|
||||
onBrokenLinks: "throw",
|
||||
@ -63,9 +63,9 @@ const config: Config = {
|
||||
themeConfig: {
|
||||
image: "img/docusaurus.png",
|
||||
navbar: {
|
||||
title: "OpenDevin",
|
||||
title: "OpenHands",
|
||||
logo: {
|
||||
alt: "OpenDevin",
|
||||
alt: "OpenHands",
|
||||
src: "img/logo.png",
|
||||
},
|
||||
items: [
|
||||
@ -82,7 +82,7 @@ const config: Config = {
|
||||
label: "Codebase",
|
||||
},
|
||||
{
|
||||
href: "https://github.com/OpenDevin/OpenDevin",
|
||||
href: "https://github.com/All-Hands-AI/OpenHands",
|
||||
label: "GitHub",
|
||||
position: "right",
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"footer.title": {
|
||||
"message": "OpenDevin"
|
||||
"message": "OpenHands"
|
||||
},
|
||||
"footer.docs": {
|
||||
"message": "Documents"
|
||||
@ -9,7 +9,7 @@
|
||||
"message": "Communauté"
|
||||
},
|
||||
"footer.copyright": {
|
||||
"message": "© {year} OpenDevin"
|
||||
"message": "© {year} OpenHands"
|
||||
},
|
||||
"faq.title": {
|
||||
"message": "Questions Fréquemment Posées",
|
||||
@ -19,20 +19,20 @@
|
||||
"message": "Questions Fréquemment Posées"
|
||||
},
|
||||
"faq.section.title.1": {
|
||||
"message": "Qu'est-ce qu'OpenDevin ?",
|
||||
"message": "Qu'est-ce qu'OpenHands ?",
|
||||
"description": "First Section Title"
|
||||
},
|
||||
"faq.section.highlight": {
|
||||
"message": "OpenDevin",
|
||||
"message": "OpenHands",
|
||||
"description": "Highlight Text"
|
||||
},
|
||||
"faq.section.description.1": {
|
||||
"message": "est un ingénieur logiciel autonome qui peut résoudre des tâches d'ingénierie logicielle et de navigation web à tout moment. Il peut exécuter des requêtes en sciences des données, telles que \"Trouver le nombre de demandes de pull à l'repository OpenDevin dans les derniers mois\", et des tâches d'ingénierie logicielle, comme \"Veuillez ajouter des tests à ce fichier et vérifier si tous les tests passent. Si ce n'est pas le cas, réparez le fichier.\"",
|
||||
"description": "Description for OpenDevin"
|
||||
"message": "est un ingénieur logiciel autonome qui peut résoudre des tâches d'ingénierie logicielle et de navigation web à tout moment. Il peut exécuter des requêtes en sciences des données, telles que \"Trouver le nombre de demandes de pull à l'repository OpenHands dans les derniers mois\", et des tâches d'ingénierie logicielle, comme \"Veuillez ajouter des tests à ce fichier et vérifier si tous les tests passent. Si ce n'est pas le cas, réparez le fichier.\"",
|
||||
"description": "Description for OpenHands"
|
||||
},
|
||||
"faq.section.description.2": {
|
||||
"message": "De plus, OpenDevin est une plateforme et communauté pour les développeurs d'agents qui souhaitent tester et évaluer de nouveaux agents.",
|
||||
"description": "Further Description for OpenDevin"
|
||||
"message": "De plus, OpenHands est une plateforme et communauté pour les développeurs d'agents qui souhaitent tester et évaluer de nouveaux agents.",
|
||||
"description": "Further Description for OpenHands"
|
||||
},
|
||||
"faq.section.title.2": {
|
||||
"message": "Support",
|
||||
@ -43,15 +43,15 @@
|
||||
"description": "Support Answer"
|
||||
},
|
||||
"faq.section.title.3": {
|
||||
"message": "Comment résoudre un problème sur GitHub avec OpenDevin ?",
|
||||
"message": "Comment résoudre un problème sur GitHub avec OpenHands ?",
|
||||
"description": "GitHub Issue Section Title"
|
||||
},
|
||||
"faq.section.github.steps.intro": {
|
||||
"message": "Pour résoudre un problème sur GitHub en utilisant OpenDevin, envoyez une commande à OpenDevin demandant qu'il suit des étapes comme les suivantes :",
|
||||
"message": "Pour résoudre un problème sur GitHub en utilisant OpenHands, envoyez une commande à OpenHands demandant qu'il suit des étapes comme les suivantes :",
|
||||
"description": "GitHub Steps Introduction"
|
||||
},
|
||||
"faq.section.github.step1": {
|
||||
"message": "Lisez l'issue https://github.com/OpenDevin/OpenDevin/issues/1611",
|
||||
"message": "Lisez l'issue https://github.com/All-Hands-AI/OpenHands/issues/1611",
|
||||
"description": "GitHub Step 1"
|
||||
},
|
||||
"faq.section.github.step2": {
|
||||
@ -71,11 +71,11 @@
|
||||
"description": "GitHub Step 5"
|
||||
},
|
||||
"faq.section.github.steps.preRun": {
|
||||
"message": "Avant de lancer OpenDevin, vous pouvez faire :",
|
||||
"message": "Avant de lancer OpenHands, vous pouvez faire :",
|
||||
"description": "GitHub Steps Pre-Run"
|
||||
},
|
||||
"faq.section.github.steps.tokenInfo": {
|
||||
"message": "où XXX est un jeton GitHub que vous avez créé et qui a les autorisations pour pousser dans le dépôt OpenDevin. Si vous n'avez pas d'autorisations de modification du dépôt OpenDevin, vous devrez peut-être changer cela en :",
|
||||
"message": "où XXX est un jeton GitHub que vous avez créé et qui a les autorisations pour pousser dans le dépôt OpenHands. Si vous n'avez pas d'autorisations de modification du dépôt OpenHands, vous devrez peut-être changer cela en :",
|
||||
"description": "GitHub Steps Token Info"
|
||||
},
|
||||
"faq.section.github.steps.usernameInfo": {
|
||||
@ -83,23 +83,23 @@
|
||||
"description": "GitHub Steps Username Info"
|
||||
},
|
||||
"faq.section.title.4": {
|
||||
"message": "Comment OpenDevin est-il différent de Devin ?",
|
||||
"message": "Comment OpenHands est-il différent de Devin ?",
|
||||
"description": "Devin Section Title"
|
||||
},
|
||||
"faq.section.devin.linkText": {
|
||||
"faq.section.openhands.linkText": {
|
||||
"message": "Devin",
|
||||
"description": "Devin Link Text"
|
||||
},
|
||||
"faq.section.devin.description": {
|
||||
"message": "est un produit commercial par Cognition Inc., qui a servi d'inspiration initiale pour OpenDevin. Les deux visent à bien faire le travail d'ingénierie logicielle, mais vous pouvez télécharger, utiliser et modifier OpenDevin, tandis que Devin peut être utilisé uniquement via le site de Cognition. De plus, OpenDevin a évolué au-delà de l'inspiration initiale, et est maintenant un écosystème communautaire pour le développement d'agents en général, et nous serions ravis de vous voir rejoindre et",
|
||||
"faq.section.openhands.description": {
|
||||
"message": "est un produit commercial par Cognition Inc., qui a servi d'inspiration initiale pour OpenHands. Les deux visent à bien faire le travail d'ingénierie logicielle, mais vous pouvez télécharger, utiliser et modifier OpenHands, tandis que Devin peut être utilisé uniquement via le site de Cognition. De plus, OpenHands a évolué au-delà de l'inspiration initiale, et est maintenant un écosystème communautaire pour le développement d'agents en général, et nous serions ravis de vous voir rejoindre et",
|
||||
"description": "Devin Description"
|
||||
},
|
||||
"faq.section.devin.contribute": {
|
||||
"faq.section.openhands.contribute": {
|
||||
"message": "contribuer",
|
||||
"description": "Contribute Link"
|
||||
},
|
||||
"faq.section.title.5": {
|
||||
"message": "Comment OpenDevin est-il différent de ChatGPT ?",
|
||||
"message": "Comment OpenHands est-il différent de ChatGPT ?",
|
||||
"description": "ChatGPT Section Title"
|
||||
},
|
||||
"faq.section.chatgpt.description": {
|
||||
@ -114,7 +114,7 @@
|
||||
"message": "Commencer"
|
||||
},
|
||||
"welcome.message": {
|
||||
"message": "Bienvenue à OpenDevin, un système d'IA autonome ingénieur logiciel capable d'exécuter des tâches d'ingénierie complexes et de collaborer activement avec les utilisateurs sur les projets de développement logiciel."
|
||||
"message": "Bienvenue à OpenHands, un système d'IA autonome ingénieur logiciel capable d'exécuter des tâches d'ingénierie complexes et de collaborer activement avec les utilisateurs sur les projets de développement logiciel."
|
||||
},
|
||||
"theme.ErrorPageContent.title": {
|
||||
"message": "Cette page a planté.",
|
||||
|
||||
@ -19,35 +19,35 @@ La réalisation d'une réplication complète des applications de production avec
|
||||
|
||||
## 🤝 Comment Contribuer {#how-to-contribute}
|
||||
|
||||
OpenDevin est un projet communautaire, et nous accueillons les contributions de tout le monde. Que vous soyez développeur, chercheur, ou simplement enthousiaste à l'idée de faire progresser le domaine de l'ingénierie logicielle avec l'IA, il existe de nombreuses façons de vous impliquer :
|
||||
OpenHands est un projet communautaire, et nous accueillons les contributions de tout le monde. Que vous soyez développeur, chercheur, ou simplement enthousiaste à l'idée de faire progresser le domaine de l'ingénierie logicielle avec l'IA, il existe de nombreuses façons de vous impliquer :
|
||||
|
||||
- **Contributions de Code :** Aidez-nous à développer les fonctionnalités de base, l'interface frontend ou les solutions de sandboxing.
|
||||
- **Recherche et Évaluation :** Contribuez à notre compréhension des LLM en ingénierie logicielle, participez à l'évaluation des modèles ou suggérez des améliorations.
|
||||
- **Retour d'Information et Tests :** Utilisez l'ensemble d'outils OpenDevin, signalez des bogues, suggérez des fonctionnalités ou fournissez des retours sur l'ergonomie.
|
||||
- **Retour d'Information et Tests :** Utilisez l'ensemble d'outils OpenHands, signalez des bogues, suggérez des fonctionnalités ou fournissez des retours sur l'ergonomie.
|
||||
|
||||
Pour plus de détails, veuillez consulter [ce document](https://github.com/OpenDevin/OpenDevin/blob/main/CONTRIBUTING.md).
|
||||
Pour plus de détails, veuillez consulter [ce document](https://github.com/All-Hands-AI/OpenHands/blob/main/CONTRIBUTING.md).
|
||||
|
||||
## 🤖 Rejoignez Notre Communauté {#join-our-community}
|
||||
|
||||
Nous avons maintenant à la fois un espace de travail Slack pour la collaboration sur la construction d'OpenDevin et un serveur Discord pour discuter de tout ce qui est lié, par exemple, à ce projet, aux LLM, aux agents, etc.
|
||||
Nous avons maintenant à la fois un espace de travail Slack pour la collaboration sur la construction d'OpenHands et un serveur Discord pour discuter de tout ce qui est lié, par exemple, à ce projet, aux LLM, aux agents, etc.
|
||||
|
||||
- [Espace de travail Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw)
|
||||
- [Espace de travail Slack](https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw)
|
||||
- [Serveur Discord](https://discord.gg/ESHStjSjD4)
|
||||
|
||||
Si vous souhaitez contribuer, n'hésitez pas à rejoindre notre communauté. Simplifions l'ingénierie logicielle ensemble !
|
||||
|
||||
🐚 **Codez moins, créez plus avec OpenDevin.**
|
||||
🐚 **Codez moins, créez plus avec OpenHands.**
|
||||
|
||||
[](https://star-history.com/#OpenDevin/OpenDevin&Date)
|
||||
[](https://star-history.com/#All-Hands-AI/OpenHands&Date)
|
||||
|
||||
## 🛠️ Construit Avec {#built-with}
|
||||
|
||||
OpenDevin est construit en utilisant une combinaison de cadres et de bibliothèques puissants, offrant une base robuste pour son développement. Voici les technologies clés utilisées dans le projet :
|
||||
OpenHands est construit en utilisant une combinaison de cadres et de bibliothèques puissants, offrant une base robuste pour son développement. Voici les technologies clés utilisées dans le projet :
|
||||
|
||||
       
|
||||
|
||||
Veuillez noter que la sélection de ces technologies est en cours, et que des technologies supplémentaires peuvent être ajoutées ou des existantes supprimées au fur et à mesure de l'évolution du projet. Nous nous efforçons d'adopter les outils les plus adaptés et efficaces pour améliorer les capacités d'OpenDevin.
|
||||
Veuillez noter que la sélection de ces technologies est en cours, et que des technologies supplémentaires peuvent être ajoutées ou des existantes supprimées au fur et à mesure de l'évolution du projet. Nous nous efforçons d'adopter les outils les plus adaptés et efficaces pour améliorer les capacités d'OpenHands.
|
||||
|
||||
## 📜 Licence {#license}
|
||||
|
||||
Distribué sous la licence MIT. Voir [notre licence](https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE) pour plus d'informations.
|
||||
Distribué sous la licence MIT. Voir [notre licence](https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE) pour plus d'informations.
|
||||
|
||||
@ -18,18 +18,18 @@ L'idée conceptuelle est illustrée ci-dessous. À chaque tour, l'agent peut :
|
||||
- Exécuter toute commande `bash` Linux valide
|
||||
- Exécuter tout code `Python` valide avec [un interpréteur Python interactif](https://ipython.org/). Cela est simulé à travers la commande `bash`, voir le système de plugin ci-dessous pour plus de détails.
|
||||
|
||||

|
||||

|
||||
|
||||
### Système de Plugin
|
||||
|
||||
Pour rendre l'agent CodeAct plus puissant avec seulement l'accès à l'espace d'action `bash`, l'agent CodeAct exploite le système de plugins d'OpenDevin:
|
||||
Pour rendre l'agent CodeAct plus puissant avec seulement l'accès à l'espace d'action `bash`, l'agent CodeAct exploite le système de plugins d'OpenHands:
|
||||
|
||||
- [Plugin Jupyter](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/jupyter) : pour l'exécution d'IPython via la commande bash
|
||||
- [Plugin outil agent SWE](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/swe_agent_commands) : Outils de ligne de commande bash puissants pour les tâches de développement logiciel introduits par [swe-agent](https://github.com/princeton-nlp/swe-agent).
|
||||
- [Plugin Jupyter](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/jupyter) : pour l'exécution d'IPython via la commande bash
|
||||
- [Plugin outil agent SWE](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/swe_agent_commands) : Outils de ligne de commande bash puissants pour les tâches de développement logiciel introduits par [swe-agent](https://github.com/princeton-nlp/swe-agent).
|
||||
|
||||
### Démonstration
|
||||
|
||||
https://github.com/OpenDevin/OpenDevin/assets/38853559/f592a192-e86c-4f48-ad31-d69282d5f6ac
|
||||
https://github.com/All-Hands-AI/OpenHands/assets/38853559/f592a192-e86c-4f48-ad31-d69282d5f6ac
|
||||
|
||||
_Exemple de CodeActAgent avec `gpt-4-turbo-2024-04-09` effectuant une tâche de science des données (régression linéaire)_
|
||||
|
||||
|
||||
@ -25,14 +25,14 @@ _**Avertissement**: L'architecture du backend est en cours de développement et
|
||||
|
||||
## Prérequis
|
||||
|
||||
- Un environnement Python dans lequel opendevin est exécutable
|
||||
- Un environnement Python dans lequel openhands est exécutable
|
||||
(selon les instructions du fichier README.md à la racine du dépôt)
|
||||
- [py2puml](https://github.com/lucsorel/py2puml) installé
|
||||
|
||||
## Étapes
|
||||
|
||||
1. Générez automatiquement le schéma en exécutant la commande suivante depuis la racine du dépôt :
|
||||
`py2puml opendevin opendevin > docs/architecture/backend_architecture.puml`
|
||||
`py2puml openhands openhands > docs/architecture/backend_architecture.puml`
|
||||
|
||||
2. Ouvrez le fichier généré dans un éditeur PlantUML, par exemple Visual Studio Code avec l'extension PlantUML ou [PlantText](https://www.planttext.com/)
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
# 💿 Comment Créer un Soutien Docker sur Mesure
|
||||
|
||||
Le sandbox par défaut OpenDevin est équipé d'une configuration ubuntu minimaliste. Votre cas d'utilisation pourrait nécessiter des logiciels installés par défaut. Cet article vous enseignera comment réaliser cela en utilisant une image docker personnalisée.
|
||||
Le sandbox par défaut OpenHands est équipé d'une configuration ubuntu minimaliste. Votre cas d'utilisation pourrait nécessiter des logiciels installés par défaut. Cet article vous enseignera comment réaliser cela en utilisant une image docker personnalisée.
|
||||
|
||||
## Configuration
|
||||
|
||||
Assurez-vous de pouvoir utiliser OpenDevin en suivant la documentation [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md).
|
||||
Assurez-vous de pouvoir utiliser OpenHands en suivant la documentation [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md).
|
||||
|
||||
## Créer Votre Image Docker
|
||||
|
||||
Ensuite, vous devez créer votre image docker personnalisée qui doit être basée sur debian/ubuntu. Par exemple, si nous souhaitons que OpenDevin ait accès au "node" binaire, nous utiliserions ce Dockerfile:
|
||||
Ensuite, vous devez créer votre image docker personnalisée qui doit être basée sur debian/ubuntu. Par exemple, si nous souhaitons que OpenHands ait accès au "node" binaire, nous utiliserions ce Dockerfile:
|
||||
|
||||
```bash
|
||||
# Commencez avec l'image ubuntu la plus récente
|
||||
@ -29,19 +29,19 @@ docker build -t image_personnalisée .
|
||||
|
||||
Cela produira une nouvelle image appelée ```image_personnalisée``` qui sera disponible dans Docker Engine.
|
||||
|
||||
> Remarque: Dans la configuration décrite ici, OpenDevin va fonctionner en tant que utilisateur "opendevin" à l'intérieur du sandbox et donc tous les packages installés via le Dockerfile seront disponibles pour tous les utilisateurs sur le système, pas seulement root.
|
||||
> Remarque: Dans la configuration décrite ici, OpenHands va fonctionner en tant que utilisateur "openhands" à l'intérieur du sandbox et donc tous les packages installés via le Dockerfile seront disponibles pour tous les utilisateurs sur le système, pas seulement root.
|
||||
>
|
||||
> L'installation avec apt-get ci-dessus installe nodejs pour tous les utilisateurs.
|
||||
|
||||
## Spécifiez votre image personnalisée dans le fichier config.toml
|
||||
|
||||
La configuration OpenDevin se fait via le fichier de niveau supérieur ```config.toml``` .
|
||||
Créez un fichier ```config.toml``` dans le répertoire OpenDevin et entrez ces contenus:
|
||||
La configuration OpenHands se fait via le fichier de niveau supérieur ```config.toml``` .
|
||||
Créez un fichier ```config.toml``` dans le répertoire OpenHands et entrez ces contenus:
|
||||
|
||||
```toml
|
||||
[core]
|
||||
workspace_base="./workspace"
|
||||
run_as_devin=true
|
||||
run_as_openhands=true
|
||||
sandbox_container_image="image_personnalisée"
|
||||
```
|
||||
|
||||
@ -49,7 +49,7 @@ sandbox_container_image="image_personnalisée"
|
||||
|
||||
## Exécution
|
||||
|
||||
Exécutez OpenDevin en exécutant ```make run``` dans le répertoire racine.
|
||||
Exécutez OpenHands en exécutant ```make run``` dans le répertoire racine.
|
||||
|
||||
Naviguez vers ```localhost:3001``` et vérifiez si vos dépendances souhaitées sont disponibles.
|
||||
|
||||
@ -59,39 +59,39 @@ Félicitations !
|
||||
|
||||
## Explication technique
|
||||
|
||||
Le code pertinent est défini dans [ssh_box.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/ssh_box.py) et [image_agnostic_util.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py).
|
||||
Le code pertinent est défini dans [ssh_box.py](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/ssh_box.py) et [image_agnostic_util.py](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/image_agnostic_util.py).
|
||||
|
||||
En particulier, ssh_box.py vérifie l'objet config pour ```config.sandbox_container_image``` et ensuite tente de récupérer l'image à l'aide de [get_od_sandbox_image](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L72), qui est défini dans image_agnostic_util.py.
|
||||
En particulier, ssh_box.py vérifie l'objet config pour ```config.sandbox_container_image``` et ensuite tente de récupérer l'image à l'aide de [get_od_sandbox_image](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/image_agnostic_util.py#L72), qui est défini dans image_agnostic_util.py.
|
||||
|
||||
Lorsqu'une image personnalisée est utilisée pour la première fois, elle ne sera pas trouvée et donc elle sera construite (à l'exécution ultérieure, l'image construite sera trouvée et renvoyée).
|
||||
|
||||
L'image personnalisée est construite avec [_build_sandbox_image()](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L29), qui crée un fichier docker en utilisant votre image personnalisée comme base et configure ensuite l'environnement pour OpenDevin, comme ceci:
|
||||
L'image personnalisée est construite avec [_build_sandbox_image()](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/image_agnostic_util.py#L29), qui crée un fichier docker en utilisant votre image personnalisée comme base et configure ensuite l'environnement pour OpenHands, comme ceci:
|
||||
|
||||
```python
|
||||
dockerfile_content = (
|
||||
f'FROM {base_image}\n'
|
||||
'RUN apt update && apt install -y openssh-server wget sudo\n'
|
||||
'RUN mkdir -p -m0755 /var/run/sshd\n'
|
||||
'RUN mkdir -p /opendevin && mkdir -p /opendevin/logs && chmod 777 /opendevin/logs\n'
|
||||
'RUN mkdir -p /openhands && mkdir -p /openhands/logs && chmod 777 /openhands/logs\n'
|
||||
'RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"\n'
|
||||
'RUN bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opendevin/miniforge3\n'
|
||||
'RUN bash -c ". /opendevin/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"\n'
|
||||
'RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> ~/.bashrc\n'
|
||||
'RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> /opendevin/bash.bashrc\n'
|
||||
'RUN bash Miniforge3-$(uname)-$(uname -m).sh -b -p /openhands/miniforge3\n'
|
||||
'RUN bash -c ". /openhands/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"\n'
|
||||
'RUN echo "export PATH=/openhands/miniforge3/bin:$PATH" >> ~/.bashrc\n'
|
||||
'RUN echo "export PATH=/openhands/miniforge3/bin:$PATH" >> /openhands/bash.bashrc\n'
|
||||
).strip()
|
||||
```
|
||||
|
||||
> Remarque: Le nom de l'image est modifié via [_get_new_image_name()](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L63) et c'est ce nom modifié qui sera recherché lors des exécutions ultérieures.
|
||||
> Remarque: Le nom de l'image est modifié via [_get_new_image_name()](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/image_agnostic_util.py#L63) et c'est ce nom modifié qui sera recherché lors des exécutions ultérieures.
|
||||
|
||||
## Dépannage / Erreurs
|
||||
|
||||
### Erreur: ```useradd: UID 1000 est non unique```
|
||||
Si vous voyez cette erreur dans la sortie de la console, il s'agit du fait que OpenDevin essaie de créer le utilisateur opendevin dans le sandbox avec un ID d'utilisateur de 1000, cependant cet ID d'utilisateur est déjà utilisé dans l'image (pour une raison inconnue). Pour résoudre ce problème, changez la valeur du champ sandbox_user_id dans le fichier config.toml en une valeur différente:
|
||||
Si vous voyez cette erreur dans la sortie de la console, il s'agit du fait que OpenHands essaie de créer le utilisateur openhands dans le sandbox avec un ID d'utilisateur de 1000, cependant cet ID d'utilisateur est déjà utilisé dans l'image (pour une raison inconnue). Pour résoudre ce problème, changez la valeur du champ sandbox_user_id dans le fichier config.toml en une valeur différente:
|
||||
|
||||
```toml
|
||||
[core]
|
||||
workspace_base="./workspace"
|
||||
run_as_devin=true
|
||||
run_as_openhands=true
|
||||
sandbox_container_image="image_personnalisée"
|
||||
sandbox_user_id="1001"
|
||||
```
|
||||
@ -102,4 +102,4 @@ Si vous voyez un message d'erreur indiquant que le port est utilisé ou indispon
|
||||
|
||||
## Discuter
|
||||
|
||||
Pour d'autres problèmes ou questions rejoignez le [Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) ou le [Discord](https://discord.gg/ESHStjSjD4) et demandez!
|
||||
Pour d'autres problèmes ou questions rejoignez le [Slack](https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) ou le [Discord](https://discord.gg/ESHStjSjD4) et demandez!
|
||||
|
||||
@ -4,15 +4,15 @@ sidebar_position: 6
|
||||
|
||||
# ✅ Fournir des Commentaires
|
||||
|
||||
Lorsque vous utilisez OpenDevin, vous rencontrerez sans aucun doute des cas où les choses fonctionnent bien et d'autres où elles ne fonctionnent pas. Nous vous encourageons à fournir des commentaires lorsque vous utilisez OpenDevin pour aider l'équipe de développement et, peut-être plus important encore, créer un corpus ouvert d'exemples de formation pour les agents de codage -- Partagez-OpenDevin !
|
||||
Lorsque vous utilisez OpenHands, vous rencontrerez sans aucun doute des cas où les choses fonctionnent bien et d'autres où elles ne fonctionnent pas. Nous vous encourageons à fournir des commentaires lorsque vous utilisez OpenHands pour aider l'équipe de développement et, peut-être plus important encore, créer un corpus ouvert d'exemples de formation pour les agents de codage -- Partagez-OpenHands !
|
||||
|
||||
## 📝 Comment Fournir des Commentaires
|
||||
|
||||
Fournir des commentaires est simple ! Lorsque vous utilisez OpenDevin, vous pouvez appuyer sur le bouton de pouce vers le haut ou vers le bas à n'importe quel moment de votre interaction. Vous serez invité à fournir votre adresse email (par exemple, afin que nous puissions vous contacter si nous voulons poser des questions de suivi), et vous pouvez choisir si vous souhaitez fournir des commentaires publiquement ou en privé.
|
||||
Fournir des commentaires est simple ! Lorsque vous utilisez OpenHands, vous pouvez appuyer sur le bouton de pouce vers le haut ou vers le bas à n'importe quel moment de votre interaction. Vous serez invité à fournir votre adresse email (par exemple, afin que nous puissions vous contacter si nous voulons poser des questions de suivi), et vous pouvez choisir si vous souhaitez fournir des commentaires publiquement ou en privé.
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/5rFx-StMVV0?si=svo7xzp6LhGK_GXr" title="Lecteur vidéo YouTube" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
|
||||
## 📜 Licence de Données et Confidentialité
|
||||
|
||||
* Les données **publiques** seront distribuées sous la licence MIT, comme OpenDevin lui-même, et pourront être utilisées par la communauté pour former et tester des modèles. Évidemment, les commentaires que vous pouvez rendre publics seront plus précieux pour la communauté dans son ensemble, donc lorsque vous ne traitez pas d'informations sensibles, nous vous encourageons à choisir cette option !
|
||||
* Les données **privées** ne seront partagées qu'avec l'équipe OpenDevin dans le but d'améliorer OpenDevin.
|
||||
* Les données **publiques** seront distribuées sous la licence MIT, comme OpenHands lui-même, et pourront être utilisées par la communauté pour former et tester des modèles. Évidemment, les commentaires que vous pouvez rendre publics seront plus précieux pour la communauté dans son ensemble, donc lorsque vous ne traitez pas d'informations sensibles, nous vous encourageons à choisir cette option !
|
||||
* Les données **privées** ne seront partagées qu'avec l'équipe OpenHands dans le but d'améliorer OpenHands.
|
||||
|
||||
@ -2,47 +2,47 @@
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# 💻 OpenDevin
|
||||
# 💻 OpenHands
|
||||
|
||||
OpenDevin est un **ingénieur logiciel IA autonome** capable d'exécuter des tâches d'ingénierie complexes et de collaborer activement avec les utilisateurs sur des projets de développement logiciel.
|
||||
OpenHands est un **ingénieur logiciel IA autonome** capable d'exécuter des tâches d'ingénierie complexes et de collaborer activement avec les utilisateurs sur des projets de développement logiciel.
|
||||
Ce projet est entièrement open-source, vous pouvez donc l'utiliser et le modifier comme bon vous semble.
|
||||
|
||||
:::tip
|
||||
Explorez le code source d'OpenDevin sur [GitHub](https://github.com/OpenDevin/OpenDevin) ou rejoignez l'une de nos communautés !
|
||||
Explorez le code source d'OpenHands sur [GitHub](https://github.com/All-Hands-AI/OpenHands) ou rejoignez l'une de nos communautés !
|
||||
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/graphs/contributors">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/graphs/contributors">
|
||||
<img
|
||||
src="https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/contributors/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Contributors"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/network/members">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/network/members">
|
||||
<img
|
||||
src="https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/forks/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Forks"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/stargazers">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/stargazers">
|
||||
<img
|
||||
src="https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/stars/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Stargazers"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/issues">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/issues">
|
||||
<img
|
||||
src="https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/issues/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Issues"
|
||||
/>
|
||||
</a>
|
||||
<br></br>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE">
|
||||
<img
|
||||
src="https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/license/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="MIT License"
|
||||
/>
|
||||
</a>
|
||||
<br></br>
|
||||
<a href="https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw">
|
||||
<a href="https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw">
|
||||
<img
|
||||
src="https://img.shields.io/badge/Slack-Join%20Us-red?logo=slack&logoColor=white&style=for-the-badge"
|
||||
alt="Join our Slack community"
|
||||
@ -58,10 +58,10 @@ Explorez le code source d'OpenDevin sur [GitHub](https://github.com/OpenDevin/Op
|
||||
|
||||
## 🛠️ Pour commencer
|
||||
|
||||
La manière la plus simple d'exécuter OpenDevin est à l'intérieur d'un conteneur Docker. Il fonctionne mieux avec la version la plus récente de Docker, `26.0.0`.
|
||||
La manière la plus simple d'exécuter OpenHands est à l'intérieur d'un conteneur Docker. Il fonctionne mieux avec la version la plus récente de Docker, `26.0.0`.
|
||||
Vous devez utiliser Linux, Mac OS ou WSL sur Windows.
|
||||
|
||||
Pour démarrer OpenDevin dans un conteneur docker, exécutez les commandes suivantes dans votre terminal :
|
||||
Pour démarrer OpenHands dans un conteneur docker, exécutez les commandes suivantes dans votre terminal :
|
||||
|
||||
:::warning
|
||||
Lorsque vous exécutez la commande suivante, les fichiers dans `./workspace` peuvent être modifiés ou supprimés.
|
||||
@ -77,33 +77,33 @@ docker run -it \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-p 3000:3000 \
|
||||
--add-host host.docker.internal:host-gateway \
|
||||
--name opendevin-app-$(date +%Y%m%d%H%M%S) \
|
||||
--name openhands-app-$(date +%Y%m%d%H%M%S) \
|
||||
ghcr.io/opendevin/opendevin:0.6
|
||||
```
|
||||
|
||||
Vous trouverez OpenDevin fonctionnant à l'adresse [http://localhost:3000](http://localhost:3000) avec accès à `./workspace`. Pour qu'OpenDevin fonctionne sur votre code, placez-le dans `./workspace`.
|
||||
Vous trouverez OpenHands fonctionnant à l'adresse [http://localhost:3000](http://localhost:3000) avec accès à `./workspace`. Pour qu'OpenHands fonctionne sur votre code, placez-le dans `./workspace`.
|
||||
|
||||
OpenDevin n'aura accès qu'à ce dossier de workspace. Le reste de votre système ne sera pas affecté car il s'exécute dans un bac à sable sécurisé de docker.
|
||||
OpenHands n'aura accès qu'à ce dossier de workspace. Le reste de votre système ne sera pas affecté car il s'exécute dans un bac à sable sécurisé de docker.
|
||||
|
||||
:::tip
|
||||
Si vous souhaitez utiliser la version **(instable !)** la plus récente, vous pouvez utiliser `ghcr.io/opendevin/opendevin:main` comme image (dernière ligne).
|
||||
:::
|
||||
|
||||
Pour le workflow de développement, consultez [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md).
|
||||
Pour le workflow de développement, consultez [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md).
|
||||
|
||||
Avez-vous des problèmes ? Consultez notre [Guide de dépannage](https://docs.all-hands.dev/modules/usage/troubleshooting).
|
||||
|
||||
:::warning
|
||||
OpenDevin est actuellement en cours de développement, mais vous pouvez déjà exécuter la version alpha pour voir le système de bout en bout en action.
|
||||
OpenHands est actuellement en cours de développement, mais vous pouvez déjà exécuter la version alpha pour voir le système de bout en bout en action.
|
||||
:::
|
||||
|
||||
[contributors-shield]: https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge
|
||||
[contributors-url]: https://github.com/OpenDevin/OpenDevin/graphs/contributors
|
||||
[forks-shield]: https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge
|
||||
[forks-url]: https://github.com/OpenDevin/OpenDevin/network/members
|
||||
[stars-shield]: https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge
|
||||
[stars-url]: https://github.com/OpenDevin/OpenDevin/stargazers
|
||||
[issues-shield]: https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge
|
||||
[issues-url]: https://github.com/OpenDevin/OpenDevin/issues
|
||||
[license-shield]: https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge
|
||||
[license-url]: https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE
|
||||
[contributors-shield]: https://img.shields.io/github/contributors/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[contributors-url]: https://github.com/All-Hands-AI/OpenHands/graphs/contributors
|
||||
[forks-shield]: https://img.shields.io/github/forks/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[forks-url]: https://github.com/All-Hands-AI/OpenHands/network/members
|
||||
[stars-shield]: https://img.shields.io/github/stars/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[stars-url]: https://github.com/All-Hands-AI/OpenHands/stargazers
|
||||
[issues-shield]: https://img.shields.io/github/issues/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[issues-url]: https://github.com/All-Hands-AI/OpenHands/issues
|
||||
[license-shield]: https://img.shields.io/github/license/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[license-url]: https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
## Complétion
|
||||
|
||||
OpenDevin utilise LiteLLM pour les appels de complétion. Vous pouvez trouver leur documentation sur Azure [ici](https://docs.litellm.ai/docs/providers/azure)
|
||||
OpenHands utilise LiteLLM pour les appels de complétion. Vous pouvez trouver leur documentation sur Azure [ici](https://docs.litellm.ai/docs/providers/azure)
|
||||
|
||||
### Configurations openai Azure
|
||||
|
||||
Lors de l'exécution de l'image Docker OpenDevin, vous devrez définir les variables d'environnement suivantes en utilisant `-e` :
|
||||
Lors de l'exécution de l'image Docker OpenHands, vous devrez définir les variables d'environnement suivantes en utilisant `-e` :
|
||||
|
||||
```
|
||||
LLM_BASE_URL="<azure-api-base-url>" # e.g. "https://openai-gpt-4-test-v-1.openai.azure.com/"
|
||||
@ -16,19 +16,19 @@ LLM_API_VERSION = "<api-version>" # e.g. "2024-02-15-preview"
|
||||
```
|
||||
|
||||
:::note
|
||||
Vous pouvez trouver le nom de votre déploiement ChatGPT sur la page des déploiements sur Azure. Par défaut ou initialement, il pourrait être le même que le nom du modèle de chat (par exemple 'GPT4-1106-preview'), mais il n'est pas obligé de l'être. Exécutez OpenDevin, et une fois chargé dans le navigateur, allez dans Paramètres et définissez le modèle comme suit : "azure/<your-actual-gpt-deployment-name>". Si ce n'est pas dans la liste, entrez votre propre texte et enregistrez-le.
|
||||
Vous pouvez trouver le nom de votre déploiement ChatGPT sur la page des déploiements sur Azure. Par défaut ou initialement, il pourrait être le même que le nom du modèle de chat (par exemple 'GPT4-1106-preview'), mais il n'est pas obligé de l'être. Exécutez OpenHands, et une fois chargé dans le navigateur, allez dans Paramètres et définissez le modèle comme suit : "azure/<your-actual-gpt-deployment-name>". Si ce n'est pas dans la liste, entrez votre propre texte et enregistrez-le.
|
||||
:::
|
||||
|
||||
## Embeddings
|
||||
|
||||
OpenDevin utilise llama-index pour les embeddings. Vous pouvez trouver leur documentation sur Azure [ici](https://docs.llamaindex.ai/en/stable/api_reference/embeddings/azure_openai/)
|
||||
OpenHands utilise llama-index pour les embeddings. Vous pouvez trouver leur documentation sur Azure [ici](https://docs.llamaindex.ai/en/stable/api_reference/embeddings/azure_openai/)
|
||||
|
||||
### Configurations openai Azure
|
||||
|
||||
Le modèle utilisé pour les embeddings Azure OpenAI est "text-embedding-ada-002".
|
||||
Vous avez besoin du nom de déploiement correct pour ce modèle dans votre compte Azure.
|
||||
|
||||
Lors de l'exécution d'OpenDevin dans Docker, définissez les variables d'environnement suivantes en utilisant `-e` :
|
||||
Lors de l'exécution d'OpenHands dans Docker, définissez les variables d'environnement suivantes en utilisant `-e` :
|
||||
|
||||
```
|
||||
LLM_EMBEDDING_MODEL="azureopenai"
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
|
||||
## Complétion
|
||||
|
||||
OpenDevin utilise LiteLLM pour les appels de complétion. Les ressources suivantes sont pertinentes pour utiliser OpenDevin avec les LLMs de Google :
|
||||
OpenHands utilise LiteLLM pour les appels de complétion. Les ressources suivantes sont pertinentes pour utiliser OpenHands avec les LLMs de Google :
|
||||
|
||||
- [Gemini - Google AI Studio](https://docs.litellm.ai/docs/providers/gemini)
|
||||
- [VertexAI - Google Cloud Platform](https://docs.litellm.ai/docs/providers/vertex)
|
||||
|
||||
### Configurations de Gemini - Google AI Studio
|
||||
|
||||
Pour utiliser Gemini via Google AI Studio lors de l'exécution de l'image Docker d'OpenDevin, vous devez définir les variables d'environnement suivantes en utilisant `-e` :
|
||||
Pour utiliser Gemini via Google AI Studio lors de l'exécution de l'image Docker d'OpenHands, vous devez définir les variables d'environnement suivantes en utilisant `-e` :
|
||||
|
||||
```
|
||||
GEMINI_API_KEY="<votre-cle-api-google>"
|
||||
@ -18,7 +18,7 @@ LLM_MODEL="gemini/gemini-1.5-pro"
|
||||
|
||||
### Configurations de Vertex AI - Google Cloud Platform
|
||||
|
||||
Pour utiliser Vertex AI via Google Cloud Platform lors de l'exécution de l'image Docker d'OpenDevin, vous devez définir les variables d'environnement suivantes en utilisant `-e` :
|
||||
Pour utiliser Vertex AI via Google Cloud Platform lors de l'exécution de l'image Docker d'OpenHands, vous devez définir les variables d'environnement suivantes en utilisant `-e` :
|
||||
|
||||
```
|
||||
GOOGLE_APPLICATION_CREDENTIALS="<dump-json-du-compte-de-service-gcp-json>"
|
||||
|
||||
@ -4,16 +4,16 @@ sidebar_position: 2
|
||||
|
||||
# 🤖 Backends LLM
|
||||
|
||||
OpenDevin peut fonctionner avec n'importe quel backend LLM.
|
||||
OpenHands peut fonctionner avec n'importe quel backend LLM.
|
||||
Pour une liste complète des fournisseurs et des modèles LM disponibles, veuillez consulter la
|
||||
[documentation litellm](https://docs.litellm.ai/docs/providers).
|
||||
|
||||
:::warning
|
||||
OpenDevin émettra de nombreuses invitations au LLM que vous configurez. La plupart de ces LLM coûtent de l'argent -- assurez-vous de définir des limites de dépenses et de surveiller l'utilisation.
|
||||
OpenHands émettra de nombreuses invitations au LLM que vous configurez. La plupart de ces LLM coûtent de l'argent -- assurez-vous de définir des limites de dépenses et de surveiller l'utilisation.
|
||||
:::
|
||||
|
||||
La variable d'environnement `LLM_MODEL` contrôle le modèle utilisé dans les interactions programmatiques.
|
||||
Mais en utilisant l'interface utilisateur OpenDevin, vous devrez choisir votre modèle dans la fenêtre des paramètres (la roue dentée en bas à gauche).
|
||||
Mais en utilisant l'interface utilisateur OpenHands, vous devrez choisir votre modèle dans la fenêtre des paramètres (la roue dentée en bas à gauche).
|
||||
|
||||
Les variables d'environnement suivantes peuvent être nécessaires pour certains LLM :
|
||||
|
||||
@ -23,7 +23,7 @@ Les variables d'environnement suivantes peuvent être nécessaires pour certains
|
||||
- `LLM_EMBEDDING_DEPLOYMENT_NAME`
|
||||
- `LLM_API_VERSION`
|
||||
|
||||
Nous avons quelques guides pour exécuter OpenDevin avec des fournisseurs de modèles spécifiques :
|
||||
Nous avons quelques guides pour exécuter OpenHands avec des fournisseurs de modèles spécifiques :
|
||||
|
||||
- [ollama](llms/local-llms)
|
||||
- [Azure](llms/azure-llms)
|
||||
@ -34,11 +34,11 @@ Si vous utilisez un autre fournisseur, nous vous encourageons à ouvrir une PR p
|
||||
|
||||
Les meilleurs modèles sont GPT-4 et Claude 3. Les modèles locaux et open source actuels ne sont pas aussi puissants.
|
||||
Lors de l'utilisation d'un modèle alternatif, vous pouvez constater des temps d'attente prolongés entre les messages,
|
||||
des réponses de mauvaise qualité ou des erreurs sur des JSON mal formés. OpenDevin
|
||||
des réponses de mauvaise qualité ou des erreurs sur des JSON mal formés. OpenHands
|
||||
ne peut être aussi puissant que les modèles qui le pilotent -- heureusement, les membres de notre équipe travaillent activement à la construction de meilleurs modèles open source !
|
||||
|
||||
## Réessais d'API et limites de taux
|
||||
|
||||
Certains LLM ont des limites de taux et peuvent nécessiter des réessais. OpenDevin réessaiera automatiquement les demandes s'il reçoit une erreur 429 ou une erreur de connexion API.
|
||||
Certains LLM ont des limites de taux et peuvent nécessiter des réessais. OpenHands réessaiera automatiquement les demandes s'il reçoit une erreur 429 ou une erreur de connexion API.
|
||||
Vous pouvez définir les variables d'environnement `LLM_NUM_RETRIES`, `LLM_RETRY_MIN_WAIT`, `LLM_RETRY_MAX_WAIT` pour contrôler le nombre de réessais et le temps entre les réessais.
|
||||
Par défaut, `LLM_NUM_RETRIES` est 5 et `LLM_RETRY_MIN_WAIT`, `LLM_RETRY_MAX_WAIT` sont respectivement de 3 secondes et 60 secondes.
|
||||
|
||||
@ -24,11 +24,11 @@ mistral:7b-instruct-v0.2-q4_K_M eb14864c7427 4.4 GB 2 weeks ago
|
||||
starcoder2:latest f67ae0f64584 1.7 GB 19 hours ago
|
||||
```
|
||||
|
||||
## Démarrer OpenDevin
|
||||
## Démarrer OpenHands
|
||||
|
||||
### Docker
|
||||
|
||||
Utilisez les instructions [ici](../intro) pour démarrer OpenDevin en utilisant Docker.
|
||||
Utilisez les instructions [ici](../intro) pour démarrer OpenHands en utilisant Docker.
|
||||
Mais lors de l'exécution de `docker run`, vous devrez ajouter quelques arguments supplémentaires :
|
||||
|
||||
```bash
|
||||
@ -40,7 +40,7 @@ Mais lors de l'exécution de `docker run`, vous devrez ajouter quelques argument
|
||||
Par exemple :
|
||||
|
||||
```bash
|
||||
# Le répertoire que vous souhaitez qu'OpenDevin modifie. DOIT être un chemin absolu !
|
||||
# Le répertoire que vous souhaitez qu'OpenHands modifie. DOIT être un chemin absolu !
|
||||
export WORKSPACE_BASE=$(pwd)/workspace
|
||||
|
||||
docker run \
|
||||
@ -61,7 +61,7 @@ Vous devriez maintenant pouvoir vous connecter à `http://localhost:3000/`
|
||||
|
||||
### Compiler à partir des sources
|
||||
|
||||
Utilisez les instructions dans [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md) pour compiler OpenDevin.
|
||||
Utilisez les instructions dans [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) pour compiler OpenHands.
|
||||
Assurez-vous que `config.toml` soit présent en exécutant `make setup-config` qui en créera un pour vous. Dans `config.toml`, saisissez les éléments suivants :
|
||||
|
||||
```
|
||||
@ -79,7 +79,7 @@ Fini ! Vous pouvez maintenant démarrer Devin avec : `make run` sans Docker. Vou
|
||||
|
||||
## Sélection de votre modèle
|
||||
|
||||
Dans l'interface OpenDevin, cliquez sur l'icône des paramètres en bas à gauche.
|
||||
Dans l'interface OpenHands, cliquez sur l'icône des paramètres en bas à gauche.
|
||||
Ensuite, dans l'entrée `Model`, saisissez `ollama/codellama:7b`, ou le nom du modèle que vous avez téléchargé précédemment.
|
||||
S'il n'apparaît pas dans un menu déroulant, ce n'est pas grave, tapez-le simplement. Cliquez sur Enregistrer lorsque vous avez terminé.
|
||||
|
||||
@ -87,7 +87,7 @@ Et maintenant, vous êtes prêt à démarrer !
|
||||
|
||||
## Configuration du service ollama (WSL){#configuring-ollama-service-fr}
|
||||
|
||||
La configuration par défaut pour ollama sous WSL ne sert que localhost. Cela signifie que vous ne pouvez pas l'atteindre depuis un conteneur docker, par exemple, il ne fonctionnera pas avec OpenDevin. Testons d'abord que ollama est en cours d'exécution correctement.
|
||||
La configuration par défaut pour ollama sous WSL ne sert que localhost. Cela signifie que vous ne pouvez pas l'atteindre depuis un conteneur docker, par exemple, il ne fonctionnera pas avec OpenHands. Testons d'abord que ollama est en cours d'exécution correctement.
|
||||
|
||||
```bash
|
||||
ollama list # obtenir la liste des modèles installés
|
||||
@ -99,7 +99,7 @@ curl http://localhost:11434/api/generate -d '{"model":"[NAME]","prompt":"hi"}'
|
||||
Une fois cela fait, testez qu'il accepte les requêtes "externes", comme celles provenant d'un conteneur docker.
|
||||
|
||||
```bash
|
||||
docker ps # obtenir la liste des conteneurs docker en cours d'exécution, pour un test le plus précis choisissez le conteneur de sandbox open devin.
|
||||
docker ps # obtenir la liste des conteneurs docker en cours d'exécution, pour un test le plus précis choisissez le conteneur de sandbox OpenHands.
|
||||
docker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d '{"model":"[NAME]","prompt":"hi"}'
|
||||
#ex. docker exec cd9cc82f7a11 curl http://host.docker.internal:11434/api/generate -d '{"model":"codellama","prompt":"hi"}'
|
||||
```
|
||||
@ -136,6 +136,6 @@ Enfin, testez que ollama est accessible depuis le conteneur
|
||||
|
||||
```bash
|
||||
ollama list # obtenir la liste des modèles installés
|
||||
docker ps # obtenir la liste des conteneurs docker en cours d'exécution, pour un test le plus précis choisissez le conteneur de sandbox open devin.
|
||||
docker ps # obtenir la liste des conteneurs docker en cours d'exécution, pour un test le plus précis choisissez le conteneur de sandbox OpenHands.
|
||||
docker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d '{"model":"[NAME]","prompt":"hi"}'
|
||||
```
|
||||
|
||||
@ -20,7 +20,7 @@ Si vous utilisez Windows et que vous rencontrez des problèmes, consultez notre
|
||||
|
||||
## Impossible de se connecter à Docker
|
||||
|
||||
[Problème GitHub](https://github.com/OpenDevin/OpenDevin/issues/1226)
|
||||
[Problème GitHub](https://github.com/All-Hands-AI/OpenHands/issues/1226)
|
||||
|
||||
### Symptômes
|
||||
|
||||
@ -34,7 +34,7 @@ docker.errors.DockerException: Erreur lors de la récupération de la version de
|
||||
|
||||
### Détails
|
||||
|
||||
OpenDevin utilise un conteneur Docker pour effectuer son travail en toute sécurité, sans risquer de briser votre machine.
|
||||
OpenHands utilise un conteneur Docker pour effectuer son travail en toute sécurité, sans risquer de briser votre machine.
|
||||
|
||||
### Solutions de contournement
|
||||
|
||||
@ -45,7 +45,7 @@ OpenDevin utilise un conteneur Docker pour effectuer son travail en toute sécur
|
||||
|
||||
## Impossible de se connecter à la boîte SSH
|
||||
|
||||
[Problème GitHub](https://github.com/OpenDevin/OpenDevin/issues/1156)
|
||||
[Problème GitHub](https://github.com/All-Hands-AI/OpenHands/issues/1156)
|
||||
|
||||
### Symptômes
|
||||
|
||||
@ -57,7 +57,7 @@ pexpect.pxssh.ExceptionPxssh: Impossible d'établir une connexion avec l'hôte
|
||||
|
||||
### Détails
|
||||
|
||||
Par défaut, OpenDevin se connecte à un conteneur en cours d'exécution via SSH. Sur certaines machines,
|
||||
Par défaut, OpenHands se connecte à un conteneur en cours d'exécution via SSH. Sur certaines machines,
|
||||
en particulier Windows, cela semble échouer.
|
||||
|
||||
### Solutions de contournement
|
||||
@ -65,11 +65,11 @@ en particulier Windows, cela semble échouer.
|
||||
* Redémarrez votre ordinateur (parfois cela fonctionne)
|
||||
* Assurez-vous d'avoir les dernières versions de WSL et Docker
|
||||
* Vérifiez que votre distribution dans WSL est également à jour
|
||||
* Essayez [ce guide de réinstallation](https://github.com/OpenDevin/OpenDevin/issues/1156#issuecomment-2064549427)
|
||||
* Essayez [ce guide de réinstallation](https://github.com/All-Hands-AI/OpenHands/issues/1156#issuecomment-2064549427)
|
||||
|
||||
## Impossible de se connecter à LLM
|
||||
|
||||
[Problème GitHub](https://github.com/OpenDevin/OpenDevin/issues/1208)
|
||||
[Problème GitHub](https://github.com/All-Hands-AI/OpenHands/issues/1208)
|
||||
|
||||
### Symptômes
|
||||
|
||||
@ -82,9 +82,9 @@ AttributeError: 'NoneType' object has no attribute 'request'
|
||||
|
||||
### Détails
|
||||
|
||||
[Problèmes GitHub](https://github.com/OpenDevin/OpenDevin/issues?q=is%3Aissue+is%3Aopen+404)
|
||||
[Problèmes GitHub](https://github.com/All-Hands-AI/OpenHands/issues?q=is%3Aissue+is%3Aopen+404)
|
||||
|
||||
Cela se produit généralement avec les configurations de LLM *locales*, lorsque OpenDevin ne parvient pas à se connecter au serveur LLM.
|
||||
Cela se produit généralement avec les configurations de LLM *locales*, lorsque OpenHands ne parvient pas à se connecter au serveur LLM.
|
||||
Consultez notre guide pour [LLMs locaux](llms/local-llms) pour plus d'informations.
|
||||
|
||||
### Solutions de contournement
|
||||
@ -179,24 +179,24 @@ export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
|
||||
### Symptômes
|
||||
|
||||
OpenDevin demande généralement s'il faut reprendre ou commencer une nouvelle session lors de l'ouverture de l'interface utilisateur.
|
||||
OpenHands demande généralement s'il faut reprendre ou commencer une nouvelle session lors de l'ouverture de l'interface utilisateur.
|
||||
Mais cliquer sur "Reprendre" démarre toujours une toute nouvelle discussion.
|
||||
|
||||
### Détails
|
||||
|
||||
Avec une installation standard à ce jour, les données de session sont stockées en mémoire.
|
||||
Actuellement, si le service OpenDevin est redémarré, les sessions précédentes deviennent
|
||||
Actuellement, si le service OpenHands est redémarré, les sessions précédentes deviennent
|
||||
invalides (un nouveau secret est généré) et donc non récupérables.
|
||||
|
||||
### Solutions de contournement
|
||||
|
||||
* Modifiez la configuration pour rendre les sessions persistantes en éditant le fichier `config.toml`
|
||||
(dans le dossier racine d'OpenDevin) en spécifiant un `file_store` et un
|
||||
(dans le dossier racine d'OpenHands) en spécifiant un `file_store` et un
|
||||
`file_store_path` absolu :
|
||||
|
||||
```toml
|
||||
file_store="local"
|
||||
file_store_path="/absolute/path/to/opendevin/cache/directory"
|
||||
file_store_path="/absolute/path/to/openhands/cache/directory"
|
||||
```
|
||||
|
||||
* Ajoutez un secret jwt fixe dans votre .bashrc, comme ci-dessous, afin que les id de session précédents
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Notes pour les utilisateurs de Windows et WSL
|
||||
|
||||
OpenDevin ne supporte Windows que via [WSL](https://learn.microsoft.com/en-us/windows/wsl/install).
|
||||
OpenHands ne supporte Windows que via [WSL](https://learn.microsoft.com/en-us/windows/wsl/install).
|
||||
Veuillez vous assurer de lancer toutes les commandes à l'intérieur de votre terminal WSL.
|
||||
|
||||
## Dépannage
|
||||
@ -12,8 +12,8 @@ Docker doit également avoir l'option d'intégration WSL activée.
|
||||
|
||||
### Recommandation : Ne pas exécuter en tant qu'utilisateur root
|
||||
|
||||
Pour des raisons de sécurité, il est fortement recommandé de ne pas exécuter OpenDevin en tant qu'utilisateur root, mais en tant qu'utilisateur avec un UID non nul.
|
||||
De plus, les sandboxes persistants ne seront pas pris en charge lors de l'exécution en tant que root et un message approprié pourrait apparaître lors du démarrage d'OpenDevin.
|
||||
Pour des raisons de sécurité, il est fortement recommandé de ne pas exécuter OpenHands en tant qu'utilisateur root, mais en tant qu'utilisateur avec un UID non nul.
|
||||
De plus, les sandboxes persistants ne seront pas pris en charge lors de l'exécution en tant que root et un message approprié pourrait apparaître lors du démarrage d'OpenHands.
|
||||
|
||||
Références :
|
||||
|
||||
@ -21,12 +21,12 @@ Références :
|
||||
* [Définir l'utilisateur par défaut dans WSL](https://www.tenforums.com/tutorials/128152-set-default-user-windows-subsystem-linux-distro-windows-10-a.html#option2)
|
||||
Astuce pour la 2e référence : pour les utilisateurs d'Ubuntu, la commande pourrait en fait être "ubuntupreview" au lieu de "ubuntu".
|
||||
|
||||
### Échec de la création de l'utilisateur opendevin
|
||||
### Échec de la création de l'utilisateur openhands
|
||||
|
||||
Si vous rencontrez l'erreur suivante lors de l'installation :
|
||||
|
||||
```sh
|
||||
Exception: Failed to create opendevin user in sandbox: 'useradd: UID 0 is not unique'
|
||||
Exception: Failed to create openhands user in sandbox: 'useradd: UID 0 is not unique'
|
||||
```
|
||||
|
||||
Vous pouvez la résoudre en exécutant :
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
{
|
||||
"title": {
|
||||
"message": "OpenDevin",
|
||||
"message": "OpenHands",
|
||||
"description": "The title in the navbar"
|
||||
},
|
||||
"logo.alt": {
|
||||
"message": "OpenDevin",
|
||||
"message": "OpenHands",
|
||||
"description": "The alt text of navbar logo"
|
||||
},
|
||||
"item.label.Docs": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"footer.title": {
|
||||
"message": "OpenDevin"
|
||||
"message": "OpenHands"
|
||||
},
|
||||
"footer.docs": {
|
||||
"message": "文档"
|
||||
@ -9,7 +9,7 @@
|
||||
"message": "社区"
|
||||
},
|
||||
"footer.copyright": {
|
||||
"message": "版权所有 © {year} OpenDevin"
|
||||
"message": "版权所有 © {year} OpenHands"
|
||||
},
|
||||
"faq.title": {
|
||||
"message": "常见问题解答",
|
||||
@ -19,20 +19,20 @@
|
||||
"message": "常见问题解答"
|
||||
},
|
||||
"faq.section.title.1": {
|
||||
"message": "什么是OpenDevin?",
|
||||
"message": "什么是OpenHands?",
|
||||
"description": "First Section Title"
|
||||
},
|
||||
"faq.section.highlight": {
|
||||
"message": "OpenDevin",
|
||||
"message": "OpenHands",
|
||||
"description": "Highlight Text"
|
||||
},
|
||||
"faq.section.description.1": {
|
||||
"message": "是一个自主的软件工程师,能够端到端地解决软件工程和网页浏览任务。它能执行数据科学查询,如 \"查找上个月OpenDevin仓库中的拉取请求数量\",还能处理软件工程任务,例如 \"请为这个文件添加测试并验证所有测试都通过,如果没有修复该文件\"。",
|
||||
"description": "Description for OpenDevin"
|
||||
"message": "是一个自主的软件工程师,能够端到端地解决软件工程和网页浏览任务。它能执行数据科学查询,如 \"查找上个月OpenHands仓库中的拉取请求数量\",还能处理软件工程任务,例如 \"请为这个文件添加测试并验证所有测试都通过,如果没有修复该文件\"。",
|
||||
"description": "Description for OpenHands"
|
||||
},
|
||||
"faq.section.description.2": {
|
||||
"message": "同时,OpenDevin是一个代理开发者平台和社区,用于测试和评估新代理的环境。",
|
||||
"description": "Further Description for OpenDevin"
|
||||
"message": "同时,OpenHands是一个代理开发者平台和社区,用于测试和评估新代理的环境。",
|
||||
"description": "Further Description for OpenHands"
|
||||
},
|
||||
"faq.section.title.2": {
|
||||
"message": "支持",
|
||||
@ -43,15 +43,15 @@
|
||||
"description": "Support Answer"
|
||||
},
|
||||
"faq.section.title.3": {
|
||||
"message": "如何使用OpenDevin解决GitHub上的问题?",
|
||||
"message": "如何使用OpenHands解决GitHub上的问题?",
|
||||
"description": "GitHub Issue Section Title"
|
||||
},
|
||||
"faq.section.github.steps.intro": {
|
||||
"message": "要通过OpenDevin解决GitHub上的问题,您可以发送一个提示给OpenDevin,请它按照以下步骤操作:",
|
||||
"message": "要通过OpenHands解决GitHub上的问题,您可以发送一个提示给OpenHands,请它按照以下步骤操作:",
|
||||
"description": "GitHub Steps Introduction"
|
||||
},
|
||||
"faq.section.github.step1": {
|
||||
"message": "阅读问题 https://github.com/OpenDevin/OpenDevin/issues/1611",
|
||||
"message": "阅读问题 https://github.com/All-Hands-AI/OpenHands/issues/1611",
|
||||
"description": "GitHub Step 1"
|
||||
},
|
||||
"faq.section.github.step2": {
|
||||
@ -71,11 +71,11 @@
|
||||
"description": "GitHub Step 5"
|
||||
},
|
||||
"faq.section.github.steps.preRun": {
|
||||
"message": "在运行OpenDevin之前,您可以:",
|
||||
"message": "在运行OpenHands之前,您可以:",
|
||||
"description": "GitHub Steps Pre-Run"
|
||||
},
|
||||
"faq.section.github.steps.tokenInfo": {
|
||||
"message": "其中XXX是您创建的一个具有对OpenDevin仓库写权限的GitHub令牌。如果您的写入权限不足,请将其更改为:",
|
||||
"message": "其中XXX是您创建的一个具有对OpenHands仓库写权限的GitHub令牌。如果您的写入权限不足,请将其更改为:",
|
||||
"description": "GitHub Steps Token Info"
|
||||
},
|
||||
"faq.section.github.steps.usernameInfo": {
|
||||
@ -83,23 +83,23 @@
|
||||
"description": "GitHub Steps Username Info"
|
||||
},
|
||||
"faq.section.title.4": {
|
||||
"message": "OpenDevin与Devin有何不同?",
|
||||
"message": "OpenHands与Devin有何不同?",
|
||||
"description": "Devin Section Title"
|
||||
},
|
||||
"faq.section.devin.linkText": {
|
||||
"faq.section.openhands.linkText": {
|
||||
"message": "Devin",
|
||||
"description": "Devin Link Text"
|
||||
},
|
||||
"faq.section.devin.description": {
|
||||
"message": "是由Cognition Inc.开发的商业产品,它最初为OpenDevin提供了灵感。它们都旨在擅长解决软件工程任务,但您可以下载、使用和修改OpenDevin,而Devin只能通过Cognition网站进行访问。此外,OpenDevin已超越最初的灵感,并成为一个面向代理开发者的社区驱动生态系统,在这里我们欢迎您加入并",
|
||||
"faq.section.openhands.description": {
|
||||
"message": "是由Cognition Inc.开发的商业产品,它最初为OpenHands提供了灵感。它们都旨在擅长解决软件工程任务,但您可以下载、使用和修改OpenHands,而Devin只能通过Cognition网站进行访问。此外,OpenHands已超越最初的灵感,并成为一个面向代理开发者的社区驱动生态系统,在这里我们欢迎您加入并",
|
||||
"description": "Devin Description"
|
||||
},
|
||||
"faq.section.devin.contribute": {
|
||||
"faq.section.openhands.contribute": {
|
||||
"message": "贡献",
|
||||
"description": "Contribute Link"
|
||||
},
|
||||
"faq.section.title.5": {
|
||||
"message": "OpenDevin与ChatGPT有何不同?",
|
||||
"message": "OpenHands与ChatGPT有何不同?",
|
||||
"description": "ChatGPT Section Title"
|
||||
},
|
||||
"faq.section.chatgpt.description": {
|
||||
@ -114,7 +114,7 @@
|
||||
"message": "开始使用"
|
||||
},
|
||||
"welcome.message": {
|
||||
"message": "欢迎来到OpenDevin,这是一个开源自主AI软件工程师,能够执行复杂的工程任务,并积极参与用户在软件开发项目中的协作。"
|
||||
"message": "欢迎来到OpenHands,这是一个开源自主AI软件工程师,能够执行复杂的工程任务,并积极参与用户在软件开发项目中的协作。"
|
||||
},
|
||||
"theme.ErrorPageContent.title": {
|
||||
"message": "页面已崩溃。",
|
||||
|
||||
@ -19,35 +19,35 @@ sidebar_position: 7
|
||||
|
||||
## 🤝 如何贡献
|
||||
|
||||
OpenDevin 是一个社区驱动的项目,我们欢迎每个人的贡献。无论您是开发人员、研究人员,还是对用 AI 提升软件工程领域有兴趣,只要您愿意参与,我们都有很多方式可供选择:
|
||||
OpenHands 是一个社区驱动的项目,我们欢迎每个人的贡献。无论您是开发人员、研究人员,还是对用 AI 提升软件工程领域有兴趣,只要您愿意参与,我们都有很多方式可供选择:
|
||||
|
||||
- **代码贡献:** 帮助我们开发核心功能、前端界面或沙箱解决方案。
|
||||
- **研究和评价:** 贡献您对 LLM 在软件工程领域理解的见解,参与评估模型,或提出改进建议。
|
||||
- **反馈和测试:** 使用 OpenDevin 工具集,报告错误,建议功能,或提供可用性方面的反馈。
|
||||
- **反馈和测试:** 使用 OpenHands 工具集,报告错误,建议功能,或提供可用性方面的反馈。
|
||||
|
||||
详情请查阅[此文件](https://github.com/OpenDevin/OpenDevin/blob/main/CONTRIBUTING.md)。
|
||||
详情请查阅[此文件](https://github.com/All-Hands-AI/OpenHands/blob/main/CONTRIBUTING.md)。
|
||||
|
||||
## 🤖 加入我们的社区
|
||||
|
||||
我们现在有一个 Slack 工作区,用于合作建设 OpenDevin,还设有一个 Discord 服务器,用于讨论与该项目、LLM、代理等相关的任何事情。
|
||||
我们现在有一个 Slack 工作区,用于合作建设 OpenHands,还设有一个 Discord 服务器,用于讨论与该项目、LLM、代理等相关的任何事情。
|
||||
|
||||
- [Slack 工作区](https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw)
|
||||
- [Slack 工作区](https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw)
|
||||
- [Discord 服务器](https://discord.gg/ESHStjSjD4)
|
||||
|
||||
如果您愿意贡献,请随时加入我们的社区。让我们一起简化软件工程!
|
||||
|
||||
🐚 **少写代码,用 OpenDevin 做更多的事情。**
|
||||
🐚 **少写代码,用 OpenHands 做更多的事情。**
|
||||
|
||||
[](https://star-history.com/#OpenDevin/OpenDevin&Date)
|
||||
[](https://star-history.com/#All-Hands-AI/OpenHands&Date)
|
||||
|
||||
## 🛠️ 技术选型
|
||||
|
||||
OpenDevin 使用了一系列强大的框架和库,提供了坚实的开发基础。以下是项目中使用的关键技术:
|
||||
OpenHands 使用了一系列强大的框架和库,提供了坚实的开发基础。以下是项目中使用的关键技术:
|
||||
|
||||
       
|
||||
|
||||
请注意,这些技术选型仍在进行中,随着项目的发展,可能会添加新的技术或移除现有的技术。我们努力采用最适合、最高效的工具,以增强 OpenDevin 的能力。
|
||||
请注意,这些技术选型仍在进行中,随着项目的发展,可能会添加新的技术或移除现有的技术。我们努力采用最适合、最高效的工具,以增强 OpenHands 的能力。
|
||||
|
||||
## 📜 许可证
|
||||
|
||||
根据 MIT 许可证分发。详见[我们的许可证](https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE)了解更多信息。
|
||||
根据 MIT 许可证分发。详见[我们的许可证](https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE)了解更多信息。
|
||||
|
||||
@ -18,18 +18,18 @@ sidebar_position: 3
|
||||
- 执行任何有效的Linux `bash`命令
|
||||
- 使用[交互式Python解释器](https://ipython.org/)执行任何有效的 `Python`代码。这是通过`bash`命令模拟的,详细信息请参见插件系统。
|
||||
|
||||

|
||||

|
||||
|
||||
### 插件系统
|
||||
|
||||
为了使CodeAct agent在仅能访问`bash`动作空间时更强大,CodeAct agent利用了OpenDevin的插件系统:
|
||||
为了使CodeAct agent在仅能访问`bash`动作空间时更强大,CodeAct agent利用了OpenHands的插件系统:
|
||||
|
||||
- [Jupyter插件](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/jupyter):通过bash命令实现IPython执行
|
||||
- [SWE-agent工具插件](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/swe_agent_commands):为软件开发任务引入的强大bash命令行工具,由[swe-agent](https://github.com/princeton-nlp/swe-agent)提供。
|
||||
- [Jupyter插件](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/jupyter):通过bash命令实现IPython执行
|
||||
- [SWE-agent工具插件](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/swe_agent_commands):为软件开发任务引入的强大bash命令行工具,由[swe-agent](https://github.com/princeton-nlp/swe-agent)提供。
|
||||
|
||||
### 演示
|
||||
|
||||
https://github.com/OpenDevin/OpenDevin/assets/38853559/f592a192-e86c-4f48-ad31-d69282d5f6ac
|
||||
https://github.com/All-Hands-AI/OpenHands/assets/38853559/f592a192-e86c-4f48-ad31-d69282d5f6ac
|
||||
|
||||
_CodeActAgent使用`gpt-4-turbo-2024-04-09`执行数据科学任务(线性回归)的示例_
|
||||
|
||||
|
||||
@ -25,13 +25,13 @@ _**免责声明**:后端架构正在进行中,可能会有所变化。下图
|
||||
|
||||
## 前提条件
|
||||
|
||||
- 能运行 python 环境,其中 opendevin 可以执行(根据存储库根目录中的 README.md 文件中的说明)
|
||||
- 能运行 python 环境,其中 openhands 可以执行(根据存储库根目录中的 README.md 文件中的说明)
|
||||
- 安装了 [py2puml](https://github.com/lucsorel/py2puml)
|
||||
|
||||
## 步骤
|
||||
|
||||
1. 通过从存储库根目录运行以下命令自动生成图表:
|
||||
`py2puml opendevin opendevin > docs/architecture/backend_architecture.puml`
|
||||
`py2puml openhands openhands > docs/architecture/backend_architecture.puml`
|
||||
|
||||
2. 在 PlantUML 编辑器中打开生成的文件,例如使用 PlantUML 扩展的 Visual Studio Code 或 [PlantText](https://www.planttext.com/)
|
||||
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
# 💿 如何创建自定义 Docker 沙箱
|
||||
|
||||
默认的 OpenDevin 沙箱包含一个[最小化 ubuntu 配置](https://github.com/OpenDevin/OpenDevin/blob/main/containers/sandbox/Dockerfile)。您的应用场景可能需要在默认状态下安装额外的软件。本指南将教您如何通过使用自定义 Docker 映像来实现这一目标。
|
||||
默认的 OpenHands 沙箱包含一个[最小化 ubuntu 配置](https://github.com/All-Hands-AI/OpenHands/blob/main/containers/sandbox/Dockerfile)。您的应用场景可能需要在默认状态下安装额外的软件。本指南将教您如何通过使用自定义 Docker 映像来实现这一目标。
|
||||
|
||||
## 环境设置
|
||||
|
||||
确保您能够首先通过 [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md) 运行 OpenDevin。
|
||||
确保您能够首先通过 [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) 运行 OpenHands。
|
||||
|
||||
## 创建您的 Docker 映像
|
||||
|
||||
接下来,您必须创建一个自定义的 Docker 映像,该映像是基于 Debian 或 Ubuntu 的。例如,如果我们希望 OpenDevin 能够访问 "node" 可执行文件,我们可以使用以下 `Dockerfile`:
|
||||
接下来,您必须创建一个自定义的 Docker 映像,该映像是基于 Debian 或 Ubuntu 的。例如,如果我们希望 OpenHands 能够访问 "node" 可执行文件,我们可以使用以下 `Dockerfile`:
|
||||
|
||||
```bash
|
||||
# 从最新版 ubuntu 开始
|
||||
@ -29,18 +29,18 @@ docker build -t custom_image .
|
||||
|
||||
这将生成一个名为 ```custom_image``` 的新映像,并使其可用于 Docker 服务引擎。
|
||||
|
||||
> 注意:在本文档描述的配置中,OpenDevin 将在沙箱内部以“opendevin”用户身份运行。因此,通过 Dockerfile 安装的所有包应可供系统上的所有用户使用,而不仅仅是 root 用户。
|
||||
> 注意:在本文档描述的配置中,OpenHands 将在沙箱内部以“openhands”用户身份运行。因此,通过 Dockerfile 安装的所有包应可供系统上的所有用户使用,而不仅仅是 root 用户。
|
||||
|
||||
> 使用 `apt-get` 上面安装的 node 是为所有用户安装的。
|
||||
|
||||
## 在 config.toml 文件中指定自定义映像
|
||||
|
||||
在 OpenDevin 的配置通过顶层的 `config.toml` 文件发生。在 OpenDevin 目录下创建一个 ```config.toml``` 文件,并输入以下内容:
|
||||
在 OpenHands 的配置通过顶层的 `config.toml` 文件发生。在 OpenHands 目录下创建一个 ```config.toml``` 文件,并输入以下内容:
|
||||
|
||||
```
|
||||
[core]
|
||||
workspace_base="./workspace"
|
||||
run_as_devin=true
|
||||
run_as_openhands=true
|
||||
sandbox_container_image="custom_image"
|
||||
```
|
||||
|
||||
@ -48,7 +48,7 @@ sandbox_container_image="custom_image"
|
||||
|
||||
## 运行
|
||||
|
||||
通过运行 ```make run``` 在顶层目录下运行 OpenDevin。
|
||||
通过运行 ```make run``` 在顶层目录下运行 OpenHands。
|
||||
|
||||
导航至 ```localhost:3001``` 并检查所需依赖是否可用。
|
||||
|
||||
@ -58,40 +58,40 @@ sandbox_container_image="custom_image"
|
||||
|
||||
## 技术解释
|
||||
|
||||
相关代码定义在 [ssh_box.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/ssh_box.py) 和 [image_agnostic_util.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py) 中。
|
||||
相关代码定义在 [ssh_box.py](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/ssh_box.py) 和 [image_agnostic_util.py](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/image_agnostic_util.py) 中。
|
||||
|
||||
特别是 ssh_box.py 检查配置对象中的 ```config.sandbox_container_image```,然后尝试使用 [get_od_sandbox_image](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L72),在 image_agnostic_util.py 定义中进行检索。
|
||||
特别是 ssh_box.py 检查配置对象中的 ```config.sandbox_container_image```,然后尝试使用 [get_od_sandbox_image](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/image_agnostic_util.py#L72),在 image_agnostic_util.py 定义中进行检索。
|
||||
|
||||
初次使用自定义映像时,该映像将不会被找到,因此将被构建(在后续运行中已构建的映像将被查找并返回)。
|
||||
|
||||
自定义映像是通过 `_build_sandbox_image()` 构建的,在 [image_agnostic_util.py](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L29) 中,使用您的 custom_image 作为基础,并为 OpenDevin 配置环境。例如:
|
||||
自定义映像是通过 `_build_sandbox_image()` 构建的,在 [image_agnostic_util.py](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/image_agnostic_util.py#L29) 中,使用您的 custom_image 作为基础,并为 OpenHands 配置环境。例如:
|
||||
|
||||
```python
|
||||
dockerfile_content = (
|
||||
f'FROM {base_image}\n'
|
||||
'RUN apt update && apt install -y openssh-server wget sudo\n'
|
||||
'RUN mkdir -p -m0755 /var/run/sshd\n'
|
||||
'RUN mkdir -p /opendevin && mkdir -p /opendevin/logs && chmod 777 /opendevin/logs\n'
|
||||
'RUN mkdir -p /openhands && mkdir -p /openhands/logs && chmod 777 /openhands/logs\n'
|
||||
'RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"\n'
|
||||
'RUN bash Miniforge3-$(uname)-$(uname -m).sh -b -p /opendevin/miniforge3\n'
|
||||
'RUN bash -c ". /opendevin/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"\n'
|
||||
'RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> ~/.bashrc\n'
|
||||
'RUN echo "export PATH=/opendevin/miniforge3/bin:$PATH" >> /opendevin/bash.bashrc\n'
|
||||
'RUN bash Miniforge3-$(uname)-$(uname -m).sh -b -p /openhands/miniforge3\n'
|
||||
'RUN bash -c ". /openhands/miniforge3/etc/profile.d/conda.sh && conda config --set changeps1 False && conda config --append channels conda-forge"\n'
|
||||
'RUN echo "export PATH=/openhands/miniforge3/bin:$PATH" >> ~/.bashrc\n'
|
||||
'RUN echo "export PATH=/openhands/miniforge3/bin:$PATH" >> /openhands/bash.bashrc\n'
|
||||
).strip()
|
||||
```
|
||||
|
||||
> 注意:映像名称通过 [_get_new_image_name()](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/docker/image_agnostic_util.py#L63) 修改,并且是后续运行中搜索的修改后的名称。
|
||||
> 注意:映像名称通过 [_get_new_image_name()](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/docker/image_agnostic_util.py#L63) 修改,并且是后续运行中搜索的修改后的名称。
|
||||
|
||||
## 故障排除 / 错误
|
||||
|
||||
### 错误:```useradd: UID 1000 is not unique```
|
||||
|
||||
如果在控制台输出中看到此错误,说明 OpenDevin 尝试在沙箱中以 UID 1000 创建 opendevin 用户,但该 UID 已经被映像中的其他部分使用(不知何故)。要解决这个问题,请更改 config.toml 文件中的 sandbox_user_id 字段为不同的值:
|
||||
如果在控制台输出中看到此错误,说明 OpenHands 尝试在沙箱中以 UID 1000 创建 openhands 用户,但该 UID 已经被映像中的其他部分使用(不知何故)。要解决这个问题,请更改 config.toml 文件中的 sandbox_user_id 字段为不同的值:
|
||||
|
||||
```
|
||||
[core]
|
||||
workspace_base="./workspace"
|
||||
run_as_devin=true
|
||||
run_as_openhands=true
|
||||
sandbox_container_image="custom_image"
|
||||
sandbox_user_id="1001"
|
||||
```
|
||||
@ -102,4 +102,4 @@ sandbox_user_id="1001"
|
||||
|
||||
## 讨论
|
||||
|
||||
对于其他问题或疑问,请加入 [Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) 或 [Discord](https://discord.gg/ESHStjSjD4),并提问!
|
||||
对于其他问题或疑问,请加入 [Slack](https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) 或 [Discord](https://discord.gg/ESHStjSjD4),并提问!
|
||||
|
||||
@ -4,15 +4,15 @@ sidebar_position: 6
|
||||
|
||||
# ✅ 提供反馈
|
||||
|
||||
在使用 OpenDevin 时,你无疑会遇到一些情况,某些地方工作得很好,而另一些地方则可能不尽如人意。我们鼓励你在使用 OpenDevin 时提供反馈,这不仅有助于开发团队改善应用,更为重要的是,可以创建一个开放的编码代理训练样例语料库——Share-OpenDevin!
|
||||
在使用 OpenHands 时,你无疑会遇到一些情况,某些地方工作得很好,而另一些地方则可能不尽如人意。我们鼓励你在使用 OpenHands 时提供反馈,这不仅有助于开发团队改善应用,更为重要的是,可以创建一个开放的编码代理训练样例语料库——Share-OpenHands!
|
||||
|
||||
## 📝 如何提供反馈
|
||||
|
||||
提供反馈很简单!在使用 OpenDevin 时,你可以在任意时刻按下点赞或点踩按钮。你将被要求提供你的电子邮件地址(例如,以便我们在需要进一步询问时联系你),你可以选择公开或私密地提供反馈。
|
||||
提供反馈很简单!在使用 OpenHands 时,你可以在任意时刻按下点赞或点踩按钮。你将被要求提供你的电子邮件地址(例如,以便我们在需要进一步询问时联系你),你可以选择公开或私密地提供反馈。
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/5rFx-StMVV0?si=svo7xzp6LhGK_GXr" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
|
||||
## 📜 数据许可与隐私
|
||||
|
||||
* **公开** 数据将与 OpenDevin 本身一样以 MIT 许可协议发布,并可被社区用来训练和测试模型。显然,你能够公开的反馈对整个社区来说更有价值,因此当你不涉及敏感信息时,我们鼓励你选择这个选项!
|
||||
* **私密** 数据将仅与 OpenDevin 团队分享,用于改进 OpenDevin。
|
||||
* **公开** 数据将与 OpenHands 本身一样以 MIT 许可协议发布,并可被社区用来训练和测试模型。显然,你能够公开的反馈对整个社区来说更有价值,因此当你不涉及敏感信息时,我们鼓励你选择这个选项!
|
||||
* **私密** 数据将仅与 OpenHands 团队分享,用于改进 OpenHands。
|
||||
|
||||
@ -2,47 +2,47 @@
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# 💻 OpenDevin
|
||||
# 💻 OpenHands
|
||||
|
||||
OpenDevin 是一个**自主 AI 软件工程师**,能够执行复杂的工程任务,并在软件开发项目中积极与用户合作。
|
||||
OpenHands 是一个**自主 AI 软件工程师**,能够执行复杂的工程任务,并在软件开发项目中积极与用户合作。
|
||||
这个项目是完全开源的,所以你可以随意使用和修改它。
|
||||
|
||||
:::tip
|
||||
在 [GitHub](https://github.com/OpenDevin/OpenDevin) 上探索 OpenDevin 的代码库或加入我们的社区!
|
||||
在 [GitHub](https://github.com/All-Hands-AI/OpenHands) 上探索 OpenHands 的代码库或加入我们的社区!
|
||||
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/graphs/contributors">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/graphs/contributors">
|
||||
<img
|
||||
src="https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/contributors/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Contributors"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/network/members">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/network/members">
|
||||
<img
|
||||
src="https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/forks/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Forks"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/stargazers">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/stargazers">
|
||||
<img
|
||||
src="https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/stars/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Stargazers"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/issues">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/issues">
|
||||
<img
|
||||
src="https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/issues/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Issues"
|
||||
/>
|
||||
</a>
|
||||
<br></br>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE">
|
||||
<img
|
||||
src="https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/license/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="MIT License"
|
||||
/>
|
||||
</a>
|
||||
<br></br>
|
||||
<a href="https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw">
|
||||
<a href="https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw">
|
||||
<img
|
||||
src="https://img.shields.io/badge/Slack-Join%20Us-red?logo=slack&logoColor=white&style=for-the-badge"
|
||||
alt="Join our Slack community"
|
||||
@ -58,10 +58,10 @@ OpenDevin 是一个**自主 AI 软件工程师**,能够执行复杂的工程
|
||||
|
||||
## 🛠️ 入门指南
|
||||
|
||||
运行 OpenDevin 最简单的方法是在 Docker 容器中。它在 Docker 的最新版本 `26.0.0` 上运行效果最佳。
|
||||
运行 OpenHands 最简单的方法是在 Docker 容器中。它在 Docker 的最新版本 `26.0.0` 上运行效果最佳。
|
||||
你必须使用 Linux、Mac OS 或 Windows 上的 WSL。
|
||||
|
||||
要在 Docker 容器中启动 OpenDevin,请在终端中运行以下命令:
|
||||
要在 Docker 容器中启动 OpenHands,请在终端中运行以下命令:
|
||||
|
||||
:::warning
|
||||
运行以下命令时,`./workspace` 中的文件可能会被修改或删除。
|
||||
@ -77,33 +77,33 @@ docker run -it \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-p 3000:3000 \
|
||||
--add-host host.docker.internal:host-gateway \
|
||||
--name opendevin-app-$(date +%Y%m%d%H%M%S) \
|
||||
--name openhands-app-$(date +%Y%m%d%H%M%S) \
|
||||
ghcr.io/opendevin/opendevin:0.6
|
||||
```
|
||||
|
||||
你会发现 OpenDevin 在 [http://localhost:3000](http://localhost:3000) 运行,并可以访问 `./workspace`。要让 OpenDevin 操作你的代码,请将代码放在 `./workspace` 中。
|
||||
你会发现 OpenHands 在 [http://localhost:3000](http://localhost:3000) 运行,并可以访问 `./workspace`。要让 OpenHands 操作你的代码,请将代码放在 `./workspace` 中。
|
||||
|
||||
OpenDevin 只会访问这个工作区文件夹。它在一个安全的 docker 沙盒中运行,不会影响你系统的其他部分。
|
||||
OpenHands 只会访问这个工作区文件夹。它在一个安全的 docker 沙盒中运行,不会影响你系统的其他部分。
|
||||
|
||||
:::tip
|
||||
如果你想使用**(不稳定!)**最新版本,可以使用 `ghcr.io/opendevin/opendevin:main` 作为镜像(最后一行)。
|
||||
:::
|
||||
|
||||
有关开发工作流程,请参阅 [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md)。
|
||||
有关开发工作流程,请参阅 [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md)。
|
||||
|
||||
遇到问题了吗?查看我们的 [故障排除指南](https://docs.all-hands.dev/modules/usage/troubleshooting)。
|
||||
|
||||
:::warning
|
||||
OpenDevin 目前正在开发中,但你已经可以运行 alpha 版本来查看端到端系统的运作情况。
|
||||
OpenHands 目前正在开发中,但你已经可以运行 alpha 版本来查看端到端系统的运作情况。
|
||||
:::
|
||||
|
||||
[contributors-shield]: https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge
|
||||
[contributors-url]: https://github.com/OpenDevin/OpenDevin/graphs/contributors
|
||||
[forks-shield]: https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge
|
||||
[forks-url]: https://github.com/OpenDevin/OpenDevin/network/members
|
||||
[stars-shield]: https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge
|
||||
[stars-url]: https://github.com/OpenDevin/OpenDevin/stargazers
|
||||
[issues-shield]: https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge
|
||||
[issues-url]: https://github.com/OpenDevin/OpenDevin/issues
|
||||
[license-shield]: https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge
|
||||
[license-url]: https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE
|
||||
[contributors-shield]: https://img.shields.io/github/contributors/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[contributors-url]: https://github.com/All-Hands-AI/OpenHands/graphs/contributors
|
||||
[forks-shield]: https://img.shields.io/github/forks/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[forks-url]: https://github.com/All-Hands-AI/OpenHands/network/members
|
||||
[stars-shield]: https://img.shields.io/github/stars/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[stars-url]: https://github.com/All-Hands-AI/OpenHands/stargazers
|
||||
[issues-shield]: https://img.shields.io/github/issues/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[issues-url]: https://github.com/All-Hands-AI/OpenHands/issues
|
||||
[license-shield]: https://img.shields.io/github/license/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[license-url]: https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
## 完成
|
||||
|
||||
OpenDevin 使用 LiteLLM 进行完成调用。你可以在 Azure 的文档中找到他们的文档 [这里](https://docs.litellm.ai/docs/providers/azure)
|
||||
OpenHands 使用 LiteLLM 进行完成调用。你可以在 Azure 的文档中找到他们的文档 [这里](https://docs.litellm.ai/docs/providers/azure)
|
||||
|
||||
### Azure openai 配置
|
||||
|
||||
在运行 OpenDevin Docker 镜像时,你需要使用 `-e` 设置以下环境变量:
|
||||
在运行 OpenHands Docker 镜像时,你需要使用 `-e` 设置以下环境变量:
|
||||
|
||||
```
|
||||
LLM_BASE_URL="<azure-api-base-url>" # 示例: "https://openai-gpt-4-test-v-1.openai.azure.com/"
|
||||
@ -16,19 +16,19 @@ LLM_API_VERSION = "<api-version>" # 示例: "2024-02-15-preview"
|
||||
```
|
||||
|
||||
:::note
|
||||
你可以在 Azure 的部署页面找到你的 ChatGPT 部署名称。它可能与默认或最初设置的聊天模型名称相同(例如 'GPT4-1106-preview'),但不一定相同。运行 OpenDevin,当你在浏览器中加载它时,进入设置并按照上述方式设置模型: "azure/<your-actual-gpt-deployment-name>"。如果列表中没有,请输入你自己的文本并保存。
|
||||
你可以在 Azure 的部署页面找到你的 ChatGPT 部署名称。它可能与默认或最初设置的聊天模型名称相同(例如 'GPT4-1106-preview'),但不一定相同。运行 OpenHands,当你在浏览器中加载它时,进入设置并按照上述方式设置模型: "azure/<your-actual-gpt-deployment-name>"。如果列表中没有,请输入你自己的文本并保存。
|
||||
:::
|
||||
|
||||
## 嵌入
|
||||
|
||||
OpenDevin 使用 llama-index 进行嵌入。你可以在 Azure 的文档中找到他们的文档 [这里](https://docs.llamaindex.ai/en/stable/api_reference/embeddings/azure_openai/)
|
||||
OpenHands 使用 llama-index 进行嵌入。你可以在 Azure 的文档中找到他们的文档 [这里](https://docs.llamaindex.ai/en/stable/api_reference/embeddings/azure_openai/)
|
||||
|
||||
### Azure openai 配置
|
||||
|
||||
Azure OpenAI 嵌入使用的模型是 "text-embedding-ada-002"。
|
||||
你需要在你的 Azure 账户中为这个模型设置正确的部署名称。
|
||||
|
||||
在 Docker 中运行 OpenDevin 时,使用 `-e` 设置以下环境变量:
|
||||
在 Docker 中运行 OpenHands 时,使用 `-e` 设置以下环境变量:
|
||||
|
||||
```
|
||||
LLM_EMBEDDING_MODEL="azureopenai"
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
|
||||
## Completion
|
||||
|
||||
OpenDevin 使用 LiteLLM 进行补全调用。以下资源与使用 OpenDevin 和 Google 的 LLM 相关:
|
||||
OpenHands 使用 LiteLLM 进行补全调用。以下资源与使用 OpenHands 和 Google 的 LLM 相关:
|
||||
|
||||
- [Gemini - Google AI Studio](https://docs.litellm.ai/docs/providers/gemini)
|
||||
- [VertexAI - Google Cloud Platform](https://docs.litellm.ai/docs/providers/vertex)
|
||||
|
||||
### Gemini - Google AI Studio 配置
|
||||
|
||||
在运行 OpenDevin Docker 镜像时,通过 Google AI Studio 使用 Gemini,你需要使用 `-e` 设置以下环境变量:
|
||||
在运行 OpenHands Docker 镜像时,通过 Google AI Studio 使用 Gemini,你需要使用 `-e` 设置以下环境变量:
|
||||
|
||||
```
|
||||
GEMINI_API_KEY="<your-google-api-key>"
|
||||
@ -18,7 +18,7 @@ LLM_MODEL="gemini/gemini-1.5-pro"
|
||||
|
||||
### Vertex AI - Google Cloud Platform 配置
|
||||
|
||||
在运行 OpenDevin Docker 镜像时,通过 Google Cloud Platform 使用 Vertex AI,你需要使用 `-e` 设置以下环境变量:
|
||||
在运行 OpenHands Docker 镜像时,通过 Google Cloud Platform 使用 Vertex AI,你需要使用 `-e` 设置以下环境变量:
|
||||
|
||||
```
|
||||
GOOGLE_APPLICATION_CREDENTIALS="<json-dump-of-gcp-service-account-json>"
|
||||
|
||||
@ -4,16 +4,16 @@ sidebar_position: 2
|
||||
|
||||
# 🤖 LLM 支持
|
||||
|
||||
OpenDevin 可以兼容任何 LLM 后端。
|
||||
OpenHands 可以兼容任何 LLM 后端。
|
||||
关于所有可用 LM 提供商和模型的完整列表,请参阅
|
||||
[litellm 文档](https://docs.litellm.ai/docs/providers)。
|
||||
|
||||
:::warning
|
||||
OpenDevin 将向你配置的 LLM 发出许多提示。大多数这些 LLM 都是收费的——请务必设定支出限额并监控使用情况。
|
||||
OpenHands 将向你配置的 LLM 发出许多提示。大多数这些 LLM 都是收费的——请务必设定支出限额并监控使用情况。
|
||||
:::
|
||||
|
||||
`LLM_MODEL` 环境变量控制在编程交互中使用的模型。
|
||||
但在使用 OpenDevin UI 时,你需要在设置窗口中选择你的模型(左下角的齿轮)。
|
||||
但在使用 OpenHands UI 时,你需要在设置窗口中选择你的模型(左下角的齿轮)。
|
||||
|
||||
某些 LLM 可能需要以下环境变量:
|
||||
|
||||
@ -23,7 +23,7 @@ OpenDevin 将向你配置的 LLM 发出许多提示。大多数这些 LLM 都是
|
||||
- `LLM_EMBEDDING_DEPLOYMENT_NAME`
|
||||
- `LLM_API_VERSION`
|
||||
|
||||
我们有一些指南,介绍了如何使用特定模型提供商运行 OpenDevin:
|
||||
我们有一些指南,介绍了如何使用特定模型提供商运行 OpenHands:
|
||||
|
||||
- [ollama](llms/local-llms)
|
||||
- [Azure](llms/azure-llms)
|
||||
@ -35,12 +35,12 @@ OpenDevin 将向你配置的 LLM 发出许多提示。大多数这些 LLM 都是
|
||||
最好的模型是 GPT-4 和 Claude 3。目前的本地和开源模型
|
||||
远没有那么强大。当使用替代模型时,
|
||||
你可能会看到信息之间的长时间等待,
|
||||
糟糕的响应,或关于 JSON格式错误的错误。OpenDevin
|
||||
糟糕的响应,或关于 JSON格式错误的错误。OpenHands
|
||||
的强大程度依赖于其驱动的模型——幸运的是,我们团队的人员
|
||||
正在积极致力于构建更好的开源模型!
|
||||
|
||||
## API 重试和速率限制
|
||||
|
||||
一些 LLM 有速率限制,可能需要重试操作。OpenDevin 会在收到 429 错误或 API 连接错误时自动重试请求。
|
||||
一些 LLM 有速率限制,可能需要重试操作。OpenHands 会在收到 429 错误或 API 连接错误时自动重试请求。
|
||||
你可以设置 `LLM_NUM_RETRIES`,`LLM_RETRY_MIN_WAIT`,`LLM_RETRY_MAX_WAIT` 环境变量来控制重试次数和重试之间的时间。
|
||||
默认情况下,`LLM_NUM_RETRIES` 为 5,`LLM_RETRY_MIN_WAIT` 和 `LLM_RETRY_MAX_WAIT` 分别为 3 秒和 60 秒。
|
||||
|
||||
@ -23,11 +23,11 @@ mistral:7b-instruct-v0.2-q4_K_M eb14864c7427 4.4 GB 2 weeks ago
|
||||
starcoder2:latest f67ae0f64584 1.7 GB 19 hours ago
|
||||
```
|
||||
|
||||
## 启动 OpenDevin
|
||||
## 启动 OpenHands
|
||||
|
||||
### Docker
|
||||
|
||||
使用[此处](../intro)的说明通过 Docker 启动 OpenDevin。
|
||||
使用[此处](../intro)的说明通过 Docker 启动 OpenHands。
|
||||
但是在运行 `docker run` 时,您需要添加一些额外的参数:
|
||||
|
||||
```bash
|
||||
@ -39,7 +39,7 @@ starcoder2:latest f67ae0f64584 1.7 GB 19 hours ago
|
||||
例如:
|
||||
|
||||
```bash
|
||||
# 您希望 OpenDevin 修改的目录。必须是绝对路径!
|
||||
# 您希望 OpenHands 修改的目录。必须是绝对路径!
|
||||
export WORKSPACE_BASE=$(pwd)/workspace
|
||||
|
||||
docker run \
|
||||
@ -60,7 +60,7 @@ docker run \
|
||||
|
||||
### 从源代码构建
|
||||
|
||||
使用[Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md)中的说明构建 OpenDevin。
|
||||
使用[Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md)中的说明构建 OpenHands。
|
||||
通过运行 `make setup-config` 确保 `config.toml` 存在,这将为您创建一个。在 `config.toml` 中,输入以下内容:
|
||||
|
||||
```
|
||||
@ -78,7 +78,7 @@ WORKSPACE_DIR="$(pwd)/workspace"
|
||||
|
||||
## 选择您的模型
|
||||
|
||||
在 OpenDevin UI 中,点击左下角的设置齿轮。
|
||||
在 OpenHands UI 中,点击左下角的设置齿轮。
|
||||
然后在 `Model` 输入中,输入 `ollama/codellama:7b`,或者您之前拉取的模型名称。
|
||||
如果它没有出现在下拉列表中,也没关系,只需输入即可。完成后点击保存。
|
||||
|
||||
@ -86,7 +86,7 @@ WORKSPACE_DIR="$(pwd)/workspace"
|
||||
|
||||
## 配置 ollama 服务(WSL){#configuring-ollama-service-zh-Hans}
|
||||
|
||||
WSL 中 ollama 的默认配置仅为 localhost 提供服务。这意味着您无法从 docker 容器中访问它。比如,它不会与 OpenDevin 一起工作。首先让我们测试 ollama 是否正常运行。
|
||||
WSL 中 ollama 的默认配置仅为 localhost 提供服务。这意味着您无法从 docker 容器中访问它。比如,它不会与 OpenHands 一起工作。首先让我们测试 ollama 是否正常运行。
|
||||
|
||||
```bash
|
||||
ollama list # 获取已安装模型列表
|
||||
@ -98,7 +98,7 @@ curl http://localhost:11434/api/generate -d '{"model":"[NAME]","prompt":"hi"}'
|
||||
完成后,测试它是否允许“外部”请求,比如那些来自 docker 容器内的请求。
|
||||
|
||||
```bash
|
||||
docker ps # 获取正在运行的 docker 容器列表,最准确的测试选择 open devin sandbox 容器。
|
||||
docker ps # 获取正在运行的 docker 容器列表,最准确的测试选择 OpenHands sandbox 容器。
|
||||
docker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d '{"model":"[NAME]","prompt":"hi"}'
|
||||
#例如,docker exec cd9cc82f7a11 curl http://host.docker.internal:11434/api/generate -d '{"model":"codellama","prompt":"hi"}'
|
||||
```
|
||||
@ -135,6 +135,6 @@ sudo systemctl restart ollama
|
||||
|
||||
```bash
|
||||
ollama list # 获取已安装模型列表
|
||||
docker ps # 获取正在运行的 docker 容器列表,最准确的测试选择 open devin sandbox 容器。
|
||||
docker ps # 获取正在运行的 docker 容器列表,最准确的测试选择 OpenHands sandbox 容器。
|
||||
docker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d '{"model":"[NAME]","prompt":"hi"}'
|
||||
```
|
||||
|
||||
@ -18,7 +18,7 @@ sidebar_position: 5
|
||||
|
||||
## 无法连接到 Docker
|
||||
|
||||
[GitHub 问题](https://github.com/OpenDevin/OpenDevin/issues/1226)
|
||||
[GitHub 问题](https://github.com/All-Hands-AI/OpenHands/issues/1226)
|
||||
|
||||
### 症状
|
||||
|
||||
@ -32,7 +32,7 @@ docker.errors.DockerException: 获取服务器 API 版本时出错: ('连接中
|
||||
|
||||
### 详情
|
||||
|
||||
OpenDevin 使用 Docker 容器来安全地完成工作,而不会破坏您的机器。
|
||||
OpenHands 使用 Docker 容器来安全地完成工作,而不会破坏您的机器。
|
||||
|
||||
### 解决方法
|
||||
|
||||
@ -43,7 +43,7 @@ OpenDevin 使用 Docker 容器来安全地完成工作,而不会破坏您的
|
||||
|
||||
## 无法连接到 DockerSSHBox
|
||||
|
||||
[GitHub 问题](https://github.com/OpenDevin/OpenDevin/issues/1156)
|
||||
[GitHub 问题](https://github.com/All-Hands-AI/OpenHands/issues/1156)
|
||||
|
||||
### 症状
|
||||
|
||||
@ -55,18 +55,18 @@ pexpect.pxssh.ExceptionPxssh: Could not establish connection to host
|
||||
|
||||
### 详情
|
||||
|
||||
默认情况下,OpenDevin 使用 SSH 连接到一个运行中的容器。在某些机器上,尤其是 Windows,这似乎会失败。
|
||||
默认情况下,OpenHands 使用 SSH 连接到一个运行中的容器。在某些机器上,尤其是 Windows,这似乎会失败。
|
||||
|
||||
### 解决方法
|
||||
|
||||
* 重新启动您的计算机(有时会有用)
|
||||
* 确保拥有最新版本的 WSL 和 Docker
|
||||
* 检查您的 WSL 分发版也已更新
|
||||
* 尝试[此重新安装指南](https://github.com/OpenDevin/OpenDevin/issues/1156#issuecomment-2064549427)
|
||||
* 尝试[此重新安装指南](https://github.com/All-Hands-AI/OpenHands/issues/1156#issuecomment-2064549427)
|
||||
|
||||
## 无法连接到 LLM
|
||||
|
||||
[GitHub 问题](https://github.com/OpenDevin/OpenDevin/issues/1208)
|
||||
[GitHub 问题](https://github.com/All-Hands-AI/OpenHands/issues/1208)
|
||||
|
||||
### 症状
|
||||
|
||||
@ -79,9 +79,9 @@ AttributeError: 'NoneType' object has no attribute 'request'
|
||||
|
||||
### 详情
|
||||
|
||||
[GitHub 问题](https://github.com/OpenDevin/OpenDevin/issues?q=is%3Aissue+is%3Aopen+404)
|
||||
[GitHub 问题](https://github.com/All-Hands-AI/OpenHands/issues?q=is%3Aissue+is%3Aopen+404)
|
||||
|
||||
这通常发生在本地 LLM 设置中,当 OpenDevin 无法连接到 LLM 服务器时。请参阅我们的 [本地 LLM 指南](llms/local-llms) 以获取更多信息。
|
||||
这通常发生在本地 LLM 设置中,当 OpenHands 无法连接到 LLM 服务器时。请参阅我们的 [本地 LLM 指南](llms/local-llms) 以获取更多信息。
|
||||
|
||||
### 解决方法
|
||||
|
||||
@ -171,19 +171,19 @@ export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
|
||||
### 症状
|
||||
|
||||
通常情况下,当打开 UI 时,OpenDevin 会询问是否要恢复或开始新会话。但点击“恢复”仍然会开始一个全新的聊天。
|
||||
通常情况下,当打开 UI 时,OpenHands 会询问是否要恢复或开始新会话。但点击“恢复”仍然会开始一个全新的聊天。
|
||||
|
||||
### 详情
|
||||
|
||||
按今天的标准安装,会话数据存储在内存中。目前,如果 OpenDevin 的服务重启,以前的会话将失效(生成一个新秘密),因此无法恢复。
|
||||
按今天的标准安装,会话数据存储在内存中。目前,如果 OpenHands 的服务重启,以前的会话将失效(生成一个新秘密),因此无法恢复。
|
||||
|
||||
### 解决方法
|
||||
|
||||
* 通过编辑 OpenDevin 根文件夹中的 `config.toml` 文件,更改配置以使会话持久化,指定一个 `file_store` 和一个绝对路径的 `file_store_path`:
|
||||
* 通过编辑 OpenHands 根文件夹中的 `config.toml` 文件,更改配置以使会话持久化,指定一个 `file_store` 和一个绝对路径的 `file_store_path`:
|
||||
|
||||
```toml
|
||||
file_store="local"
|
||||
file_store_path="/absolute/path/to/opendevin/cache/directory"
|
||||
file_store_path="/absolute/path/to/openhands/cache/directory"
|
||||
```
|
||||
|
||||
* 在您的 .bashrc 中添加一个固定的 JWT 秘密,如下所示,以便以前的会话 ID 可以被接受。
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Windows 和 WSL 用户须知
|
||||
|
||||
OpenDevin 仅支持通过 [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) 在 Windows 上运行。
|
||||
OpenHands 仅支持通过 [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) 在 Windows 上运行。
|
||||
请确保在 WSL 终端内运行所有命令。
|
||||
|
||||
## 故障排除
|
||||
@ -12,8 +12,8 @@ Docker 还需要启用 WSL 集成选项。
|
||||
|
||||
### 建议:不要以 root 用户身份运行
|
||||
|
||||
出于安全原因,非常建议不要以 root 用户身份运行 OpenDevin,而是使用 UID 非零的用户身份运行。
|
||||
此外,当以 root 身份运行时,不支持持久化沙箱,并且在启动 OpenDevin 时可能会出现相应消息。
|
||||
出于安全原因,非常建议不要以 root 用户身份运行 OpenHands,而是使用 UID 非零的用户身份运行。
|
||||
此外,当以 root 身份运行时,不支持持久化沙箱,并且在启动 OpenHands 时可能会出现相应消息。
|
||||
|
||||
参考资料:
|
||||
|
||||
@ -21,12 +21,12 @@ Docker 还需要启用 WSL 集成选项。
|
||||
* [在 WSL 中设置默认用户](https://www.tenforums.com/tutorials/128152-set-default-user-windows-subsystem-linux-distro-windows-10-a.html#option2)
|
||||
关于第二个参考资料的小提示:对于 Ubuntu 用户,该命令实际上可能是 "ubuntupreview" 而不是 "ubuntu"。
|
||||
|
||||
### 创建 opendevin 用户失败
|
||||
### 创建 openhands 用户失败
|
||||
|
||||
如果您在设置过程中遇到以下错误:
|
||||
|
||||
```sh
|
||||
Exception: Failed to create opendevin user in sandbox: 'useradd: UID 0 is not unique'
|
||||
Exception: Failed to create openhands user in sandbox: 'useradd: UID 0 is not unique'
|
||||
```
|
||||
|
||||
您可以通过运行以下命令解决:
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
{
|
||||
"title": {
|
||||
"message": "OpenDevin",
|
||||
"message": "OpenHands",
|
||||
"description": "The title in the navbar"
|
||||
},
|
||||
"logo.alt": {
|
||||
"message": "OpenDevin",
|
||||
"message": "OpenHands",
|
||||
"description": "The alt text of navbar logo"
|
||||
},
|
||||
"item.label.Docs": {
|
||||
|
||||
@ -19,35 +19,35 @@ Achieving full replication of production-grade applications with LLMs is a compl
|
||||
|
||||
## 🤝 How to Contribute
|
||||
|
||||
OpenDevin is a community-driven project, and we welcome contributions from everyone. Whether you're a developer, a researcher, or simply enthusiastic about advancing the field of software engineering with AI, there are many ways to get involved:
|
||||
OpenHands is a community-driven project, and we welcome contributions from everyone. Whether you're a developer, a researcher, or simply enthusiastic about advancing the field of software engineering with AI, there are many ways to get involved:
|
||||
|
||||
- **Code Contributions:** Help us develop the core functionalities, frontend interface, or sandboxing solutions.
|
||||
- **Research and Evaluation:** Contribute to our understanding of LLMs in software engineering, participate in evaluating the models, or suggest improvements.
|
||||
- **Feedback and Testing:** Use the OpenDevin toolset, report bugs, suggest features, or provide feedback on usability.
|
||||
- **Feedback and Testing:** Use the OpenHands toolset, report bugs, suggest features, or provide feedback on usability.
|
||||
|
||||
For details, please check [this document](https://github.com/OpenDevin/OpenDevin/blob/main/CONTRIBUTING.md).
|
||||
For details, please check [this document](https://github.com/All-Hands-AI/OpenHands/blob/main/CONTRIBUTING.md).
|
||||
|
||||
## 🤖 Join Our Community
|
||||
|
||||
We have both Slack workspace for the collaboration on building OpenDevin and Discord server for discussion about anything related, e.g., this project, LLM, agent, etc.
|
||||
We have both Slack workspace for the collaboration on building OpenHands and Discord server for discussion about anything related, e.g., this project, LLM, agent, etc.
|
||||
|
||||
- [Slack workspace](https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw)
|
||||
- [Slack workspace](https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw)
|
||||
- [Discord server](https://discord.gg/ESHStjSjD4)
|
||||
|
||||
If you would love to contribute, feel free to join our community. Let's simplify software engineering together!
|
||||
|
||||
🐚 **Code less, make more with OpenDevin.**
|
||||
🐚 **Code less, make more with OpenHands.**
|
||||
|
||||
[](https://star-history.com/#OpenDevin/OpenDevin&Date)
|
||||
[](https://star-history.com/#All-Hands-AI/OpenHands&Date)
|
||||
|
||||
## 🛠️ Built With
|
||||
|
||||
OpenDevin is built using a combination of powerful frameworks and libraries, providing a robust foundation for its development. Here are the key technologies used in the project:
|
||||
OpenHands is built using a combination of powerful frameworks and libraries, providing a robust foundation for its development. Here are the key technologies used in the project:
|
||||
|
||||
       
|
||||
|
||||
Please note that the selection of these technologies is in progress, and additional technologies may be added or existing ones may be removed as the project evolves. We strive to adopt the most suitable and efficient tools to enhance the capabilities of OpenDevin.
|
||||
Please note that the selection of these technologies is in progress, and additional technologies may be added or existing ones may be removed as the project evolves. We strive to adopt the most suitable and efficient tools to enhance the capabilities of OpenHands.
|
||||
|
||||
## 📜 License
|
||||
|
||||
Distributed under the MIT License. See [our license](https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE) for more information.
|
||||
Distributed under the MIT License. See [our license](https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE) for more information.
|
||||
|
||||
@ -18,18 +18,18 @@ The conceptual idea is illustrated below. At each turn, the agent can:
|
||||
- Execute any valid Linux `bash` command
|
||||
- Execute any valid `Python` code with [an interactive Python interpreter](https://ipython.org/). This is simulated through `bash` command, see plugin system below for more details.
|
||||
|
||||

|
||||

|
||||
|
||||
### Plugin System
|
||||
|
||||
To make the CodeAct agent more powerful with only access to `bash` action space, CodeAct agent leverages OpenDevin's plugin system:
|
||||
To make the CodeAct agent more powerful with only access to `bash` action space, CodeAct agent leverages OpenHands's plugin system:
|
||||
|
||||
- [Jupyter plugin](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/jupyter): for IPython execution via bash command
|
||||
- [SWE-agent tool plugin](https://github.com/OpenDevin/OpenDevin/tree/main/opendevin/runtime/plugins/swe_agent_commands): Powerful bash command line tools for software development tasks introduced by [swe-agent](https://github.com/princeton-nlp/swe-agent).
|
||||
- [Jupyter plugin](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/jupyter): for IPython execution via bash command
|
||||
- [SWE-agent tool plugin](https://github.com/All-Hands-AI/OpenHands/tree/main/openhands/runtime/plugins/swe_agent_commands): Powerful bash command line tools for software development tasks introduced by [swe-agent](https://github.com/princeton-nlp/swe-agent).
|
||||
|
||||
### Demo
|
||||
|
||||
https://github.com/OpenDevin/OpenDevin/assets/38853559/f592a192-e86c-4f48-ad31-d69282d5f6ac
|
||||
https://github.com/All-Hands-AI/OpenHands/assets/38853559/f592a192-e86c-4f48-ad31-d69282d5f6ac
|
||||
|
||||
_Example of CodeActAgent with `gpt-4-turbo-2024-04-09` performing a data science task (linear regression)_
|
||||
|
||||
|
||||
@ -5,8 +5,8 @@ sidebar_position: 7
|
||||
# 🏛️ System Architecture
|
||||
|
||||
<div style={{ textAlign: 'center' }}>
|
||||
<img src="https://github.com/OpenDevin/OpenDevin/assets/16201837/97d747e3-29d8-4ccb-8d34-6ad1adb17f38" alt="OpenDevin System Architecture Diagram Jul 4 2024" />
|
||||
<p><em>OpenDevin System Architecture Diagram (July 4, 2024)</em></p>
|
||||
<img src="https://github.com/All-Hands-AI/OpenHands/assets/16201837/97d747e3-29d8-4ccb-8d34-6ad1adb17f38" alt="OpenHands System Architecture Diagram Jul 4 2024" />
|
||||
<p><em>OpenHands System Architecture Diagram (July 4, 2024)</em></p>
|
||||
</div>
|
||||
|
||||
This is a high-level overview of the system architecture. The system is divided into two main components: the frontend and the backend. The frontend is responsible for handling user interactions and displaying the results. The backend is responsible for handling the business logic and executing the agents.
|
||||
@ -33,14 +33,14 @@ _**Disclaimer**: The backend architecture is a work in progress and is subject t
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Running python environment in which opendevin is executable
|
||||
- Running python environment in which openhands is executable
|
||||
(according to the instructions in the README.md file in the root of the repository)
|
||||
- [py2puml](https://github.com/lucsorel/py2puml) installed
|
||||
|
||||
## Steps
|
||||
|
||||
1. Autogenerate the diagram by running the following command from the root of the repository:
|
||||
`py2puml opendevin opendevin > docs/architecture/backend_architecture.puml`
|
||||
`py2puml openhands openhands > docs/architecture/backend_architecture.puml`
|
||||
|
||||
2. Open the generated file in a PlantUML editor, e.g. Visual Studio Code with the PlantUML extension or [PlantText](https://www.planttext.com/)
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
# 📦 EventStream Runtime
|
||||
|
||||
The OpenDevin EventStream Runtime is the core component that enables secure and flexible execution of AI agent's action.
|
||||
The OpenHands EventStream Runtime is the core component that enables secure and flexible execution of AI agent's action.
|
||||
It creates a sandboxed environment using Docker, where arbitrary code can be run safely without risking the host system.
|
||||
|
||||
|
||||
## Why do we need a sandboxed runtime?
|
||||
|
||||
OpenDevin needs to execute arbitrary code in a secure, isolated environment for several reasons:
|
||||
OpenHands needs to execute arbitrary code in a secure, isolated environment for several reasons:
|
||||
|
||||
1. Security: Executing untrusted code can pose significant risks to the host system. A sandboxed environment prevents malicious code from accessing or modifying the host system's resources.
|
||||
|
||||
@ -20,11 +20,11 @@ OpenDevin needs to execute arbitrary code in a secure, isolated environment for
|
||||
|
||||
## How does our Runtime work?
|
||||
|
||||
The OpenDevin Runtime system uses a client-server architecture implemented with Docker containers. Here's an overview of how it works:
|
||||
The OpenHands Runtime system uses a client-server architecture implemented with Docker containers. Here's an overview of how it works:
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
A[User-provided Custom Docker Image] --> B[OpenDevin Backend]
|
||||
A[User-provided Custom Docker Image] --> B[OpenHands Backend]
|
||||
B -->|Builds| C[OD Runtime Image]
|
||||
C -->|Launches| D[Runtime Client]
|
||||
D -->|Initializes| E[Browser]
|
||||
@ -53,35 +53,35 @@ graph TD
|
||||
|
||||
1. User Input: The user provides a custom base Docker image.
|
||||
|
||||
2. Image Building: OpenDevin builds a new Docker image (the "OD runtime image") based on the user-provided image. This new image includes OpenDevin-specific code, primarily the "runtime client."
|
||||
2. Image Building: OpenHands builds a new Docker image (the "OD runtime image") based on the user-provided image. This new image includes OpenHands-specific code, primarily the "runtime client."
|
||||
|
||||
3. Container Launch: When OpenDevin starts, it launches a Docker container using the OD runtime image.
|
||||
3. Container Launch: When OpenHands starts, it launches a Docker container using the OD runtime image.
|
||||
|
||||
4. Client Initialization: The runtime client initializes inside the container, setting up necessary components like a bash shell and loading any specified plugins.
|
||||
|
||||
5. Communication: The OpenDevin backend (`runtime.py`) communicates with the runtime client over RESTful API, sending actions and receiving observations.
|
||||
5. Communication: The OpenHands backend (`runtime.py`) communicates with the runtime client over RESTful API, sending actions and receiving observations.
|
||||
|
||||
6. Action Execution: The runtime client receives actions from the backend, executes them in the sandboxed environment, and sends back observations.
|
||||
|
||||
7. Observation Return: The client sends execution results back to the OpenDevin backend as observations.
|
||||
7. Observation Return: The client sends execution results back to the OpenHands backend as observations.
|
||||
|
||||
|
||||
The role of the client is crucial:
|
||||
- It acts as an intermediary between the OpenDevin backend and the sandboxed environment.
|
||||
- It acts as an intermediary between the OpenHands backend and the sandboxed environment.
|
||||
- It executes various types of actions (shell commands, file operations, Python code, etc.) safely within the container.
|
||||
- It manages the state of the sandboxed environment, including the current working directory and loaded plugins.
|
||||
- It formats and returns observations to the backend, ensuring a consistent interface for processing results.
|
||||
|
||||
|
||||
## Advanced: How OpenDevin builds and maintains OD Runtime images
|
||||
## Advanced: How OpenHands builds and maintains OD Runtime images
|
||||
|
||||
OpenDevin uses a sophisticated approach to build and manage runtime images. This process ensures efficiency, consistency, and flexibility in creating and maintaining Docker images for both production and development environments.
|
||||
OpenHands uses a sophisticated approach to build and manage runtime images. This process ensures efficiency, consistency, and flexibility in creating and maintaining Docker images for both production and development environments.
|
||||
|
||||
Check out [relavant code](https://github.com/OpenDevin/OpenDevin/blob/main/opendevin/runtime/utils/runtime_build.py) if you are interested in more details.
|
||||
Check out [relavant code](https://github.com/All-Hands-AI/OpenHands/blob/main/openhands/runtime/utils/runtime_build.py) if you are interested in more details.
|
||||
|
||||
### Image Tagging System
|
||||
|
||||
OpenDevin uses a dual-tagging system for its runtime images to balance reproducibility with flexibility:
|
||||
OpenHands uses a dual-tagging system for its runtime images to balance reproducibility with flexibility:
|
||||
|
||||
1. Hash-based tag: `{target_image_repo}:{target_image_hash_tag}`
|
||||
Example: `od_runtime:abc123def456`
|
||||
@ -94,10 +94,10 @@ OpenDevin uses a dual-tagging system for its runtime images to balance reproduci
|
||||
Example: `od_runtime:od_v0.8.3_ubuntu_tag_22.04`
|
||||
|
||||
- This tag follows the format: `od_runtime:od_v{OD_VERSION}_{BASE_IMAGE_NAME}_tag_{BASE_IMAGE_TAG}`
|
||||
- It represents the latest build for a particular base image and OpenDevin version combination.
|
||||
- It represents the latest build for a particular base image and OpenHands version combination.
|
||||
- This tag is updated whenever a new image is built from the same base image, even if the source code changes.
|
||||
|
||||
The hash-based tag ensures exact reproducibility, while the generic tag provides a stable reference to the latest version of a particular configuration. This dual-tagging approach allows OpenDevin to efficiently manage both development and production environments.
|
||||
The hash-based tag ensures exact reproducibility, while the generic tag provides a stable reference to the latest version of a particular configuration. This dual-tagging approach allows OpenHands to efficiently manage both development and production environments.
|
||||
|
||||
### Build Process
|
||||
|
||||
@ -110,7 +110,7 @@ The hash-based tag ensures exact reproducibility, while the generic tag provides
|
||||
2. Build Process:
|
||||
- a. Convert the base image name to an OD runtime image name.
|
||||
Example: `ubuntu:22.04` -> `od_runtime:od_v0.8.3_ubuntu_tag_22.04`
|
||||
- b. Generate a build context (Dockerfile and OpenDevin source code) and calculate its hash.
|
||||
- b. Generate a build context (Dockerfile and OpenHands source code) and calculate its hash.
|
||||
- c. Check for an existing image with the calculated hash.
|
||||
- d. If not found, check for a recent compatible image to use as a base.
|
||||
- e. If no compatible image exists, build from scratch using the original base image.
|
||||
@ -151,16 +151,16 @@ This approach ensures that:
|
||||
|
||||
1. Identical source code and Dockerfile always produce the same image (via hash-based tags).
|
||||
2. The system can quickly rebuild images when minor changes occur (by leveraging recent compatible images).
|
||||
3. The generic tag (e.g., `od_runtime:od_v0.8.3_ubuntu_tag_22.04`) always points to the latest build for a particular base image and OpenDevin version combination.
|
||||
3. The generic tag (e.g., `od_runtime:od_v0.8.3_ubuntu_tag_22.04`) always points to the latest build for a particular base image and OpenHands version combination.
|
||||
|
||||
By using this method, OpenDevin maintains an efficient and flexible system for building and managing runtime images, adapting to both development needs and production requirements.
|
||||
By using this method, OpenHands maintains an efficient and flexible system for building and managing runtime images, adapting to both development needs and production requirements.
|
||||
|
||||
|
||||
## Advanced: Runtime Plugin System
|
||||
|
||||
The OpenDevin Runtime supports a plugin system that allows for extending functionality and customizing the runtime environment. Plugins are initialized when the runtime client starts up.
|
||||
The OpenHands Runtime supports a plugin system that allows for extending functionality and customizing the runtime environment. Plugins are initialized when the runtime client starts up.
|
||||
|
||||
Check [an example of Jupyter plugin here](https://github.com/OpenDevin/OpenDevin/blob/9c44d94cef32e6426ebd8deeeb52963153b2348a/opendevin/runtime/plugins/jupyter/__init__.py#L30-L63) if you want to implement your own plugin.
|
||||
Check [an example of Jupyter plugin here](https://github.com/All-Hands-AI/OpenHands/blob/9c44d94cef32e6426ebd8deeeb52963153b2348a/openhands/runtime/plugins/jupyter/__init__.py#L30-L63) if you want to implement your own plugin.
|
||||
|
||||
*More details about the Plugin system are still under construction - contributions are welcomed!*
|
||||
|
||||
|
||||
@ -4,11 +4,11 @@ sidebar_position: 5
|
||||
|
||||
# ✅ Providing Feedback
|
||||
|
||||
When using OpenDevin, you will undoubtably encounter cases where things work well, and others where they don't. We encourage you to provide feedback when you use OpenDevin to help give feedback to the development team, and perhaps more importantly, create an open corpus of coding agent training examples -- Share-OpenDevin!
|
||||
When using OpenHands, you will undoubtably encounter cases where things work well, and others where they don't. We encourage you to provide feedback when you use OpenHands to help give feedback to the development team, and perhaps more importantly, create an open corpus of coding agent training examples -- Share-OpenHands!
|
||||
|
||||
## 📝 How to Provide Feedback
|
||||
|
||||
Providing feedback is easy! When you are using OpenDevin, you can press the thumbs-up or thumbs-down button at any point during your interaction with. You will be prompted to provide your email address (e.g. so we can contact you if we want to ask any follow-up questions), and you can choose whether you want to provide feedback publicly or privately.
|
||||
Providing feedback is easy! When you are using OpenHands, you can press the thumbs-up or thumbs-down button at any point during your interaction with. You will be prompted to provide your email address (e.g. so we can contact you if we want to ask any follow-up questions), and you can choose whether you want to provide feedback publicly or privately.
|
||||
|
||||
<iframe width="560" height="315" src="https://www.youtube.com/embed/5rFx-StMVV0?si=svo7xzp6LhGK_GXr" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
|
||||
|
||||
@ -18,12 +18,12 @@ Providing feedback is easy! When you are using OpenDevin, you can press the thum
|
||||
|
||||
When you submit data, you can submit it either publicly or privately.
|
||||
|
||||
* **Public** data will be distributed under the MIT License, like OpenDevin itself, and can be used by the community to train and test models. Obviously, feedback that you can make public will be more valuable for the community as a whole, so when you are not dealing with sensitive information, we would encourage you to choose this option!
|
||||
* **Private** data will only be shared with the OpenDevin team for the purpose of improving OpenDevin.
|
||||
* **Public** data will be distributed under the MIT License, like OpenHands itself, and can be used by the community to train and test models. Obviously, feedback that you can make public will be more valuable for the community as a whole, so when you are not dealing with sensitive information, we would encourage you to choose this option!
|
||||
* **Private** data will only be shared with the OpenHands team for the purpose of improving OpenHands.
|
||||
|
||||
### Who collects and stores the data?
|
||||
|
||||
The data is collected and stored by [All Hands AI](https://all-hands.dev), a company founded by OpenDevin maintainers to support and improve OpenDevin.
|
||||
The data is collected and stored by [All Hands AI](https://all-hands.dev), a company founded by OpenHands maintainers to support and improve OpenHands.
|
||||
|
||||
### How will public data be released?
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# Create and Use a Custom Docker Sandbox
|
||||
|
||||
The default OpenDevin sandbox comes with a [minimal ubuntu configuration](https://github.com/OpenDevin/OpenDevin/blob/main/containers/sandbox/Dockerfile).
|
||||
The default OpenHands sandbox comes with a [minimal ubuntu configuration](https://github.com/All-Hands-AI/OpenHands/blob/main/containers/sandbox/Dockerfile).
|
||||
|
||||
Your use case may need additional software installed by default.
|
||||
|
||||
@ -24,13 +24,13 @@ For a more feature-rich environment, you might consider using pre-built images l
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure you are able to run OpenDevin using the [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md) first.
|
||||
Make sure you are able to run OpenHands using the [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) first.
|
||||
|
||||
## Create Your Docker Image
|
||||
|
||||
To create a custom docker image, it must be debian/ubuntu based.
|
||||
|
||||
For example, if we want OpenDevin to have access to the `node` binary, we would use the following Dockerfile:
|
||||
For example, if we want OpenHands to have access to the `node` binary, we would use the following Dockerfile:
|
||||
|
||||
```dockerfile
|
||||
# Start with latest ubuntu image
|
||||
@ -53,20 +53,20 @@ docker build -t custom_image .
|
||||
|
||||
This will produce a new image called ```custom_image``` that will be available in Docker Engine.
|
||||
|
||||
> Note that in the configuration described in this document, OpenDevin will run as user "opendevin" inside the sandbox and thus all packages installed via the docker file should be available to all users on the system, not just root.
|
||||
> Note that in the configuration described in this document, OpenHands will run as user "openhands" inside the sandbox and thus all packages installed via the docker file should be available to all users on the system, not just root.
|
||||
>
|
||||
> Installing with apt-get above installs node for all users.
|
||||
|
||||
## Specify your sandbox image in config.toml file
|
||||
|
||||
OpenDevin configuration occurs via the top-level `config.toml` file.
|
||||
OpenHands configuration occurs via the top-level `config.toml` file.
|
||||
|
||||
Create a `config.toml` file in the OpenDevin directory and enter these contents:
|
||||
Create a `config.toml` file in the OpenHands directory and enter these contents:
|
||||
|
||||
```toml
|
||||
[core]
|
||||
workspace_base="./workspace"
|
||||
run_as_devin=true
|
||||
run_as_openhands=true
|
||||
sandbox_container_image="custom_image"
|
||||
```
|
||||
|
||||
@ -76,7 +76,7 @@ For `sandbox_container_image`, you can specify either:
|
||||
2. A pre-existing image from Docker Hub (e.g., `”node:20”` if you want a sandbox with Node.js pre-installed)
|
||||
|
||||
## Run
|
||||
Run OpenDevin by running ```make run``` in the top level directory.
|
||||
Run OpenHands by running ```make run``` in the top level directory.
|
||||
|
||||
Navigate to ```localhost:3001``` and check if your desired dependencies are available.
|
||||
|
||||
@ -86,18 +86,18 @@ Congratulations!
|
||||
|
||||
## Technical Explanation
|
||||
|
||||
Please refer to [custom docker image section of the runtime documentation](https://docs.all-hands.dev/modules/usage/runtime#advanced-how-opendevin-builds-and-maintains-od-runtime-images) for more details.
|
||||
Please refer to [custom docker image section of the runtime documentation](https://docs.all-hands.dev/modules/usage/runtime#advanced-how-openhands-builds-and-maintains-od-runtime-images) for more details.
|
||||
|
||||
## Troubleshooting / Errors
|
||||
|
||||
### Error: ```useradd: UID 1000 is not unique```
|
||||
|
||||
If you see this error in the console output it is because OpenDevin is trying to create the opendevin user in the sandbox with a UID of 1000, however this UID is already being used in the image (for some reason). To fix this change the sandbox_user_id field in the config.toml file to a different value:
|
||||
If you see this error in the console output it is because OpenHands is trying to create the openhands user in the sandbox with a UID of 1000, however this UID is already being used in the image (for some reason). To fix this change the sandbox_user_id field in the config.toml file to a different value:
|
||||
|
||||
```toml
|
||||
[core]
|
||||
workspace_base="./workspace"
|
||||
run_as_devin=true
|
||||
run_as_openhands=true
|
||||
sandbox_container_image="custom_image"
|
||||
sandbox_user_id="1001"
|
||||
```
|
||||
@ -108,4 +108,4 @@ If you see an error about a port being in use or unavailable, try deleting all r
|
||||
|
||||
## Discuss
|
||||
|
||||
For other issues or questions join the [Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) or [Discord](https://discord.gg/ESHStjSjD4) and ask!
|
||||
For other issues or questions join the [Slack](https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) or [Discord](https://discord.gg/ESHStjSjD4) and ask!
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
# Contribute to OpenDevin Evaluation Harness
|
||||
# Contribute to OpenHands Evaluation Harness
|
||||
|
||||
This guide provides an overview of how to integrate your own evaluation benchmark into the OpenDevin framework.
|
||||
This guide provides an overview of how to integrate your own evaluation benchmark into the OpenHands framework.
|
||||
|
||||
## Before everything begins: Setup Environment and LLM Configuration
|
||||
|
||||
Please follow instruction [here](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md) to setup your local development environment and LLM.
|
||||
Please follow instruction [here](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) to setup your local development environment and LLM.
|
||||
|
||||
OpenDevin in development mode uses `config.toml` to keep track of most configurations.
|
||||
OpenHands in development mode uses `config.toml` to keep track of most configurations.
|
||||
|
||||
Here's an example configuration file you can use to define and use multiple LLMs:
|
||||
|
||||
@ -29,12 +29,12 @@ temperature = 0.0
|
||||
```
|
||||
|
||||
|
||||
## How to use OpenDevin in the command line
|
||||
## How to use OpenHands in the command line
|
||||
|
||||
OpenDevin can be run from the command line using the following format:
|
||||
OpenHands can be run from the command line using the following format:
|
||||
|
||||
```bash
|
||||
poetry run python ./opendevin/core/main.py \
|
||||
poetry run python ./openhands/core/main.py \
|
||||
-i <max_iterations> \
|
||||
-t "<task_description>" \
|
||||
-c <agent_class> \
|
||||
@ -44,22 +44,22 @@ poetry run python ./opendevin/core/main.py \
|
||||
For example:
|
||||
|
||||
```bash
|
||||
poetry run python ./opendevin/core/main.py \
|
||||
poetry run python ./openhands/core/main.py \
|
||||
-i 10 \
|
||||
-t "Write me a bash script that prints hello world." \
|
||||
-c CodeActAgent \
|
||||
-l llm
|
||||
```
|
||||
|
||||
This command runs OpenDevin with:
|
||||
This command runs OpenHands with:
|
||||
- A maximum of 10 iterations
|
||||
- The specified task description
|
||||
- Using the CodeActAgent
|
||||
- With the LLM configuration defined in the `llm` section of your `config.toml` file
|
||||
|
||||
## How does OpenDevin work
|
||||
## How does OpenHands work
|
||||
|
||||
The main entry point for OpenDevin is in `opendevin/core/main.py`. Here's a simplified flow of how it works:
|
||||
The main entry point for OpenHands is in `openhands/core/main.py`. Here's a simplified flow of how it works:
|
||||
|
||||
1. Parse command-line arguments and load the configuration.
|
||||
2. Create a runtime environment using `create_runtime()`.
|
||||
@ -69,12 +69,12 @@ The main entry point for OpenDevin is in `opendevin/core/main.py`. Here's a simp
|
||||
- Executes the agent's task
|
||||
- Returns a final state when complete
|
||||
|
||||
The `run_controller()` function is the core of OpenDevin's execution. It manages the interaction between the agent, the runtime, and the task, handling things like user input simulation and event processing.
|
||||
The `run_controller()` function is the core of OpenHands's execution. It manages the interaction between the agent, the runtime, and the task, handling things like user input simulation and event processing.
|
||||
|
||||
|
||||
## Easiest way to get started: Exploring Existing Benchmarks
|
||||
|
||||
We encourage you to review the various evaluation benchmarks available in the [`evaluation/` directory](https://github.com/OpenDevin/OpenDevin/blob/main/evaluation) of our repository.
|
||||
We encourage you to review the various evaluation benchmarks available in the [`evaluation/` directory](https://github.com/All-Hands-AI/OpenHands/blob/main/evaluation) of our repository.
|
||||
|
||||
To integrate your own benchmark, we suggest starting with the one that most closely resembles your needs. This approach can significantly streamline your integration process, allowing you to build upon existing structures and adapt them to your specific requirements.
|
||||
|
||||
@ -83,7 +83,7 @@ To integrate your own benchmark, we suggest starting with the one that most clos
|
||||
|
||||
To create an evaluation workflow for your benchmark, follow these steps:
|
||||
|
||||
1. Import relevant OpenDevin utilities:
|
||||
1. Import relevant OpenHands utilities:
|
||||
```python
|
||||
import agenthub
|
||||
from evaluation.utils.shared import (
|
||||
@ -94,18 +94,18 @@ To create an evaluation workflow for your benchmark, follow these steps:
|
||||
reset_logger_for_multiprocessing,
|
||||
run_evaluation,
|
||||
)
|
||||
from opendevin.controller.state.state import State
|
||||
from opendevin.core.config import (
|
||||
from openhands.controller.state.state import State
|
||||
from openhands.core.config import (
|
||||
AppConfig,
|
||||
SandboxConfig,
|
||||
get_llm_config_arg,
|
||||
parse_arguments,
|
||||
)
|
||||
from opendevin.core.logger import opendevin_logger as logger
|
||||
from opendevin.core.main import create_runtime, run_controller
|
||||
from opendevin.events.action import CmdRunAction
|
||||
from opendevin.events.observation import CmdOutputObservation, ErrorObservation
|
||||
from opendevin.runtime.runtime import Runtime
|
||||
from openhands.core.logger import openhands_logger as logger
|
||||
from openhands.core.main import create_runtime, run_controller
|
||||
from openhands.events.action import CmdRunAction
|
||||
from openhands.events.observation import CmdOutputObservation, ErrorObservation
|
||||
from openhands.runtime.runtime import Runtime
|
||||
```
|
||||
|
||||
2. Create a configuration:
|
||||
@ -182,12 +182,12 @@ This workflow sets up the configuration, initializes the runtime environment, pr
|
||||
|
||||
Remember to customize the `get_instruction`, `your_user_response_function`, and `evaluate_agent_actions` functions according to your specific benchmark requirements.
|
||||
|
||||
By following this structure, you can create a robust evaluation workflow for your benchmark within the OpenDevin framework.
|
||||
By following this structure, you can create a robust evaluation workflow for your benchmark within the OpenHands framework.
|
||||
|
||||
|
||||
## Understanding the `user_response_fn`
|
||||
|
||||
The `user_response_fn` is a crucial component in OpenDevin's evaluation workflow. It simulates user interaction with the agent, allowing for automated responses during the evaluation process. This function is particularly useful when you want to provide consistent, predefined responses to the agent's queries or actions.
|
||||
The `user_response_fn` is a crucial component in OpenHands's evaluation workflow. It simulates user interaction with the agent, allowing for automated responses during the evaluation process. This function is particularly useful when you want to provide consistent, predefined responses to the agent's queries or actions.
|
||||
|
||||
|
||||
### Workflow and Interaction
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
# Use OpenDevin in OpenShift/K8S
|
||||
# Use OpenHands in OpenShift/K8S
|
||||
|
||||
There are different ways and scenarios that you can do, we're just mentioning one example here:
|
||||
1. Create a PV "as a cluster admin" to map workspace_base data and docker directory to the pod through the worker node.
|
||||
2. Create a PVC to be able to mount those PVs to the POD
|
||||
3. Create a POD which contains two containers; the OpenDevin and Sandbox containers.
|
||||
3. Create a POD which contains two containers; the OpenHands and Sandbox containers.
|
||||
|
||||
## Steps to follow the above example.
|
||||
|
||||
@ -144,12 +144,12 @@ Sample POD yaml file below:
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: opendevin-app-2024
|
||||
name: openhands-app-2024
|
||||
labels:
|
||||
app: opendevin-app-2024
|
||||
app: openhands-app-2024
|
||||
spec:
|
||||
containers:
|
||||
- name: opendevin-app-2024
|
||||
- name: openhands-app-2024
|
||||
image: ghcr.io/opendevin/opendevin:0.7.1
|
||||
env:
|
||||
- name: SANDBOX_USER_ID
|
||||
@ -163,8 +163,8 @@ spec:
|
||||
mountPath: /var/run/docker.sock
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
- name: opendevin-sandbox-2024
|
||||
image: ghcr.io/opendevin/sandbox:main
|
||||
- name: openhands-sandbox-2024
|
||||
image: ghcr.io/openhands/sandbox:main
|
||||
ports:
|
||||
- containerPort: 51963
|
||||
command: ["/usr/sbin/sshd", "-D", "-p 51963", "-o", "PermitRootLogin=yes"]
|
||||
@ -180,43 +180,43 @@ spec:
|
||||
```bash
|
||||
# create the pod
|
||||
$ oc create -f pod.yaml
|
||||
W0716 11:22:07.776271 107626 warnings.go:70] would violate PodSecurity "restricted:v1.24": allowPrivilegeEscalation != false (containers "opendevin-app-2024", "opendevin-sandbox-2024" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "opendevin-app-2024", "opendevin-sandbox-2024" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or containers "opendevin-app-2024", "opendevin-sandbox-2024" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "opendevin-app-2024", "opendevin-sandbox-2024" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
|
||||
pod/opendevin-app-2024 created
|
||||
W0716 11:22:07.776271 107626 warnings.go:70] would violate PodSecurity "restricted:v1.24": allowPrivilegeEscalation != false (containers "openhands-app-2024", "openhands-sandbox-2024" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (containers "openhands-app-2024", "openhands-sandbox-2024" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or containers "openhands-app-2024", "openhands-sandbox-2024" must set securityContext.runAsNonRoot=true), seccompProfile (pod or containers "openhands-app-2024", "openhands-sandbox-2024" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
|
||||
pod/openhands-app-2024 created
|
||||
|
||||
# Above warning can be ignored for now as we will not modify SCC restrictions.
|
||||
|
||||
# review
|
||||
$ oc get pods
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
opendevin-app-2024 0/2 Pending 0 5s
|
||||
openhands-app-2024 0/2 Pending 0 5s
|
||||
|
||||
$ oc get pods
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
opendevin-app-2024 0/2 ContainerCreating 0 15s
|
||||
openhands-app-2024 0/2 ContainerCreating 0 15s
|
||||
|
||||
$ oc get events
|
||||
LAST SEEN TYPE REASON OBJECT MESSAGE
|
||||
38s Normal WaitForFirstConsumer persistentvolumeclaim/docker-pvc waiting for first consumer to be created before binding
|
||||
23s Normal ExternalProvisioning persistentvolumeclaim/docker-pvc waiting for a volume to be created, either by external provisioner "csi.hetzner.cloud" or manually created by system administrator
|
||||
27s Normal Provisioning persistentvolumeclaim/docker-pvc External provisioner is provisioning volume for claim "opendevin/docker-pvc"
|
||||
27s Normal Provisioning persistentvolumeclaim/docker-pvc External provisioner is provisioning volume for claim "openhands/docker-pvc"
|
||||
17s Normal ProvisioningSucceeded persistentvolumeclaim/docker-pvc Successfully provisioned volume pvc-2b1d223a-1c8f-4990-8e3d-68061a9ae252
|
||||
16s Normal Scheduled pod/opendevin-app-2024 Successfully assigned opendevin/opendevin-app-2024 to worker1.hub.internal.blakane.com
|
||||
9s Normal SuccessfulAttachVolume pod/opendevin-app-2024 AttachVolume.Attach succeeded for volume "pvc-2b1d223a-1c8f-4990-8e3d-68061a9ae252"
|
||||
9s Normal SuccessfulAttachVolume pod/opendevin-app-2024 AttachVolume.Attach succeeded for volume "pvc-31f15b25-faad-4665-a25f-201a530379af"
|
||||
6s Normal AddedInterface pod/opendevin-app-2024 Add eth0 [10.128.2.48/23] from openshift-sdn
|
||||
6s Normal Pulled pod/opendevin-app-2024 Container image "ghcr.io/opendevin/opendevin:0.7.1" already present on machine
|
||||
6s Normal Created pod/opendevin-app-2024 Created container opendevin-app-2024
|
||||
6s Normal Started pod/opendevin-app-2024 Started container opendevin-app-2024
|
||||
6s Normal Pulled pod/opendevin-app-2024 Container image "ghcr.io/opendevin/sandbox:main" already present on machine
|
||||
5s Normal Created pod/opendevin-app-2024 Created container opendevin-sandbox-2024
|
||||
5s Normal Started pod/opendevin-app-2024 Started container opendevin-sandbox-2024
|
||||
16s Normal Scheduled pod/openhands-app-2024 Successfully assigned All-Hands-AI/OpenHands-app-2024 to worker1.hub.internal.blakane.com
|
||||
9s Normal SuccessfulAttachVolume pod/openhands-app-2024 AttachVolume.Attach succeeded for volume "pvc-2b1d223a-1c8f-4990-8e3d-68061a9ae252"
|
||||
9s Normal SuccessfulAttachVolume pod/openhands-app-2024 AttachVolume.Attach succeeded for volume "pvc-31f15b25-faad-4665-a25f-201a530379af"
|
||||
6s Normal AddedInterface pod/openhands-app-2024 Add eth0 [10.128.2.48/23] from openshift-sdn
|
||||
6s Normal Pulled pod/openhands-app-2024 Container image "ghcr.io/opendevin/opendevin:0.7.1" already present on machine
|
||||
6s Normal Created pod/openhands-app-2024 Created container openhands-app-2024
|
||||
6s Normal Started pod/openhands-app-2024 Started container openhands-app-2024
|
||||
6s Normal Pulled pod/openhands-app-2024 Container image "ghcr.io/openhands/sandbox:main" already present on machine
|
||||
5s Normal Created pod/openhands-app-2024 Created container openhands-sandbox-2024
|
||||
5s Normal Started pod/openhands-app-2024 Started container openhands-sandbox-2024
|
||||
83s Normal WaitForFirstConsumer persistentvolumeclaim/workspace-pvc waiting for first consumer to be created before binding
|
||||
27s Normal Provisioning persistentvolumeclaim/workspace-pvc External provisioner is provisioning volume for claim "opendevin/workspace-pvc"
|
||||
27s Normal Provisioning persistentvolumeclaim/workspace-pvc External provisioner is provisioning volume for claim "openhands/workspace-pvc"
|
||||
17s Normal ProvisioningSucceeded persistentvolumeclaim/workspace-pvc Successfully provisioned volume pvc-31f15b25-faad-4665-a25f-201a530379af
|
||||
|
||||
$ oc get pods
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
opendevin-app-2024 2/2 Running 0 23s
|
||||
openhands-app-2024 2/2 Running 0 23s
|
||||
|
||||
$ oc get pvc
|
||||
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
|
||||
@ -230,21 +230,21 @@ Sample service creation command below:
|
||||
|
||||
```bash
|
||||
# create the service of type NodePort
|
||||
$ oc create svc nodeport opendevin-app-2024 --tcp=3000:3000
|
||||
service/opendevin-app-2024 created
|
||||
$ oc create svc nodeport openhands-app-2024 --tcp=3000:3000
|
||||
service/openhands-app-2024 created
|
||||
|
||||
# review
|
||||
|
||||
$ oc get svc
|
||||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
|
||||
opendevin-app-2024 NodePort 172.30.225.42 <none> 3000:30495/TCP 4s
|
||||
openhands-app-2024 NodePort 172.30.225.42 <none> 3000:30495/TCP 4s
|
||||
|
||||
$ oc describe svc opendevin-app-2024
|
||||
Name: opendevin-app-2024
|
||||
Namespace: opendevin
|
||||
Labels: app=opendevin-app-2024
|
||||
$ oc describe svc openhands-app-2024
|
||||
Name: openhands-app-2024
|
||||
Namespace: openhands
|
||||
Labels: app=openhands-app-2024
|
||||
Annotations: <none>
|
||||
Selector: app=opendevin-app-2024
|
||||
Selector: app=openhands-app-2024
|
||||
Type: NodePort
|
||||
IP Family Policy: SingleStack
|
||||
IP Families: IPv4
|
||||
@ -259,7 +259,7 @@ External Traffic Policy: Cluster
|
||||
Events: <none>
|
||||
```
|
||||
|
||||
6. Connect to OpenDevin UI, configure the Agent, then test:
|
||||
6. Connect to OpenHands UI, configure the Agent, then test:
|
||||
|
||||

|
||||
|
||||
@ -293,4 +293,4 @@ RUN git --version
|
||||
|
||||
## Discuss
|
||||
|
||||
For other issues or questions join the [Slack](https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) or [Discord](https://discord.gg/ESHStjSjD4) and ask!
|
||||
For other issues or questions join the [Slack](https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw) or [Discord](https://discord.gg/ESHStjSjD4) and ask!
|
||||
|
||||
@ -2,47 +2,47 @@
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# 💻 OpenDevin
|
||||
# 💻 OpenHands
|
||||
|
||||
OpenDevin is an **autonomous AI software engineer** capable of executing complex engineering tasks and collaborating actively with users on software development projects.
|
||||
OpenHands is an **autonomous AI software engineer** capable of executing complex engineering tasks and collaborating actively with users on software development projects.
|
||||
This project is fully open-source, so you can use and modify it however you like.
|
||||
|
||||
:::tip
|
||||
Explore the codebase of OpenDevin on [GitHub](https://github.com/OpenDevin/OpenDevin) or join one of our communities!
|
||||
Explore the codebase of OpenHands on [GitHub](https://github.com/All-Hands-AI/OpenHands) or join one of our communities!
|
||||
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/graphs/contributors">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/graphs/contributors">
|
||||
<img
|
||||
src="https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/contributors/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Contributors"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/network/members">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/network/members">
|
||||
<img
|
||||
src="https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/forks/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Forks"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/stargazers">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/stargazers">
|
||||
<img
|
||||
src="https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/stars/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Stargazers"
|
||||
/>
|
||||
</a>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/issues">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/issues">
|
||||
<img
|
||||
src="https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/issues/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="Issues"
|
||||
/>
|
||||
</a>
|
||||
<br></br>
|
||||
<a href="https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE">
|
||||
<a href="https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE">
|
||||
<img
|
||||
src="https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge"
|
||||
src="https://img.shields.io/github/license/All-Hands-AI/OpenHands?style=for-the-badge"
|
||||
alt="MIT License"
|
||||
/>
|
||||
</a>
|
||||
<br></br>
|
||||
<a href="https://join.slack.com/t/opendevin/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw">
|
||||
<a href="https://join.slack.com/t/openhands/shared_invite/zt-2ngejmfw6-9gW4APWOC9XUp1n~SiQ6iw">
|
||||
<img
|
||||
src="https://img.shields.io/badge/Slack-Join%20Us-red?logo=slack&logoColor=white&style=for-the-badge"
|
||||
alt="Join our Slack community"
|
||||
@ -57,15 +57,15 @@ Explore the codebase of OpenDevin on [GitHub](https://github.com/OpenDevin/OpenD
|
||||
:::
|
||||
|
||||
## 🛠️ Getting Started
|
||||
[Check out the getting started guide on Github](https://github.com/OpenDevin/OpenDevin?tab=readme-ov-file#-getting-started)
|
||||
[Check out the getting started guide on Github](https://github.com/All-Hands-AI/OpenHands?tab=readme-ov-file#-getting-started)
|
||||
|
||||
[contributors-shield]: https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge
|
||||
[contributors-url]: https://github.com/OpenDevin/OpenDevin/graphs/contributors
|
||||
[forks-shield]: https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge
|
||||
[forks-url]: https://github.com/OpenDevin/OpenDevin/network/members
|
||||
[stars-shield]: https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge
|
||||
[stars-url]: https://github.com/OpenDevin/OpenDevin/stargazers
|
||||
[issues-shield]: https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge
|
||||
[issues-url]: https://github.com/OpenDevin/OpenDevin/issues
|
||||
[license-shield]: https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge
|
||||
[license-url]: https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE
|
||||
[contributors-shield]: https://img.shields.io/github/contributors/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[contributors-url]: https://github.com/All-Hands-AI/OpenHands/graphs/contributors
|
||||
[forks-shield]: https://img.shields.io/github/forks/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[forks-url]: https://github.com/All-Hands-AI/OpenHands/network/members
|
||||
[stars-shield]: https://img.shields.io/github/stars/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[stars-url]: https://github.com/All-Hands-AI/OpenHands/stargazers
|
||||
[issues-shield]: https://img.shields.io/github/issues/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[issues-url]: https://github.com/All-Hands-AI/OpenHands/issues
|
||||
[license-shield]: https://img.shields.io/github/license/All-Hands-AI/OpenHands?style=for-the-badge
|
||||
[license-url]: https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
## Completion
|
||||
|
||||
OpenDevin uses LiteLLM for completion calls. You can find their documentation on Azure [here](https://docs.litellm.ai/docs/providers/azure)
|
||||
OpenHands uses LiteLLM for completion calls. You can find their documentation on Azure [here](https://docs.litellm.ai/docs/providers/azure)
|
||||
|
||||
### Azure openai configs
|
||||
|
||||
When running the OpenDevin Docker image, you'll need to set the following environment variables using `-e`:
|
||||
When running the OpenHands Docker image, you'll need to set the following environment variables using `-e`:
|
||||
|
||||
```
|
||||
LLM_BASE_URL="<azure-api-base-url>" # e.g. "https://openai-gpt-4-test-v-1.openai.azure.com/"
|
||||
@ -27,26 +27,26 @@ docker run -it \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-p 3000:3000 \
|
||||
--add-host host.docker.internal:host-gateway \
|
||||
--name opendevin-app-$(date +%Y%m%d%H%M%S) \
|
||||
--name openhands-app-$(date +%Y%m%d%H%M%S) \
|
||||
ghcr.io/opendevin/opendevin
|
||||
```
|
||||
|
||||
You can set the LLM_MODEL and LLM_API_KEY in the OpenDevin UI itself.
|
||||
You can set the LLM_MODEL and LLM_API_KEY in the OpenHands UI itself.
|
||||
|
||||
:::note
|
||||
You can find your ChatGPT deployment name on the deployments page in Azure. It could be the same with the chat model name (e.g. 'GPT4-1106-preview'), by default or initially set, but it doesn't have to be the same. Run opendevin, and when you load it in the browser, go to Settings and set model as above: "azure/<your-actual-gpt-deployment-name>". If it's not in the list, enter your own text and save it.
|
||||
You can find your ChatGPT deployment name on the deployments page in Azure. It could be the same with the chat model name (e.g. 'GPT4-1106-preview'), by default or initially set, but it doesn't have to be the same. Run openhands, and when you load it in the browser, go to Settings and set model as above: "azure/<your-actual-gpt-deployment-name>". If it's not in the list, enter your own text and save it.
|
||||
:::
|
||||
|
||||
## Embeddings
|
||||
|
||||
OpenDevin uses llama-index for embeddings. You can find their documentation on Azure [here](https://docs.llamaindex.ai/en/stable/api_reference/embeddings/azure_openai/)
|
||||
OpenHands uses llama-index for embeddings. You can find their documentation on Azure [here](https://docs.llamaindex.ai/en/stable/api_reference/embeddings/azure_openai/)
|
||||
|
||||
### Azure openai configs
|
||||
|
||||
The model used for Azure OpenAI embeddings is "text-embedding-ada-002".
|
||||
You need the correct deployment name for this model in your Azure account.
|
||||
|
||||
When running OpenDevin in Docker, set the following environment variables using `-e`:
|
||||
When running OpenHands in Docker, set the following environment variables using `-e`:
|
||||
|
||||
```
|
||||
LLM_EMBEDDING_MODEL="azureopenai"
|
||||
|
||||
@ -2,14 +2,14 @@
|
||||
|
||||
## Completion
|
||||
|
||||
OpenDevin uses LiteLLM for completion calls. The following resources are relevant for using OpenDevin with Google's LLMs
|
||||
OpenHands uses LiteLLM for completion calls. The following resources are relevant for using OpenHands with Google's LLMs
|
||||
|
||||
- [Gemini - Google AI Studio](https://docs.litellm.ai/docs/providers/gemini)
|
||||
- [VertexAI - Google Cloud Platform](https://docs.litellm.ai/docs/providers/vertex)
|
||||
|
||||
### Gemini - Google AI Studio Configs
|
||||
|
||||
To use Gemini through Google AI Studio when running the OpenDevin Docker image, you'll need to set the following environment variables using `-e`:
|
||||
To use Gemini through Google AI Studio when running the OpenHands Docker image, you'll need to set the following environment variables using `-e`:
|
||||
|
||||
```
|
||||
GEMINI_API_KEY="<your-google-api-key>"
|
||||
@ -18,7 +18,7 @@ LLM_MODEL="gemini/gemini-1.5-pro"
|
||||
|
||||
### Vertex AI - Google Cloud Platform Configs
|
||||
|
||||
To use Vertex AI through Google Cloud Platform when running the OpenDevin Docker image, you'll need to set the following environment variables using `-e`:
|
||||
To use Vertex AI through Google Cloud Platform when running the OpenHands Docker image, you'll need to set the following environment variables using `-e`:
|
||||
|
||||
```
|
||||
GOOGLE_APPLICATION_CREDENTIALS="<json-dump-of-gcp-service-account-json>"
|
||||
|
||||
@ -4,16 +4,16 @@ sidebar_position: 2
|
||||
|
||||
# 🤖 LLM Backends
|
||||
|
||||
OpenDevin can work with any LLM backend.
|
||||
OpenHands can work with any LLM backend.
|
||||
For a full list of the LM providers and models available, please consult the
|
||||
[litellm documentation](https://docs.litellm.ai/docs/providers).
|
||||
|
||||
:::warning
|
||||
OpenDevin will issue many prompts to the LLM you configure. Most of these LLMs cost money--be sure to set spending limits and monitor usage.
|
||||
OpenHands will issue many prompts to the LLM you configure. Most of these LLMs cost money--be sure to set spending limits and monitor usage.
|
||||
:::
|
||||
|
||||
The `LLM_MODEL` environment variable controls which model is used in programmatic interactions.
|
||||
But when using the OpenDevin UI, you'll need to choose your model in the settings window.
|
||||
But when using the OpenHands UI, you'll need to choose your model in the settings window.
|
||||
|
||||
The following environment variables might be necessary for some LLMs/providers:
|
||||
|
||||
@ -24,7 +24,7 @@ The following environment variables might be necessary for some LLMs/providers:
|
||||
- `LLM_API_VERSION`
|
||||
- `LLM_DROP_PARAMS`
|
||||
|
||||
We have a few guides for running OpenDevin with specific model providers:
|
||||
We have a few guides for running OpenHands with specific model providers:
|
||||
|
||||
- [ollama](llms/local-llms)
|
||||
- [Azure](llms/azure-llms)
|
||||
@ -36,12 +36,12 @@ If you're using another provider, we encourage you to open a PR to share your se
|
||||
The best models are GPT-4 and Claude 3. Current local and open source models are
|
||||
not nearly as powerful. When using an alternative model,
|
||||
you may see long wait times between messages,
|
||||
poor responses, or errors about malformed JSON. OpenDevin
|
||||
poor responses, or errors about malformed JSON. OpenHands
|
||||
can only be as powerful as the models driving it--fortunately folks on our team
|
||||
are actively working on building better open source models!
|
||||
|
||||
## API retries and rate limits
|
||||
|
||||
Some LLMs have rate limits and may require retries. OpenDevin will automatically retry requests if it receives a 429 error or API connection error.
|
||||
Some LLMs have rate limits and may require retries. OpenHands will automatically retry requests if it receives a 429 error or API connection error.
|
||||
You can set `LLM_NUM_RETRIES`, `LLM_RETRY_MIN_WAIT`, `LLM_RETRY_MAX_WAIT` environment variables to control the number of retries and the time between retries.
|
||||
By default, `LLM_NUM_RETRIES` is 5 and `LLM_RETRY_MIN_WAIT`, `LLM_RETRY_MAX_WAIT` are 3 seconds and 60 seconds respectively.
|
||||
|
||||
@ -24,11 +24,11 @@ mistral:7b-instruct-v0.2-q4_K_M eb14864c7427 4.4 GB 2 weeks ago
|
||||
starcoder2:latest f67ae0f64584 1.7 GB 19 hours ago
|
||||
```
|
||||
|
||||
## Start OpenDevin
|
||||
## Start OpenHands
|
||||
|
||||
### Docker
|
||||
|
||||
Use the instructions [here](../intro) to start OpenDevin using Docker.
|
||||
Use the instructions [here](../intro) to start OpenHands using Docker.
|
||||
But when running `docker run`, you'll need to add a few more arguments:
|
||||
|
||||
```bash
|
||||
@ -43,7 +43,7 @@ LLM_OLLAMA_BASE_URL is optional. If you set it, it will be used to show the avai
|
||||
Example:
|
||||
|
||||
```bash
|
||||
# The directory you want OpenDevin to modify. MUST be an absolute path!
|
||||
# The directory you want OpenHands to modify. MUST be an absolute path!
|
||||
export WORKSPACE_BASE=$(pwd)/workspace
|
||||
|
||||
docker run \
|
||||
@ -65,7 +65,7 @@ You should now be able to connect to `http://localhost:3000/`
|
||||
|
||||
### Build from Source
|
||||
|
||||
Use the instructions in [Development.md](https://github.com/OpenDevin/OpenDevin/blob/main/Development.md) to build OpenDevin.
|
||||
Use the instructions in [Development.md](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md) to build OpenHands.
|
||||
Make sure `config.toml` is there by running `make setup-config` which will create one for you. In `config.toml`, enter the followings:
|
||||
|
||||
```
|
||||
@ -87,7 +87,7 @@ Done! Now you can start Devin by: `make run` without Docker. You now should be a
|
||||
|
||||
## Select your Model
|
||||
|
||||
In the OpenDevin UI, click on the Settings wheel in the bottom-left corner.
|
||||
In the OpenHands UI, click on the Settings wheel in the bottom-left corner.
|
||||
Then in the `Model` input, enter `ollama/codellama:7b`, or the name of the model you pulled earlier.
|
||||
If it doesn’t show up in a dropdown, that’s fine, just type it in. Click Save when you’re done.
|
||||
|
||||
@ -95,7 +95,7 @@ And now you're ready to go!
|
||||
|
||||
## Configuring the ollama service (WSL) {#configuring-ollama-service-wsl-en}
|
||||
|
||||
The default configuration for ollama in WSL only serves localhost. This means you can't reach it from a docker container. eg. it wont work with OpenDevin. First let's test that ollama is running correctly.
|
||||
The default configuration for ollama in WSL only serves localhost. This means you can't reach it from a docker container. eg. it wont work with OpenHands. First let's test that ollama is running correctly.
|
||||
|
||||
```bash
|
||||
ollama list # get list of installed models
|
||||
@ -107,7 +107,7 @@ curl http://localhost:11434/api/generate -d '{"model":"[NAME]","prompt":"hi"}'
|
||||
Once that is done, test that it allows "outside" requests, like those from inside a docker container.
|
||||
|
||||
```bash
|
||||
docker ps # get list of running docker containers, for most accurate test choose the open devin sandbox container.
|
||||
docker ps # get list of running docker containers, for most accurate test choose the OpenHands sandbox container.
|
||||
docker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d '{"model":"[NAME]","prompt":"hi"}'
|
||||
#ex. docker exec cd9cc82f7a11 curl http://host.docker.internal:11434/api/generate -d '{"model":"codellama","prompt":"hi"}'
|
||||
```
|
||||
@ -144,7 +144,7 @@ Finally test that ollama is accessible from within the container
|
||||
|
||||
```bash
|
||||
ollama list # get list of installed models
|
||||
docker ps # get list of running docker containers, for most accurate test choose the open devin sandbox container.
|
||||
docker ps # get list of running docker containers, for most accurate test choose the OpenHands sandbox container.
|
||||
docker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d '{"model":"[NAME]","prompt":"hi"}'
|
||||
```
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ If you're running on Windows and having trouble, check out our [guide for Window
|
||||
|
||||
### Unable to connect to Docker
|
||||
|
||||
[GitHub Issue](https://github.com/OpenDevin/OpenDevin/issues/1226)
|
||||
[GitHub Issue](https://github.com/All-Hands-AI/OpenHands/issues/1226)
|
||||
|
||||
**Symptoms**
|
||||
|
||||
@ -43,7 +43,7 @@ docker.errors.DockerException: Error while fetching server API version: ('Connec
|
||||
|
||||
**Details**
|
||||
|
||||
OpenDevin uses a Docker container to do its work safely, without potentially breaking your machine.
|
||||
OpenHands uses a Docker container to do its work safely, without potentially breaking your machine.
|
||||
|
||||
**Workarounds**
|
||||
|
||||
@ -55,7 +55,7 @@ OpenDevin uses a Docker container to do its work safely, without potentially bre
|
||||
---
|
||||
### Unable to connect to SSH box
|
||||
|
||||
[GitHub Issue](https://github.com/OpenDevin/OpenDevin/issues/1156)
|
||||
[GitHub Issue](https://github.com/All-Hands-AI/OpenHands/issues/1156)
|
||||
|
||||
**Symptoms**
|
||||
|
||||
@ -67,7 +67,7 @@ pexpect.pxssh.ExceptionPxssh: Could not establish connection to host
|
||||
|
||||
**Details**
|
||||
|
||||
By default, OpenDevin connects to a running container using SSH. On some machines,
|
||||
By default, OpenHands connects to a running container using SSH. On some machines,
|
||||
especially Windows, this seems to fail.
|
||||
|
||||
**Workarounds**
|
||||
@ -75,12 +75,12 @@ especially Windows, this seems to fail.
|
||||
* Restart your computer (sometimes it does work)
|
||||
* Be sure to have the latest versions of WSL and Docker
|
||||
* Check that your distribution in WSL is up to date as well
|
||||
* Try [this reinstallation guide](https://github.com/OpenDevin/OpenDevin/issues/1156#issuecomment-2064549427)
|
||||
* Try [this reinstallation guide](https://github.com/All-Hands-AI/OpenHands/issues/1156#issuecomment-2064549427)
|
||||
|
||||
---
|
||||
### Unable to connect to LLM
|
||||
|
||||
[GitHub Issue](https://github.com/OpenDevin/OpenDevin/issues/1208)
|
||||
[GitHub Issue](https://github.com/All-Hands-AI/OpenHands/issues/1208)
|
||||
|
||||
**Symptoms**
|
||||
|
||||
@ -93,9 +93,9 @@ AttributeError: 'NoneType' object has no attribute 'request'
|
||||
|
||||
**Details**
|
||||
|
||||
[GitHub Issues](https://github.com/OpenDevin/OpenDevin/issues?q=is%3Aissue+is%3Aopen+404)
|
||||
[GitHub Issues](https://github.com/All-Hands-AI/OpenHands/issues?q=is%3Aissue+is%3Aopen+404)
|
||||
|
||||
This usually happens with *local* LLM setups, when OpenDevin can't connect to the LLM server.
|
||||
This usually happens with *local* LLM setups, when OpenHands can't connect to the LLM server.
|
||||
See our guide for [local LLMs](llms/local-llms) for more information.
|
||||
|
||||
**Workarounds**
|
||||
@ -190,24 +190,24 @@ export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
|
||||
**Symptoms**
|
||||
|
||||
OpenDevin usually asks whether to resume or start a new session when opening the UI.
|
||||
OpenHands usually asks whether to resume or start a new session when opening the UI.
|
||||
But clicking "Resume" still starts a fresh new chat.
|
||||
|
||||
**Details**
|
||||
|
||||
With a standard installation as of today session data is stored in memory.
|
||||
Currently, if OpenDevin's service is restarted, previous sessions become
|
||||
Currently, if OpenHands's service is restarted, previous sessions become
|
||||
invalid (a new secret is generated) and thus not recoverable.
|
||||
|
||||
**Workarounds**
|
||||
|
||||
* Change configuration to make sessions persistent by editing the `config.toml`
|
||||
file (in OpenDevin's root folder) by specifying a `file_store` and an
|
||||
file (in OpenHands's root folder) by specifying a `file_store` and an
|
||||
absolute `file_store_path`:
|
||||
|
||||
```toml
|
||||
file_store="local"
|
||||
file_store_path="/absolute/path/to/opendevin/cache/directory"
|
||||
file_store_path="/absolute/path/to/openhands/cache/directory"
|
||||
```
|
||||
|
||||
* Add a fixed jwt secret in your .bashrc, like below, so that previous session id's
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user