diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b4ce891d672f..7f5d59b91d4b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -70,3 +70,8 @@ updates: applies-to: "version-updates" patterns: - "*" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/scripts/check_version_consistency.py b/.github/scripts/check_version_consistency.py new file mode 100755 index 000000000000..daf78a8d2c1a --- /dev/null +++ b/.github/scripts/check_version_consistency.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +import os +import re +import sys +from typing import Set, Tuple + + +def find_version_references(directory: str) -> Tuple[Set[str], Set[str]]: + openhands_versions = set() + runtime_versions = set() + + version_pattern_openhands = re.compile(r'openhands:(\d{1})\.(\d{2})') + version_pattern_runtime = re.compile(r'runtime:(\d{1})\.(\d{2})') + + for root, _, files in os.walk(directory): + # Skip .git directory + if '.git' in root: + continue + + for file in files: + if file.endswith( + ('.md', '.yml', '.yaml', '.txt', '.html', '.py', '.js', '.ts') + ): + file_path = os.path.join(root, file) + try: + with open(file_path, 'r', encoding='utf-8') as f: + content = f.read() + + # Find all openhands version references + matches = version_pattern_openhands.findall(content) + openhands_versions.update(matches) + + # Find all runtime version references + matches = version_pattern_runtime.findall(content) + runtime_versions.update(matches) + except Exception as e: + print(f'Error reading {file_path}: {e}', file=sys.stderr) + + return openhands_versions, runtime_versions + + +def main(): + repo_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) + openhands_versions, runtime_versions = find_version_references(repo_root) + + exit_code = 0 + + if len(openhands_versions) > 1: + print('Error: Multiple openhands versions found:', file=sys.stderr) + print('Found versions:', sorted(openhands_versions), file=sys.stderr) + exit_code = 1 + elif len(openhands_versions) == 0: + print('Warning: No openhands version references found', file=sys.stderr) + + if len(runtime_versions) > 1: + print('Error: Multiple runtime versions found:', file=sys.stderr) + print('Found versions:', sorted(runtime_versions), file=sys.stderr) + exit_code = 1 + elif len(runtime_versions) == 0: + print('Warning: No runtime version references found', file=sys.stderr) + + sys.exit(exit_code) + + +if __name__ == '__main__': + main() diff --git a/.github/workflows/eval-runner.yml b/.github/workflows/eval-runner.yml index 789ee20bc801..6efc51acbfa7 100644 --- a/.github/workflows/eval-runner.yml +++ b/.github/workflows/eval-runner.yml @@ -131,7 +131,7 @@ jobs: - name: Post to a Slack channel id: slack - uses: slackapi/slack-github-action@v1.27.0 + uses: slackapi/slack-github-action@v2.0.0 with: channel-id: 'C07SVQSCR6F' slack-message: "*Evaluation Trigger:* ${{ github.event_name == 'pull_request' && format('Pull Request (eval-this label on PR #{0})', github.event.pull_request.number) || github.event_name == 'schedule' && 'Daily Schedule' || format('Manual Trigger: {0}', github.event.inputs.reason) }}\n\nLink to summary: [here](https://github.com/${{ github.repository }}/issues/${{ github.event_name == 'pull_request' && github.event.pull_request.number || 4504 }}#issuecomment-${{ steps.create_comment.outputs.comment-id }})" diff --git a/.github/workflows/fe-unit-tests.yml b/.github/workflows/fe-unit-tests.yml index dd577b4b43c5..0b19a5e837f6 100644 --- a/.github/workflows/fe-unit-tests.yml +++ b/.github/workflows/fe-unit-tests.yml @@ -43,6 +43,6 @@ jobs: working-directory: ./frontend run: npm run test:coverage - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/ghcr-build.yml b/.github/workflows/ghcr-build.yml index 7948291d6ec3..26dccac08c30 100644 --- a/.github/workflows/ghcr-build.yml +++ b/.github/workflows/ghcr-build.yml @@ -293,7 +293,7 @@ jobs: RUN_AS_OPENHANDS=false \ poetry run pytest -n 3 -raRs --reruns 2 --reruns-delay 5 --cov=openhands --cov-report=xml -s ./tests/runtime --ignore=tests/runtime/test_browsergym_envs.py - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} @@ -370,7 +370,7 @@ jobs: RUN_AS_OPENHANDS=true \ poetry run pytest -n 3 -raRs --reruns 2 --reruns-delay 5 --cov=openhands --cov-report=xml -s ./tests/runtime --ignore=tests/runtime/test_browsergym_envs.py - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1bfc8c91c6a4..789a938e1d7e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -53,3 +53,16 @@ jobs: run: pip install pre-commit==3.7.0 - name: Run pre-commit hooks run: pre-commit run --files openhands/**/* evaluation/**/* tests/**/* --show-diff-on-failure --config ./dev_config/python/.pre-commit-config.yaml + + # Check version consistency across documentation + check-version-consistency: + name: Check version consistency + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up python + uses: actions/setup-python@v5 + with: + python-version: 3.12 + - name: Run version consistency check + run: .github/scripts/check_version_consistency.py diff --git a/.github/workflows/openhands-resolver.yml b/.github/workflows/openhands-resolver.yml index cb613d65c52a..028316ee05d5 100644 --- a/.github/workflows/openhands-resolver.yml +++ b/.github/workflows/openhands-resolver.yml @@ -100,7 +100,7 @@ jobs: contains(github.event.review.body, '@openhands-agent-exp') ) ) - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.pythonLocation }}/lib/python3.12/site-packages/* key: ${{ runner.os }}-pip-openhands-resolver-${{ hashFiles('requirements.txt') }} @@ -185,12 +185,17 @@ jobs: - name: Install OpenHands uses: actions/github-script@v7 + env: + COMMENT_BODY: ${{ github.event.comment.body || '' }} + REVIEW_BODY: ${{ github.event.review.body || '' }} + LABEL_NAME: ${{ github.event.label.name || '' }} + EVENT_NAME: ${{ github.event_name }} with: script: | - const commentBody = `${{ github.event.comment.body || '' }}`.trim(); - const reviewBody = `${{ github.event.review.body || '' }}`.trim(); - const labelName = `${{ github.event.label.name || '' }}`.trim(); - const eventName = `${{ github.event_name }}`.trim(); + const commentBody = process.env.COMMENT_BODY.trim(); + const reviewBody = process.env.REVIEW_BODY.trim(); + const labelName = process.env.LABEL_NAME.trim(); + const eventName = process.env.EVENT_NAME.trim(); // Check conditions const isExperimentalLabel = labelName === "fix-me-experimental"; diff --git a/.github/workflows/py-unit-tests-mac.yml b/.github/workflows/py-unit-tests-mac.yml index dd160e1f4455..4d9e8bf5cbd4 100644 --- a/.github/workflows/py-unit-tests-mac.yml +++ b/.github/workflows/py-unit-tests-mac.yml @@ -93,6 +93,6 @@ jobs: - name: Run Tests run: poetry run pytest --forked --cov=openhands --cov-report=xml ./tests/unit --ignore=tests/unit/test_memory.py - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/py-unit-tests.yml b/.github/workflows/py-unit-tests.yml index 84aedf088fc6..1e42ccc2d82c 100644 --- a/.github/workflows/py-unit-tests.yml +++ b/.github/workflows/py-unit-tests.yml @@ -46,6 +46,6 @@ jobs: - name: Run Tests run: poetry run pytest --forked -n auto --cov=openhands --cov-report=xml -svv ./tests/unit --ignore=tests/unit/test_memory.py - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/run-eval.yml b/.github/workflows/run-eval.yml index df79872aec26..460e9405d58e 100644 --- a/.github/workflows/run-eval.yml +++ b/.github/workflows/run-eval.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout PR branch - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} diff --git a/.openhands/microagents/repo.md b/.openhands/microagents/repo.md new file mode 100644 index 000000000000..43c0eaeccb68 --- /dev/null +++ b/.openhands/microagents/repo.md @@ -0,0 +1,41 @@ +--- +name: repo +agent: CodeAct +--- +This repository contains the code for OpenHands, an automated AI software engineer. It has a Python backend +(in the `openhands` directory) and React frontend (in the `frontend` directory). + +## General Setup: +To set up the entire repo, including frontend and backend, run `make build`. +You don't need to do this unless the user asks you to, or if you're trying to run the entire application. + +Before pushing any changes, you should ensure that any lint errors or simple test errors have been fixed. + +* If you've made changes to the backend, you should run `pre-commit run --all-files --config ./dev_config/python/.pre-commit-config.yaml` +* If you've made changes to the frontend, you should run `cd frontend && npm run lint:fix && npm run build ; cd ..` + +If either command fails, it may have automatically fixed some issues. You should fix any issues that weren't automatically fixed, +then re-run the command to ensure it passes. + +## Repository Structure +Backend: +- Located in the `openhands` directory +- Testing: + - All tests are in `tests/unit/test_*.py` + - To test new code, run `poetry run pytest tests/unit/test_xxx.py` where `xxx` is the appropriate file for the current functionality + - Write all tests with pytest + +Frontend: +- Located in the `frontend` directory +- Prerequisites: A recent version of NodeJS / NPM +- Setup: Run `npm install` in the frontend directory +- Testing: + - Run tests: `npm run test` + - To run specific tests: `npm run test -- -t "TestName"` +- Building: + - Build for production: `npm run build` +- Environment Variables: + - Set in `frontend/.env` or as environment variables + - Available variables: VITE_BACKEND_HOST, VITE_USE_TLS, VITE_INSECURE_SKIP_VERIFY, VITE_FRONTEND_PORT +- Internationalization: + - Generate i18n declaration file: `npm run make-i18n` diff --git a/.openhands_instructions b/.openhands_instructions deleted file mode 100644 index d3a4f9d6c8a1..000000000000 --- a/.openhands_instructions +++ /dev/null @@ -1,28 +0,0 @@ -OpenHands is an automated AI software engineer. It is a repo with a Python backend -(in the `openhands` directory) and TypeScript frontend (in the `frontend` directory). - -General Setup: -- To set up the entire repo, including frontend and backend, run `make build` -- To run linting and type-checking before finishing the job, run `poetry run pre-commit run --all-files --config ./dev_config/python/.pre-commit-config.yaml` - -Backend: -- Located in the `openhands` directory -- Testing: - - All tests are in `tests/unit/test_*.py` - - To test new code, run `poetry run pytest tests/unit/test_xxx.py` where `xxx` is the appropriate file for the current functionality - - Write all tests with pytest - -Frontend: -- Located in the `frontend` directory -- Prerequisites: A recent version of NodeJS / NPM -- Setup: Run `npm install` in the frontend directory -- Testing: - - Run tests: `npm run test` - - To run specific tests: `npm run test -- -t "TestName"` -- Building: - - Build for production: `npm run build` -- Environment Variables: - - Set in `frontend/.env` or as environment variables - - Available variables: VITE_BACKEND_HOST, VITE_USE_TLS, VITE_INSECURE_SKIP_VERIFY, VITE_FRONTEND_PORT -- Internationalization: - - Generate i18n declaration file: `npm run make-i18n` diff --git a/Development.md b/Development.md index bcb48ece3a02..fbdaac497e91 100644 --- a/Development.md +++ b/Development.md @@ -8,7 +8,7 @@ Otherwise, you can clone the OpenHands project directly. * Linux, Mac OS, or [WSL on Windows](https://learn.microsoft.com/en-us/windows/wsl/install) [Ubuntu <= 22.04] * [Docker](https://docs.docker.com/engine/install/) (For those on MacOS, make sure to allow the default Docker socket to be used from advanced settings!) * [Python](https://www.python.org/downloads/) = 3.12 -* [NodeJS](https://nodejs.org/en/download/package-manager) >= 18.17.1 +* [NodeJS](https://nodejs.org/en/download/package-manager) >= 20.x * [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer) >= 1.8 * OS-specific dependencies: - Ubuntu: build-essential => `sudo apt-get install build-essential` @@ -100,7 +100,7 @@ poetry run pytest ./tests/unit/test_*.py To reduce build time (e.g., if no changes were made to the client-runtime component), you can use an existing Docker container image by setting the SANDBOX_RUNTIME_CONTAINER_IMAGE environment variable to the desired Docker image. -Example: `export SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.16-nikolaik` +Example: `export SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.17-nikolaik` ## Develop inside Docker container diff --git a/Makefile b/Makefile index c4e1949b9621..e1f14c410f43 100644 --- a/Makefile +++ b/Makefile @@ -81,10 +81,10 @@ check-nodejs: @if command -v node > /dev/null; then \ NODE_VERSION=$(shell node --version | sed -E 's/v//g'); \ IFS='.' read -r -a NODE_VERSION_ARRAY <<< "$$NODE_VERSION"; \ - if [ "$${NODE_VERSION_ARRAY[0]}" -gt 18 ] || ([ "$${NODE_VERSION_ARRAY[0]}" -eq 18 ] && [ "$${NODE_VERSION_ARRAY[1]}" -gt 17 ]) || ([ "$${NODE_VERSION_ARRAY[0]}" -eq 18 ] && [ "$${NODE_VERSION_ARRAY[1]}" -eq 17 ] && [ "$${NODE_VERSION_ARRAY[2]}" -ge 1 ]); then \ + if [ "$${NODE_VERSION_ARRAY[0]}" -ge 20 ]; then \ echo "$(BLUE)Node.js $$NODE_VERSION is already installed.$(RESET)"; \ else \ - echo "$(RED)Node.js 18.17.1 or later is required. Please install Node.js 18.17.1 or later to continue.$(RESET)"; \ + echo "$(RED)Node.js 20.x or later is required. Please install Node.js 20.x or later to continue.$(RESET)"; \ exit 1; \ fi; \ else \ diff --git a/README.md b/README.md index 269d8c9f9eaf..0a3470267205 100644 --- a/README.md +++ b/README.md @@ -43,17 +43,17 @@ See the [Installation](https://docs.all-hands.dev/modules/usage/installation) gu system requirements and more information. ```bash -docker pull docker.all-hands.dev/all-hands-ai/runtime:0.16-nikolaik +docker pull docker.all-hands.dev/all-hands-ai/runtime:0.17-nikolaik docker run -it --rm --pull=always \ - -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.16-nikolaik \ + -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.17-nikolaik \ -e LOG_ALL_EVENTS=true \ -v /var/run/docker.sock:/var/run/docker.sock \ - -v ~/.openhands:/home/openhands/.openhands \ + -v ~/.openhands-state:/.openhands-state \ -p 3000:3000 \ --add-host host.docker.internal:host-gateway \ --name openhands-app \ - docker.all-hands.dev/all-hands-ai/openhands:0.16 + docker.all-hands.dev/all-hands-ai/openhands:0.17 ``` You'll find OpenHands running at [http://localhost:3000](http://localhost:3000)! diff --git a/compose.yml b/compose.yml index 40e05b79a0b8..7c46a236ae1d 100644 --- a/compose.yml +++ b/compose.yml @@ -7,7 +7,7 @@ services: image: openhands:latest container_name: openhands-app-${DATE:-} environment: - - SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-ghcr.io/all-hands-ai/runtime:0.16-nikolaik} + - SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-ghcr.io/all-hands-ai/runtime:0.17-nikolaik} - SANDBOX_USER_ID=${SANDBOX_USER_ID:-1234} - WORKSPACE_MOUNT_PATH=${WORKSPACE_BASE:-$PWD/workspace} ports: diff --git a/containers/app/Dockerfile b/containers/app/Dockerfile index 67753cbe2c2d..127eb306f9ed 100644 --- a/containers/app/Dockerfile +++ b/containers/app/Dockerfile @@ -43,7 +43,8 @@ ENV WORKSPACE_BASE=/opt/workspace_base ENV OPENHANDS_BUILD_VERSION=$OPENHANDS_BUILD_VERSION ENV SANDBOX_USER_ID=0 ENV FILE_STORE=local -ENV FILE_STORE_PATH=~/.openhands +ENV FILE_STORE_PATH=/.openhands-state +RUN mkdir -p $FILE_STORE_PATH RUN mkdir -p $WORKSPACE_BASE RUN apt-get update -y \ diff --git a/containers/dev/compose.yml b/containers/dev/compose.yml index 492ab2422d46..e393f23a1b5e 100644 --- a/containers/dev/compose.yml +++ b/containers/dev/compose.yml @@ -11,7 +11,7 @@ services: - BACKEND_HOST=${BACKEND_HOST:-"0.0.0.0"} - SANDBOX_API_HOSTNAME=host.docker.internal # - - SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-ghcr.io/all-hands-ai/runtime:0.16-nikolaik} + - SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-ghcr.io/all-hands-ai/runtime:0.17-nikolaik} - SANDBOX_USER_ID=${SANDBOX_USER_ID:-1234} - WORKSPACE_MOUNT_PATH=${WORKSPACE_BASE:-$PWD/workspace} ports: diff --git a/docs/i18n/fr/docusaurus-plugin-content-docs/current/usage/about.md b/docs/i18n/fr/docusaurus-plugin-content-docs/current/usage/about.md index 7fd3ee130fe6..a38679543382 100644 --- a/docs/i18n/fr/docusaurus-plugin-content-docs/current/usage/about.md +++ b/docs/i18n/fr/docusaurus-plugin-content-docs/current/usage/about.md @@ -1,42 +1,21 @@ -# 📚 Divers -## ⭐ StratĂ©gie de recherche + +# À propos d'OpenHands + +## StratĂ©gie de recherche La rĂ©plication complĂšte d'applications de niveau production avec des LLM est une entreprise complexe. Notre stratĂ©gie implique : -1. **Recherche technique fondamentale :** Se concentrer sur la recherche fondamentale pour comprendre et amĂ©liorer les aspects techniques de la gĂ©nĂ©ration et de la gestion de code -2. **CapacitĂ©s spĂ©cialisĂ©es :** AmĂ©liorer l'efficacitĂ© des composants de base grĂące Ă  la curation de donnĂ©es, aux mĂ©thodes d'entraĂźnement, etc. -3. **Planification des tĂąches :** DĂ©velopper des capacitĂ©s de dĂ©tection de bugs, de gestion de base de code et d'optimisation +1. **Recherche technique fondamentale :** Se concentrer sur la recherche fondamentale pour comprendre et amĂ©liorer les aspects techniques de la gĂ©nĂ©ration et de la gestion du code +2. **CapacitĂ©s spĂ©cialisĂ©es :** AmĂ©liorer l'efficacitĂ© des composants de base grĂące Ă  la curation des donnĂ©es, aux mĂ©thodes d'entraĂźnement, et plus encore +3. **Planification des tĂąches :** DĂ©velopper des capacitĂ©s pour la dĂ©tection des bugs, la gestion des bases de code et l'optimisation 4. **Évaluation :** Établir des mĂ©triques d'Ă©valuation complĂštes pour mieux comprendre et amĂ©liorer nos modĂšles -## 🚧 Agent par dĂ©faut +## Agent par dĂ©faut Notre Agent par dĂ©faut est actuellement le [CodeActAgent](agents), qui est capable de gĂ©nĂ©rer du code et de gĂ©rer des fichiers. -## đŸ€ Comment contribuer - -OpenHands est un projet communautaire et nous accueillons les contributions de tous. 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 s'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 dans l'ingĂ©nierie logicielle, participez Ă  l'Ă©valuation des modĂšles ou suggĂ©rez des amĂ©liorations -- **Retours et tests :** Utilisez la boĂźte Ă  outils OpenHands, signalez des bugs, suggĂ©rez des fonctionnalitĂ©s ou donnez votre avis sur la facilitĂ© d'utilisation - -Pour plus de dĂ©tails, veuillez consulter [ce document](https://github.com/All-Hands-AI/OpenHands/blob/main/CONTRIBUTING.md). - -## đŸ€– Rejoignez notre communautĂ© - -Nous avons Ă  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, LLM, agent, etc. - -- [Espace de travail Slack](https://join.slack.com/t/openhands-ai/shared_invite/zt-2wkh4pklz-w~h_DVDtEe9H5kyQlcNxVw) -- [Serveur Discord](https://discord.gg/ESHStjSjD4) - -Si vous souhaitez contribuer, n'hĂ©sitez pas Ă  rejoindre notre communautĂ©. Simplifions ensemble l'ingĂ©nierie logicielle ! - -🐚 **Codez moins, faites plus avec OpenHands.** - -[![Star History Chart](https://api.star-history.com/svg?repos=All-Hands-AI/OpenHands&type=Date)](https://star-history.com/#All-Hands-AI/OpenHands&Date) - -## đŸ› ïž Construit avec +## Construit avec OpenHands est construit en utilisant une combinaison de frameworks et de bibliothĂšques puissants, fournissant une base solide pour son dĂ©veloppement. Voici les principales technologies utilisĂ©es dans le projet : @@ -44,6 +23,6 @@ OpenHands est construit en utilisant une combinaison de frameworks et de bibliot Veuillez noter que la sĂ©lection de ces technologies est en cours et que des technologies supplĂ©mentaires peuvent ĂȘtre ajoutĂ©es ou des technologies existantes peuvent ĂȘtre supprimĂ©es Ă  mesure que le projet Ă©volue. Nous nous efforçons d'adopter les outils les plus appropriĂ©s et les plus efficaces pour amĂ©liorer les capacitĂ©s d'OpenHands. -## 📜 Licence +## Licence -DistribuĂ© sous la licence MIT. Voir [notre licence](https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE) pour plus d'informations. +DistribuĂ© sous la [Licence](https://github.com/All-Hands-AI/OpenHands/blob/main/LICENSE) MIT. diff --git a/docs/i18n/fr/docusaurus-plugin-content-docs/current/usage/configuration-options.md b/docs/i18n/fr/docusaurus-plugin-content-docs/current/usage/configuration-options.md new file mode 100644 index 000000000000..36024b2f3c15 --- /dev/null +++ b/docs/i18n/fr/docusaurus-plugin-content-docs/current/usage/configuration-options.md @@ -0,0 +1,371 @@ + + +# Options de configuration + +Ce guide dĂ©taille toutes les options de configuration disponibles pour OpenHands, vous aidant Ă  personnaliser son comportement et Ă  l'intĂ©grer avec d'autres services. + +:::note +Si vous exĂ©cutez en [Mode GUI](https://docs.all-hands.dev/modules/usage/how-to/gui-mode), les paramĂštres disponibles dans l'interface utilisateur des paramĂštres auront toujours +la prioritĂ©. +::: + +--- + +# Table des matiĂšres + +1. [Configuration de base](#configuration-de-base) + - [ClĂ©s API](#clĂ©s-api) + - [Espace de travail](#espace-de-travail) + - [DĂ©bogage et journalisation](#dĂ©bogage-et-journalisation) + - [Gestion des sessions](#gestion-des-sessions) + - [Trajectoires](#trajectoires) + - [Stockage de fichiers](#stockage-de-fichiers) + - [Gestion des tĂąches](#gestion-des-tĂąches) + - [Configuration du bac Ă  sable](#configuration-du-bac-Ă -sable) + - [Divers](#divers) +2. [Configuration LLM](#configuration-llm) + - [Informations d'identification AWS](#informations-didentification-aws) + - [Configuration de l'API](#configuration-de-lapi) + - [Fournisseur LLM personnalisĂ©](#fournisseur-llm-personnalisĂ©) + - [Embeddings](#embeddings) + - [Gestion des messages](#gestion-des-messages) + - [SĂ©lection du modĂšle](#sĂ©lection-du-modĂšle) + - [Nouvelles tentatives](#nouvelles-tentatives) + - [Options avancĂ©es](#options-avancĂ©es) +3. [Configuration de l'agent](#configuration-de-lagent) + - [Configuration du micro-agent](#configuration-du-micro-agent) + - [Configuration de la mĂ©moire](#configuration-de-la-mĂ©moire) + - [Configuration LLM](#configuration-llm-2) + - [Configuration de l'espace d'action](#configuration-de-lespace-daction) + - [Utilisation du micro-agent](#utilisation-du-micro-agent) +4. [Configuration du bac Ă  sable](#configuration-du-bac-Ă -sable-2) + - [ExĂ©cution](#exĂ©cution) + - [Image de conteneur](#image-de-conteneur) + - [Mise en rĂ©seau](#mise-en-rĂ©seau) + - [Linting et plugins](#linting-et-plugins) + - [DĂ©pendances et environnement](#dĂ©pendances-et-environnement) + - [Évaluation](#Ă©valuation) +5. [Configuration de sĂ©curitĂ©](#configuration-de-sĂ©curitĂ©) + - [Mode de confirmation](#mode-de-confirmation) + - [Analyseur de sĂ©curitĂ©](#analyseur-de-sĂ©curitĂ©) + +--- + +## Configuration de base + +Les options de configuration de base sont dĂ©finies dans la section `[core]` du fichier `config.toml`. + +**ClĂ©s API** +- `e2b_api_key` + - Type : `str` + - Valeur par dĂ©faut : `""` + - Description : ClĂ© API pour E2B + +- `modal_api_token_id` + - Type : `str` + - Valeur par dĂ©faut : `""` + - Description : ID du jeton API pour Modal + +- `modal_api_token_secret` + - Type : `str` + - Valeur par dĂ©faut : `""` + - Description : Secret du jeton API pour Modal + +**Espace de travail** +- `workspace_base` + - Type : `str` + - Valeur par dĂ©faut : `"./workspace"` + - Description : Chemin de base pour l'espace de travail + +- `cache_dir` + - Type : `str` + - Valeur par dĂ©faut : `"/tmp/cache"` + - Description : Chemin du rĂ©pertoire de cache + +**DĂ©bogage et journalisation** +- `debug` + - Type : `bool` + - Valeur par dĂ©faut : `false` + - Description : Activer le dĂ©bogage + +- `disable_color` + - Type : `bool` + - Valeur par dĂ©faut : `false` + - Description : DĂ©sactiver la couleur dans la sortie du terminal + +**Trajectoires** +- `trajectories_path` + - Type : `str` + - Valeur par dĂ©faut : `"./trajectories"` + - Description : Chemin pour stocker les trajectoires (peut ĂȘtre un dossier ou un fichier). Si c'est un dossier, les trajectoires seront enregistrĂ©es dans un fichier nommĂ© avec l'ID de session et l'extension .json, dans ce dossier. + +**Stockage de fichiers** +- `file_store_path` + - Type : `str` + - Valeur par dĂ©faut : `"/tmp/file_store"` + - Description : Chemin de stockage des fichiers + +- `file_store` + - Type : `str` + - Valeur par dĂ©faut : `"memory"` + - Description : Type de stockage de fichiers + +- `file_uploads_allowed_extensions` + - Type : `list of str` + - Valeur par dĂ©faut : `[".*"]` + - Description : Liste des extensions de fichiers autorisĂ©es pour les tĂ©lĂ©chargements + +- `file_uploads_max_file_size_mb` + - Type : `int` + - Valeur par dĂ©faut : `0` + - Description : Taille maximale des fichiers pour les tĂ©lĂ©chargements, en mĂ©gaoctets + +- `file_uploads_restrict_file_types` + - Type : `bool` + - Valeur par dĂ©faut : `false` + - Description : Restreindre les types de fichiers pour les tĂ©lĂ©chargements de fichiers + +- `file_uploads_allowed_extensions` + - Type : `list of str` + - Valeur par dĂ©faut : `[".*"]` + - Description : Liste des extensions de fichiers autorisĂ©es pour les tĂ©lĂ©chargements + +**Gestion des tĂąches** +- `max_budget_per_task` + - Type : `float` + - Valeur par dĂ©faut : `0.0` + - Description : Budget maximal par tĂąche (0.0 signifie aucune limite) + +- `max_iterations` + - Type : `int` + - Valeur par dĂ©faut : `100` + - Description : Nombre maximal d'itĂ©rations + +**Configuration du bac Ă  sable** +- `workspace_mount_path_in_sandbox` + - Type : `str` + - Valeur par dĂ©faut : `"/workspace"` + - Description : Chemin de montage de l'espace de travail dans le bac Ă  sable + +- `workspace_mount_path` + - Type : `str` + - Valeur par dĂ©faut : `""` + - Description : Chemin de montage de l'espace de travail + +- `workspace_mount_rewrite` + - Type : `str` + - Valeur par dĂ©faut : `""` + - Description : Chemin pour rĂ©Ă©crire le chemin de montage de l'espace de travail. Vous pouvez gĂ©nĂ©ralement ignorer cela, cela fait rĂ©fĂ©rence Ă  des cas spĂ©ciaux d'exĂ©cution Ă  l'intĂ©rieur d'un autre conteneur. + +**Divers** +- `run_as_openhands` + - Type : `bool` + - Valeur par dĂ©faut : `true` + - Description : ExĂ©cuter en tant qu'OpenHands + +- `runtime` + - Type : `str` + - Valeur par dĂ©faut : `"eventstream"` + - Description : Environnement d'exĂ©cution + +- `default_agent` + - Type : `str` + - Valeur par dĂ©faut : `"CodeActAgent"` + - Description : Nom de l'agent par dĂ©faut + +- `jwt_secret` + - Type : `str` + - Valeur par dĂ©faut : `uuid.uuid4().hex` + - Description : Secret JWT pour l'authentification. Veuillez le dĂ©finir sur votre propre valeur. + +## Configuration LLM + +Les options de configuration LLM (Large Language Model) sont dĂ©finies dans la section `[llm]` du fichier `config.toml`. + +Pour les utiliser avec la commande docker, passez `-e LLM_