16 Commits

Author SHA1 Message Date
Christian Balcom
24b71927c3
fix(backend) changes to improve Command-R+ behavior, plus file i/o error improvements, attempt 2 (#1417)
* Some improvements to prompts, some better exception handling for various file IO errors, added timeout and max return token configurations for the LLM api.

* More monologue prompt improvements

* Dynamically set username provided in prompt.

* Remove absolute paths from llm prompts, fetch working directory from sandbox when resolving paths in fileio operations, add customizable timeout for bash commands, mention said timeout in llm prompt.

* Switched ssh_box to disabling tty echo and removed the logic attempting to delete it from the response afterwards, fixed get_working_directory for ssh_box.

* Update prompts in integration tests to match monologue agent changes.

* Minor tweaks to make merge easier.

* Another minor prompt tweak, better invalid json handling.

* Fix lint error

* More catch-up to fix lint errors introduced by merge.

* Force WORKSPACE_MOUNT_PATH_IN_SANDBOX to match WORKSPACE_MOUNT_PATH in local sandbox mode, combine exception handlers in prompts.py.

---------

Co-authored-by: Jim Su <jimsu@protonmail.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2024-04-28 21:58:53 -04:00
Graham Neubig
a5f61caae9
Add actions for github push and send PR (#1415)
* Added a push action

* Tests

* Add tests

* Fix capitalization

* Update

* Fix typo

* Fix integration tests

* Added poetry.lock

* Set lock

* Fix action parsing

* Update integration test output

* Updated prompt

* Update integration test

* Add github token to default config

---------

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2024-04-29 00:56:23 +00:00
Graham Neubig
0d224de369
Fixed typo in integration tests README.md (#1438)
* Fixed typo in integration tests README.md

* Update tests/integration/README.md

---------

Co-authored-by: ThoughtfulRobot <robot@example.com>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2024-04-28 20:44:58 -04:00
Robert Brennan
9c9aee29f0
Revert "fix(backend) changes to improve Command-R+ behavior, plus file i/o er…" (#1405)
This reverts commit 44aea95ddee766dd25d20aa6eeab8759d383966f.
2024-04-27 08:57:04 -04:00
Christian Balcom
44aea95dde
fix(backend) changes to improve Command-R+ behavior, plus file i/o error improvements. (#1347)
* Some improvements to prompts, some better exception handling for various file IO errors, added timeout and max return token configurations for the LLM api.

* More monologue prompt improvements

* Dynamically set username provided in prompt.

* Remove absolute paths from llm prompts, fetch working directory from sandbox when resolving paths in fileio operations, add customizable timeout for bash commands, mention said timeout in llm prompt.

* Switched ssh_box to disabling tty echo and removed the logic attempting to delete it from the response afterwards, fixed get_working_directory for ssh_box.

* Update prompts in integration tests to match monologue agent changes.

* Minor tweaks to make merge easier.

* Another minor prompt tweak, better invalid json handling.

* Fix lint error

* More catch-up to fix lint errors introduced by merge.

---------

Co-authored-by: Jim Su <jimsu@protonmail.com>
Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-27 11:58:34 +00:00
Boxuan Li
831e934dab
Refactor: Use enum for config keys (#1376) 2024-04-26 10:26:01 -04:00
Boxuan Li
e7b5ddfe06
Add integration test framework with mock llm (#1301)
* Add integration test framework with mock llm

* Fix MonologueAgent and PlannerAgent tests

* Remove adhoc logging

* Use existing logs

* Fix SWEAgent and PlannerAgent

* Check-in test log files

* conftest: look up under test name folder only

* Add docstring to conftest

* Finish dev doc

* Avoid non-determinism

* Remove dependency on llm embedding model

* Init embedding model only for MonologueAgent

* Add adhoc fix for sandbox discrepancy

* Test ssh and exec sandboxes

* CI: fix missing sandbox type

* conftest: Remove hack

* Reword comment for TODO
2024-04-25 10:56:53 -04:00
Robert Brennan
1e95fa435d
Microagents and Delegation (#1238)
* basic microagent structure

* start on jinja

* add instructions parser

* add action instructions

* add history instructions

* fix a few issues

* fix a few issues

* fix issues

* fix agent encoding

* fix up anon class

* prompt to fix errors

* less debug info when errors happen

* add another traceback

* add output to finish

* fix math prompt

* fix pg prompt

* fix up json prompt

* fix math prompt

* fix math prompt

* fix repo prompt

* fix up repo explorer

* update lock

* revert changes to agent_controller

* refactor microagent registration a bit

* create delegate action

* delegation working

* add finish action to manager

* fix tests

* rename microagents registry

* rename fn

* logspam

* add metadata to manager agent

* fix message

* move repo_explorer

* add delegator agent

* rename agent_definition

* fix up input-output plumbing

* fix tests

* Update agenthub/micro/math_agent/agent.yaml

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>

* Update agenthub/delegator_agent/prompt.py

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>

* Update agenthub/delegator_agent/prompt.py

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>

* remove prompt.py

* fix lint

* Update agenthub/micro/postgres_agent/agent.yaml

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>

* Update agenthub/micro/postgres_agent/agent.yaml

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>

* fix error

---------

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
2024-04-24 17:46:14 -04:00
Christian Balcom
b48f440476
Add sanitization against malformed paths used in fileop actions. Added tests for resolve_path. (#1338) 2024-04-24 15:46:16 +00:00
Engel Nyst
39a851bd95
Message property sent to llm (#1273)
* Add to_memory for observations

* Don't send 'message' property to the llm from observation; fix other agents
2024-04-22 12:14:45 -04:00
Boxuan Li
cf3372a5fe
Fix arg parser help message display (#1247)
* Fix arg parser help message display

* Add unittest
2024-04-20 09:23:19 -04:00
Engel Nyst
caabfab7e2
Property 'message' sent to llm (#1198)
* Add action with content, no message, to history

* fix to_memory(), add it to serialization tests

* Actions without 'message' in completion too
2024-04-18 06:51:07 -04:00
Jack Quimby
16fc728696
feat: SWE Agent Implementation (#846)
* Merge branch 'main' of https://github.com/JayQuimby/OpenDevin

* Using commands.sh for ACI

* parsing, prompting, and actions modifications

* added start and end index to read and write

* bug fixes and test updates

* Lint code changes to ensure code is proper

* State management, bugs, prompts

* Prompt Engineering

* exception handling

* big fixes

* more bug fixes

* merge conflicts

* Renamed SWEAgent, basic tests, bug fixes

* prompt changes, bug fixes

* merge conflicts

* merge conflict

* start and end line for read and write

* more merge conflicts

* env error

* linter error

* read fixed, prompt change, example added

* added x_line:end read operation

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-17 12:19:00 -04:00
Anas DORBANI
d38113cead
Ad/fix pre commit (#807)
* Fix pre-commit config and some mypy issues

* remove hook of requirements.txt
2024-04-06 03:48:30 +00:00
geohotstan
1328f55dcd
Added tests for other action subclasses in test_action_serialization (#593)
* tests

* change some args

* use cls instead
2024-04-05 09:53:29 -05:00
Robert Brennan
effac868c1
Implement deserialization for actions and observations (#359)
* action deserializing

* add observation deserialization

* add tests

* refactor agents with serialization

* fix some errors

* fix lint

* fix json parser
2024-03-30 10:06:25 -04:00