Add instructions to README.md (#129)

* Update README.md

* add WORKSPACE_DIR env var

* Update README.md

* Update session.py

---------

Co-authored-by: Robert Brennan <rbren@Roberts-MacBook-Pro.local>
This commit is contained in:
Robert Brennan
2024-03-24 23:35:12 -04:00
committed by GitHub
parent 335a91610e
commit d9c1bee2aa
2 changed files with 21 additions and 1 deletions

View File

@@ -9,6 +9,24 @@
## Mission 🎯
Welcome to OpenDevin, an open-source project aiming to replicate [Devin](https://www.cognition-labs.com/introducing-devin), an autonomous AI software engineer who is capable of executing complex engineering tasks and collaborating actively with users on software development projects. This project aspires to replicate, enhance, and innovate upon Devin through the power of the open-source community.
## Work in Progress
OpenDevin is still a work in progress. But you can run the current app to see things working end-to-end:
```bash
export OPENAI_API_KEY="..."
export WORKSPACE_DIR="/path/to/your/project"
python -m pip install -r requirements.txt
uvicorn opendevin.server.listen:app --port 3000
```
Then in a second terminal:
```bash
cd frontend
npm install
npm run start -- --port 3001
```
You'll see OpenDevin running at localhost:3001
## 🤔 What is [Devin](https://www.cognition-labs.com/introducing-devin)?

View File

@@ -8,6 +8,8 @@ from opendevin.agent import Agent
from opendevin.controller import AgentController
from opendevin.lib.event import Event
DEFAULT_WORKSPACE_DIR = os.getenv("WORKSPACE_DIR", os.getcwd())
def parse_event(data):
if "action" not in data:
return None
@@ -72,7 +74,7 @@ class Session:
print("Client websocket disconnected", e)
async def create_controller(self, start_event=None):
directory = os.getcwd()
directory = DEFAULT_WORKSPACE_DIR
if start_event and "directory" in start_event.args:
directory = start_event.args["directory"]
agent_cls = "LangchainsAgent"