π OpenHands: AI-Driven Development
Verified list of LLMs working with OpenHands and some LLM doc changes (#3714)
mamoodi510a82a03970
diff --git a/docs/modules/usage/about.md b/docs/modules/usage/about.mdindex 419e305790..c33307ade5 100644--- a/docs/modules/usage/about.md+++ b/docs/modules/usage/about.md@@ -5,6 +5,7 @@ sidebar_position: 8# π Misc## βοΈ Research Strategy+Achieving full replication of production-grade applications with LLMs is a complex endeavor. Our strategy involves:1. **Core Technical Research:** Focusing on foundational research to understand and improve the technical aspects of code generation and handling@@ -13,9 +14,11 @@ Achieving full replication of production-grade applications with LLMs is a compl4. **Evaluation:** Establishing comprehensive evaluation metrics to better understand and improve our models## π§ Default Agent+Our default Agent is currently the [CodeActAgent](agents), which is capable of generating code and handling files.## π€ How to Contribute+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@@ -25,6 +28,7 @@ OpenHands is a community-driven project, and we welcome contributions from everyFor 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 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-2oikve2hu-UDxHeo8nsE69y6T7yFX_BA)@@ -37,6 +41,7 @@ If you would love to contribute, feel free to join our community. Let's simplify[](https://star-history.com/#All-Hands-AI/OpenHands&Date)## π οΈ Built With+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:       @@ -44,4 +49,5 @@ OpenHands is built using a combination of powerful frameworks and libraries, proPlease 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/All-Hands-AI/OpenHands/blob/main/LICENSE) for more information.diff --git a/docs/modules/usage/agents.md b/docs/modules/usage/agents.mdindex 4c6a823e03..bf2a3b62c1 100644--- a/docs/modules/usage/agents.md+++ b/docs/modules/usage/agents.md@@ -3,8 +3,11 @@ sidebar_position: 3---# π§ Main Agent and Capabilities+## CodeActAgent+### Description+This agent implements the CodeAct idea ([paper](https://arxiv.org/abs/2402.01030), [tweet](https://twitter.com/xingyaow_/status/1754556835703751087)) that consolidates LLM agentsβ **act**ions into aunified **code** action space for both _simplicity_ and _performance_.@@ -19,6 +22,7 @@ The conceptual idea is illustrated below. At each turn, the agent can:### Demo+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)_.diff --git a/docs/modules/usage/how-to/headless-mode.md b/docs/modules/usage/how-to/headless-mode.mdindex 260698e74d..d354826ab6 100644--- a/docs/modules/usage/how-to/headless-mode.md+++ b/docs/modules/usage/how-to/headless-mode.md@@ -6,19 +6,22 @@ to automate tasks with OpenHands. There are 2 main modes of operation:* **Headless** : Designed for use with scripts* **CLI** : Designed for interactive use via a console-As with other modes, the environment is configurable via environment variables or by saving values into [config.toml](https://github.com/All-Hands-AI/OpenHands/blob/main/config.template.toml)+As with other modes, the environment is configurable via environment variables or by saving values into [config.toml](https://github.com/All-Hands-AI/OpenHands/blob/main/config.template.toml)## With Python+To run OpenHands in headless mode with Python,[follow the Development setup instructions](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md),and then run:### Headless with Python+```bashpoetry run python -m openhands.core.main -t "write a bash script that prints hi"```### CLI with Python+```bashpoetry run python -m openhands.core.cli@@ -26,6 +29,7 @@ How can I help? >> write a bash script that prints hi```## Headless With Docker+To run OpenHands in headless mode with Docker, run:```bash@@ -54,6 +58,7 @@ docker run -it \```## CLI With Docker+To run OpenHands in cli mode with Docker, run:```bash@@ -78,4 +83,4 @@ docker run -it \--name openhands-app-$(date +%Y%m%d%H%M%S) \ghcr.io/all-hands-ai/openhands:0.9 \poetry run python -m openhands.core.cli-```\ No newline at end of file+```diff --git a/docs/modules/usage/how-to/openshift-example.md b/docs/modules/usage/how-to/openshift-example.mdindex 01776e1d27..e33e59eaa5 100644--- a/docs/modules/usage/how-to/openshift-example.md+++ b/docs/modules/usage/how-to/openshift-example.md@@ -6,6 +6,7 @@ There are different ways this can be accomplished. This guide goes through one p3. Create a pod which contains two containers; the OpenHands and Sandbox containers## Detailed Steps for the Example Above+> Note: Make sure you are logged in to the cluster first with the proper account for each step. PV creation requires cluster administrator!> Make sure you have read/write permissions on the hostPath used below (i.e. /tmp/workspace)diff --git a/docs/modules/usage/intro.mdx b/docs/modules/usage/intro.mdxindex 649dbd7479..307473e187 100644--- a/docs/modules/usage/intro.mdx+++ b/docs/modules/usage/intro.mdx@@ -57,6 +57,7 @@ Explore the codebase of OpenHands on [GitHub](https://github.com/All-Hands-AI/Op:::## π οΈ 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/All-Hands-AI/OpenHands?style=for-the-badgediff --git a/docs/modules/usage/llms/llms.md b/docs/modules/usage/llms/llms.mdindex e8c81f28b9..9c2ba0105b 100644--- a/docs/modules/usage/llms/llms.md+++ b/docs/modules/usage/llms/llms.md@@ -4,16 +4,29 @@ sidebar_position: 2# π€ LLM Backends-OpenHands can connect to many LLMs. However, the recommended models to use are GPT-4 and Claude 3.5.+OpenHands can connect to any LLM supported by LiteLLM. However, it requires a powerful model to work.+The following are verified by the community to work with OpenHands:+* claude-3-5-sonnet+* gemini-1.5-pro / gemini-1.5-flash+* gpt-4 / gpt-4o+* llama-3.1-405b / hermes-3-llama-3.1-405b+* wizardlm-2-8x22b++If you have successfully run OpenHands with specific LLMs not in the list, please add them to the verified list. We+also encourage you to open a PR to share your setup process to help others using the same provider and LLM!++For a full list of the providers and models available, please consult the+[litellm documentation](https://docs.litellm.ai/docs/providers).-Current local and open source models are not nearly as powerful. When using an alternative model, you may see long+## Local and Open Source Models+Most current local and open source models are not as powerful. When using such models, you may see longwait times between messages, poor responses, or errors about malformed JSON. OpenHands can only be as powerful as the-models driving it.-For a full list of the LM providers and models available, please consult the-[litellm documentation](https://docs.litellm.ai/docs/providers).+models driving it. However, if you do find ones that work, please add them to the verified list above.+## LLM Configuration:::warning-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.+OpenHands will issue many prompts to the LLM you configure. Most of these LLMs cost money, so be sure to set spending+limits and monitor usage.:::The `LLM_MODEL` environment variable controls which model is used in programmatic interactions.@@ -35,9 +48,7 @@ We have a few guides for running OpenHands with specific model providers:- [Azure](llms/azure-llms)- [Google](llms/google-llms)-If you're using another provider, we encourage you to open a PR to share your setup!--## API retries and rate limits+### API retries and rate limitsSome 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 the following environment variables to control the number of retries and the time between retries:diff --git a/docs/modules/usage/llms/local-llms.md b/docs/modules/usage/llms/local-llms.mdindex e2ddebf9fe..a43008c530 100644--- a/docs/modules/usage/llms/local-llms.md+++ b/docs/modules/usage/llms/local-llms.md@@ -1,5 +1,9 @@# Local LLM with Ollama+:::warning+When using a Local LLM, OpenHands may have limited functionality.+:::+Ensure that you have the Ollama server up and running.For detailed startup instructions, refer to [here](https://github.com/ollama/ollama)@@ -198,7 +202,7 @@ custom_llm_provider="openai"Done! Now you can start Devin by: `make run` without Docker. You now should be able to connect to `http://localhost:3000/`-# Note:+# NoteFor WSL, run the following commands in cmd to set up the networking mode to mirrored: