Files
OpenHands/opendevin/schema/action.py
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

84 lines
1.9 KiB
Python

from pydantic import BaseModel, Field
__all__ = [
'ActionType'
]
class ActionTypeSchema(BaseModel):
INIT: str = Field(default='initialize')
"""Initializes the agent. Only sent by client.
"""
START: str = Field(default='start')
"""Starts a new development task. Only sent by the client.
"""
READ: str = Field(default='read')
"""Reads the content of a file.
"""
WRITE: str = Field(default='write')
"""Writes the content to a file.
"""
RUN: str = Field(default='run')
"""Runs a command.
"""
KILL: str = Field(default='kill')
"""Kills a background command.
"""
BROWSE: str = Field(default='browse')
"""Opens a web page.
"""
RECALL: str = Field(default='recall')
"""Searches long-term memory
"""
THINK: str = Field(default='think')
"""Allows the agent to make a plan, set a goal, or record thoughts
"""
DELEGATE: str = Field(default='delegate')
"""Delegates a task to another agent.
"""
FINISH: str = Field(default='finish')
"""If you're absolutely certain that you've completed your task and have tested your work,
use the finish action to stop working.
"""
NULL: str = Field(default='null')
SUMMARIZE: str = Field(default='summarize')
ADD_TASK: str = Field(default='add_task')
MODIFY_TASK: str = Field(default='modify_task')
PAUSE: str = Field(default='pause')
"""Pauses the task.
"""
RESUME: str = Field(default='resume')
"""Resumes the task.
"""
STOP: str = Field(default='stop')
"""Stops the task. Must send a start action to restart a new task.
"""
CHANGE_TASK_STATE: str = Field(default='change_task_state')
PUSH: str = Field(default='push')
"""Push a branch to github."""
SEND_PR: str = Field(default='send_pr')
"""Send a PR to github."""
ActionType = ActionTypeSchema()