diff --git a/404.html b/404.html index 1f442d6687..31fb9e89de 100644 --- a/404.html +++ b/404.html @@ -4,10 +4,10 @@ Page Not Found | OpenDevin - - + + -
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

\ No newline at end of file diff --git a/assets/images/backend_architecture-9c023feb6a761aa5104352c5713bc606.svg b/assets/images/backend_architecture-9c023feb6a761aa5104352c5713bc606.svg new file mode 100644 index 0000000000..744b49f2fd --- /dev/null +++ b/assets/images/backend_architecture-9c023feb6a761aa5104352c5713bc606.svg @@ -0,0 +1 @@ +opendevinactionagentbasebashbrowsefileoptasksobservationagentllm.llmcontrolleragent_controllercommand_managerplanstatesandbox.sandboxserver.sessionAgentEchoActioncontent: strrunnable: boolaction: strAgentFinishActionrunnable: boolaction: strAgentRecallActionquery: straction: strAgentSummarizeActionsummary: straction: strAgentThinkActionthought: strrunnable: boolaction: strExecutableActionNotExecutableActionActionNullActionaction: strCmdKillActionid: intaction: strCmdRunActioncommand: strbackground: boolaction: strBrowseURLActionurl: straction: strFileReadActionpath: straction: strFileWriteActionpath: strcontents: straction: strAddTaskActionparent: strgoal: strsubtasks: listaction: strModifyTaskActionid: strstate: straction: strAgentMessageObservationrole: strobservation: strAgentRecallObservationmemories: List[str]role: strobservation: strObservationcontent: strBrowserOutputObservationurl: strstatus_code: interror: boolobservation: strFileReadObservationpath: strobservation: strFileWriteObservationpath: strobservation: strAgentErrorObservationobservation: strNullObservationobservation: strCmdOutputObservationcommand_id: intcommand: strexit_code: intobservation: strUserMessageObservationrole: strobservation: strAgent_registry: Dict[str, Type[Agent]]llm: LLM_complete: NoneLLMmodel: Noneapi_key: Nonebase_url: None_debug_dir: None_debug_idx: None_debug_id: None_completion: NoneAgentControlleragent: Agentmax_iterations: intworkdir: strcommand_manager: CommandManagerstate: Stateplan: Plancallbacks: List[Callable]CommandManagerdirectory: Noneshell: NonePlanmain_goal: strtask: Taskmain_goal: strtask: NoneTaskid: strgoal: strparent: Task | Nonesubtasks: List[Task]id: Noneid: Noneparent: Nonegoal: strsubtasks: NoneStateplan: Planiteration: intbackground_commands_obs: List[CmdOutputObservation]history: List[Tuple[Action, Observation]]updated_info: List[Tuple[Action, Observation]]DockerInteractivebackground_commands: Dict[int, BackgroundCommand]instance_id: Noneinstance_id: Noneworkspace_dir: Noneworkspace_dir: Noneworkspace_dir: Nonetimeout: intcontainer_image: Nonecontainer_name: NoneBackgroundCommandSessionwebsocket: Nonecontroller: Optional[AgentController]agent: Optional[Agent]agent_task: NoneBased on f3fda42; Generated bypy2puml diff --git a/assets/images/system_architecture-f65c0a39005a377faaa0bf2ef7ca854f.svg b/assets/images/system_architecture-f65c0a39005a377faaa0bf2ef7ca854f.svg new file mode 100644 index 0000000000..d259a4ca3b --- /dev/null +++ b/assets/images/system_architecture-f65c0a39005a377faaa0bf2ef7ca854f.svg @@ -0,0 +1 @@ +frontendcomponentsservicesbackendserverAppsocketHTTP (:3001)TerminalChatInterfaceBannerSettingschatServicesettingsServiceServerClient WS(:3000/ws)AgentControllerconnects toVITE_TERMINAL_WS_URL diff --git a/assets/js/02934e1d.f2c4454c.js b/assets/js/02934e1d.f2c4454c.js deleted file mode 100644 index 1596ea33a2..0000000000 --- a/assets/js/02934e1d.f2c4454c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1991],{958:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>l,default:()=>o,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var t=n(4848),i=n(8453);const r={sidebar_label:"plan",title:"plan"},l=void 0,a={id:"python/plan",title:"plan",description:"Task Objects",source:"@site/docs/python/plan.md",sourceDirName:"python",slug:"/python/plan",permalink:"/OpenDevin/docs/python/plan",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"plan",title:"plan"}},d={},c=[{value:"Task Objects",id:"task-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"to_string",id:"to_string",level:4},{value:"to_dict",id:"to_dict",level:4},{value:"set_state",id:"set_state",level:4},{value:"get_current_task",id:"get_current_task",level:4},{value:"Plan Objects",id:"plan-objects",level:2},{value:"__init__",id:"__init__-1",level:4},{value:"__str__",id:"__str__",level:4},{value:"get_task_by_id",id:"get_task_by_id",level:4},{value:"add_subtask",id:"add_subtask",level:4},{value:"set_subtask_state",id:"set_subtask_state",level:4},{value:"get_current_task",id:"get_current_task-1",level:4}];function h(e){const s={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h2,{id:"task-objects",children:"Task Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"class Task()\n"})}),"\n",(0,t.jsx)(s.h4,{id:"__init__",children:"__init__"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def __init__(parent: 'Task | None',\n goal: str,\n state: str = OPEN_STATE,\n subtasks: List = [])\n"})}),"\n",(0,t.jsx)(s.p,{children:"Initializes a new instance of the Task class."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"parent"})," - The parent task, or None if it is the root task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"goal"})," - The goal of the task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"state"})," - The initial state of the task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"subtasks"})," - A list of subtasks associated with this task."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"to_string",children:"to_string"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def to_string(indent='')\n"})}),"\n",(0,t.jsx)(s.p,{children:"Returns a string representation of the task and its subtasks."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"indent"})," - The indentation string for formatting the output."]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"A string representation of the task and its subtasks."}),"\n",(0,t.jsx)(s.h4,{id:"to_dict",children:"to_dict"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def to_dict()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Returns a dictionary representation of the task."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"A dictionary containing the task's attributes."}),"\n",(0,t.jsx)(s.h4,{id:"set_state",children:"set_state"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def set_state(state)\n"})}),"\n",(0,t.jsx)(s.p,{children:"Sets the state of the task and its subtasks."}),"\n",(0,t.jsx)(s.p,{children:"Args: state: The new state of the task."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"PlanInvalidStateError"})," - If the provided state is invalid."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"get_current_task",children:"get_current_task"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def get_current_task() -> 'Task | None'\n"})}),"\n",(0,t.jsx)(s.p,{children:"Retrieves the current task in progress."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"The current task in progress, or None if no task is in progress."}),"\n",(0,t.jsx)(s.h2,{id:"plan-objects",children:"Plan Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"class Plan()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Represents a plan consisting of tasks."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Attributes"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"main_goal"})," - The main goal of the plan."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"task"})," - The root task of the plan."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"__init__-1",children:"__init__"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def __init__(task: str)\n"})}),"\n",(0,t.jsx)(s.p,{children:"Initializes a new instance of the Plan class."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"task"})," - The main goal of the plan."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"__str__",children:"__str__"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def __str__()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Returns a string representation of the plan."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"A string representation of the plan."}),"\n",(0,t.jsx)(s.h4,{id:"get_task_by_id",children:"get_task_by_id"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def get_task_by_id(id: str) -> Task\n"})}),"\n",(0,t.jsx)(s.p,{children:"Retrieves a task by its ID."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"id"})," - The ID of the task."]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"The task with the specified ID."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"ValueError"})," - If the provided task ID is invalid or does not exist."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"add_subtask",children:"add_subtask"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def add_subtask(parent_id: str, goal: str, subtasks: List = [])\n"})}),"\n",(0,t.jsx)(s.p,{children:"Adds a subtask to a parent task."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"parent_id"})," - The ID of the parent task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"goal"})," - The goal of the subtask."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"subtasks"})," - A list of subtasks associated with the new subtask."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"set_subtask_state",children:"set_subtask_state"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def set_subtask_state(id: str, state: str)\n"})}),"\n",(0,t.jsx)(s.p,{children:"Sets the state of a subtask."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"id"})," - The ID of the subtask."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"state"})," - The new state of the subtask."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"get_current_task-1",children:"get_current_task"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def get_current_task()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Retrieves the current task in progress."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"The current task in progress, or None if no task is in progress."})]})}function o(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>l,x:()=>a});var t=n(6540);const i={},r=t.createContext(i);function l(e){const s=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),t.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/029c8ca3.d2cd2233.js b/assets/js/029c8ca3.d2cd2233.js new file mode 100644 index 0000000000..e9aac099fb --- /dev/null +++ b/assets/js/029c8ca3.d2cd2233.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7518],{1495:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>c,frontMatter:()=>r,metadata:()=>l,toc:()=>p});var s=t(4848),o=t(8453);const r={sidebar_label:"prompts",title:"agenthub.monologue_agent.utils.prompts"},i=void 0,l={id:"python/agenthub/monologue_agent/utils/prompts",title:"agenthub.monologue_agent.utils.prompts",description:"get\\summarize\\monologue\\_prompt",source:"@site/modules/python/agenthub/monologue_agent/utils/prompts.md",sourceDirName:"python/agenthub/monologue_agent/utils",slug:"/python/agenthub/monologue_agent/utils/prompts",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/prompts",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"prompts",title:"agenthub.monologue_agent.utils.prompts"},sidebar:"apiSidebar",previous:{title:"monologue",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/monologue"},next:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/agent"}},a={},p=[{value:"get_summarize_monologue_prompt",id:"get_summarize_monologue_prompt",level:4},{value:"get_request_action_prompt",id:"get_request_action_prompt",level:4},{value:"parse_action_response",id:"parse_action_response",level:4},{value:"parse_summary_response",id:"parse_summary_response",level:4}];function u(e){const n={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h4,{id:"get_summarize_monologue_prompt",children:"get_summarize_monologue_prompt"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def get_summarize_monologue_prompt(thoughts: List[dict])\n"})}),"\n",(0,s.jsx)(n.p,{children:"Gets the prompt for summarizing the monologue"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"str: A formatted string with the current monologue within the prompt"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"get_request_action_prompt",children:"get_request_action_prompt"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def get_request_action_prompt(\n task: str,\n thoughts: List[dict],\n background_commands_obs: List[CmdOutputObservation] = [])\n"})}),"\n",(0,s.jsx)(n.p,{children:"Gets the action prompt formatted with appropriate values."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"task (str): The current task the agent is trying to accomplish"}),"\n",(0,s.jsx)(n.li,{children:"thoughts (List[dict]): The agent's current thoughts"}),"\n",(0,s.jsx)(n.li,{children:"background_commands_obs (List[CmdOutputObservation]): List of all observed background commands running"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"str: Formatted prompt string with hint, task, monologue, and background included"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"parse_action_response",children:"parse_action_response"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def parse_action_response(response: str) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Parses a string to find an action within it"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"response (str): The string to be parsed"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Action: The action that was found in the response string"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"parse_summary_response",children:"parse_summary_response"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def parse_summary_response(response: str) -> List[dict]\n"})}),"\n",(0,s.jsx)(n.p,{children:"Parses a summary of the monologue"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"response (str): The response string to be parsed"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"List[dict]: The list of summaries output by the model"}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var s=t(6540);const o={},r=s.createContext(o);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/03b14be2.4db8ea7d.js b/assets/js/03b14be2.4db8ea7d.js deleted file mode 100644 index af50e9a2bf..0000000000 --- a/assets/js/03b14be2.4db8ea7d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[620],{5323:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>r,contentTitle:()=>a,default:()=>d,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var o=n(4848),c=n(8453);const s={sidebar_label:"base",title:"action.base"},a=void 0,i={id:"python/action/base",title:"action.base",description:"NullAction Objects",source:"@site/docs/python/action/base.md",sourceDirName:"python/action",slug:"/python/action/base",permalink:"/OpenDevin/docs/python/action/base",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"base",title:"action.base"}},r={},l=[{value:"NullAction Objects",id:"nullaction-objects",level:2}];function u(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",...(0,c.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"nullaction-objects",children:"NullAction Objects"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-python",children:"@dataclass\nclass NullAction(NotExecutableAction)\n"})}),"\n",(0,o.jsx)(e.p,{children:"An action that does nothing."})]})}function d(t={}){const{wrapper:e}={...(0,c.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(u,{...t})}):u(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>a,x:()=>i});var o=n(6540);const c={},s=o.createContext(c);function a(t){const e=o.useContext(s);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function i(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(c):t.components||c:a(t.components),o.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/04180c42.80007832.js b/assets/js/04180c42.80007832.js new file mode 100644 index 0000000000..a7490f7009 --- /dev/null +++ b/assets/js/04180c42.80007832.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7445],{7248:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>t,contentTitle:()=>o,default:()=>a,frontMatter:()=>s,metadata:()=>d,toc:()=>c});var i=l(4848),r=l(8453);const s={sidebar_label:"logger",title:"opendevin.logger"},o=void 0,d={id:"python/opendevin/logger",title:"opendevin.logger",description:"get\\console\\handler",source:"@site/modules/python/opendevin/logger.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/logger",permalink:"/OpenDevin/modules/python/opendevin/logger",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"logger",title:"opendevin.logger"},sidebar:"apiSidebar",previous:{title:"files",permalink:"/OpenDevin/modules/python/opendevin/files"},next:{title:"main",permalink:"/OpenDevin/modules/python/opendevin/main"}},t={},c=[{value:"get_console_handler",id:"get_console_handler",level:4},{value:"get_file_handler",id:"get_file_handler",level:4},{value:"log_uncaught_exceptions",id:"log_uncaught_exceptions",level:4},{value:"LlmFileHandler Objects",id:"llmfilehandler-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"emit",id:"emit",level:4},{value:"get_llm_prompt_file_handler",id:"get_llm_prompt_file_handler",level:4},{value:"get_llm_response_file_handler",id:"get_llm_response_file_handler",level:4}];function h(e){const n={code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h4,{id:"get_console_handler",children:"get_console_handler"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_console_handler()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Returns a console handler for logging."}),"\n",(0,i.jsx)(n.h4,{id:"get_file_handler",children:"get_file_handler"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_file_handler()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Returns a file handler for logging."}),"\n",(0,i.jsx)(n.h4,{id:"log_uncaught_exceptions",children:"log_uncaught_exceptions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def log_uncaught_exceptions(ex_cls, ex, tb)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Logs uncaught exceptions along with the traceback."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ex_cls"})," ",(0,i.jsx)(n.em,{children:"type"})," - The type of the exception."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ex"})," ",(0,i.jsx)(n.em,{children:"Exception"})," - The exception instance."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"tb"})," ",(0,i.jsx)(n.em,{children:"traceback"})," - The traceback object."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"}),"\n",(0,i.jsx)(n.h2,{id:"llmfilehandler-objects",children:"LlmFileHandler Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class LlmFileHandler(logging.FileHandler)\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"LLM prompt and response logging"})}),"\n",(0,i.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(filename, mode='a', encoding='utf-8', delay=False)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initializes an instance of LlmFileHandler."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"filename"})," ",(0,i.jsx)(n.em,{children:"str"})," - The name of the log file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"mode"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - The file mode. Defaults to 'a'."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"encoding"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - The file encoding. Defaults to None."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"delay"})," ",(0,i.jsx)(n.em,{children:"bool, optional"})," - Whether to delay file opening. Defaults to False."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"emit",children:"emit"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def emit(record)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Emits a log record."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"record"})," ",(0,i.jsx)(n.em,{children:"logging.LogRecord"})," - The log record to emit."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_llm_prompt_file_handler",children:"get_llm_prompt_file_handler"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_llm_prompt_file_handler()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Returns a file handler for LLM prompt logging."}),"\n",(0,i.jsx)(n.h4,{id:"get_llm_response_file_handler",children:"get_llm_response_file_handler"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_llm_response_file_handler()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Returns a file handler for LLM response logging."})]})}function a(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,n,l)=>{l.d(n,{R:()=>o,x:()=>d});var i=l(6540);const r={},s=i.createContext(r);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/08602ca5.0b489476.js b/assets/js/08602ca5.0b489476.js deleted file mode 100644 index 57225ea06b..0000000000 --- a/assets/js/08602ca5.0b489476.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3710],{330:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>s,default:()=>a,frontMatter:()=>r,metadata:()=>u,toc:()=>c});var i=t(4848),o=t(8453);const r={sidebar_label:"requirement",title:"opendevin.sandbox.plugins.requirement"},s=void 0,u={id:"python/opendevin/sandbox/plugins/requirement",title:"opendevin.sandbox.plugins.requirement",description:"PluginRequirement Objects",source:"@site/docs/python/opendevin/sandbox/plugins/requirement.md",sourceDirName:"python/opendevin/sandbox/plugins",slug:"/python/opendevin/sandbox/plugins/requirement",permalink:"/OpenDevin/docs/python/opendevin/sandbox/plugins/requirement",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"requirement",title:"opendevin.sandbox.plugins.requirement"},sidebar:"apiSidebar",previous:{title:"mixin",permalink:"/OpenDevin/docs/python/opendevin/sandbox/plugins/mixin"},next:{title:"action",permalink:"/OpenDevin/docs/python/opendevin/schema/action"}},p={},c=[{value:"PluginRequirement Objects",id:"pluginrequirement-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"pluginrequirement-objects",children:"PluginRequirement Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass PluginRequirement()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Requirement for a plugin."})]})}function a(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>u});var i=t(6540);const o={},r=i.createContext(o);function s(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function u(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/09f77e47.f66976a0.js b/assets/js/09f77e47.f66976a0.js new file mode 100644 index 0000000000..6e86edd031 --- /dev/null +++ b/assets/js/09f77e47.f66976a0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3396],{7729:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>l,toc:()=>c});var o=t(4848),r=t(8453);const s={sidebar_label:"memory",title:"agenthub.monologue_agent.utils.memory"},i=void 0,l={id:"python/agenthub/monologue_agent/utils/memory",title:"agenthub.monologue_agent.utils.memory",description:"LongTermMemory Objects",source:"@site/modules/python/agenthub/monologue_agent/utils/memory.md",sourceDirName:"python/agenthub/monologue_agent/utils",slug:"/python/agenthub/monologue_agent/utils/memory",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/memory",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"memory",title:"agenthub.monologue_agent.utils.memory"},sidebar:"apiSidebar",previous:{title:"json",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/json"},next:{title:"monologue",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/monologue"}},a={},c=[{value:"LongTermMemory Objects",id:"longtermmemory-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"add_event",id:"add_event",level:4},{value:"search",id:"search",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"longtermmemory-objects",children:"LongTermMemory Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class LongTermMemory()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Responsible for storing information that the agent can call on later for better insights and context.\nUses chromadb to store and search through memories."}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initialize the chromadb and set up ChromaVectorStore for later use."}),"\n",(0,o.jsx)(n.h4,{id:"add_event",children:"add_event"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def add_event(event: dict)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Adds a new event to the long term memory with a unique id."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"event (dict): The new event to be added to memory"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"search",children:"search"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def search(query: str, k: int = 10)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Searches through the current memory using VectorIndexRetriever"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"query (str): A query to match search results to"}),"\n",(0,o.jsx)(n.li,{children:"k (int): Number of top results to return"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"List[str]: List of top k results found in current memory"}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var o=t(6540);const r={},s=o.createContext(r);function i(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0a038435.d78be3b7.js b/assets/js/0a038435.d78be3b7.js deleted file mode 100644 index 8dc55ae304..0000000000 --- a/assets/js/0a038435.d78be3b7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9445],{5135:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>l,default:()=>o,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var t=n(4848),i=n(8453);const r={sidebar_label:"plan",title:"opendevin.plan"},l=void 0,a={id:"python/opendevin/plan",title:"opendevin.plan",description:"Task Objects",source:"@site/docs/python/opendevin/plan.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/plan",permalink:"/OpenDevin/docs/python/opendevin/plan",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"plan",title:"opendevin.plan"},sidebar:"apiSidebar",previous:{title:"main",permalink:"/OpenDevin/docs/python/opendevin/main"}},d={},c=[{value:"Task Objects",id:"task-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"to_string",id:"to_string",level:4},{value:"to_dict",id:"to_dict",level:4},{value:"set_state",id:"set_state",level:4},{value:"get_current_task",id:"get_current_task",level:4},{value:"Plan Objects",id:"plan-objects",level:2},{value:"__init__",id:"__init__-1",level:4},{value:"__str__",id:"__str__",level:4},{value:"get_task_by_id",id:"get_task_by_id",level:4},{value:"add_subtask",id:"add_subtask",level:4},{value:"set_subtask_state",id:"set_subtask_state",level:4},{value:"get_current_task",id:"get_current_task-1",level:4}];function h(e){const s={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h2,{id:"task-objects",children:"Task Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"class Task()\n"})}),"\n",(0,t.jsx)(s.h4,{id:"__init__",children:"__init__"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def __init__(parent: 'Task | None',\n goal: str,\n state: str = OPEN_STATE,\n subtasks: List = [])\n"})}),"\n",(0,t.jsx)(s.p,{children:"Initializes a new instance of the Task class."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"parent"})," - The parent task, or None if it is the root task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"goal"})," - The goal of the task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"state"})," - The initial state of the task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"subtasks"})," - A list of subtasks associated with this task."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"to_string",children:"to_string"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def to_string(indent='')\n"})}),"\n",(0,t.jsx)(s.p,{children:"Returns a string representation of the task and its subtasks."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"indent"})," - The indentation string for formatting the output."]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"A string representation of the task and its subtasks."}),"\n",(0,t.jsx)(s.h4,{id:"to_dict",children:"to_dict"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def to_dict()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Returns a dictionary representation of the task."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"A dictionary containing the task's attributes."}),"\n",(0,t.jsx)(s.h4,{id:"set_state",children:"set_state"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def set_state(state)\n"})}),"\n",(0,t.jsx)(s.p,{children:"Sets the state of the task and its subtasks."}),"\n",(0,t.jsx)(s.p,{children:"Args: state: The new state of the task."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"PlanInvalidStateError"})," - If the provided state is invalid."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"get_current_task",children:"get_current_task"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def get_current_task() -> 'Task | None'\n"})}),"\n",(0,t.jsx)(s.p,{children:"Retrieves the current task in progress."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"The current task in progress, or None if no task is in progress."}),"\n",(0,t.jsx)(s.h2,{id:"plan-objects",children:"Plan Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"class Plan()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Represents a plan consisting of tasks."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Attributes"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"main_goal"})," - The main goal of the plan."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"task"})," - The root task of the plan."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"__init__-1",children:"__init__"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def __init__(task: str)\n"})}),"\n",(0,t.jsx)(s.p,{children:"Initializes a new instance of the Plan class."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"task"})," - The main goal of the plan."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"__str__",children:"__str__"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def __str__()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Returns a string representation of the plan."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"A string representation of the plan."}),"\n",(0,t.jsx)(s.h4,{id:"get_task_by_id",children:"get_task_by_id"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def get_task_by_id(id: str) -> Task\n"})}),"\n",(0,t.jsx)(s.p,{children:"Retrieves a task by its ID."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"id"})," - The ID of the task."]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"The task with the specified ID."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"ValueError"})," - If the provided task ID is invalid or does not exist."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"add_subtask",children:"add_subtask"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def add_subtask(parent_id: str, goal: str, subtasks: List = [])\n"})}),"\n",(0,t.jsx)(s.p,{children:"Adds a subtask to a parent task."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"parent_id"})," - The ID of the parent task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"goal"})," - The goal of the subtask."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"subtasks"})," - A list of subtasks associated with the new subtask."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"set_subtask_state",children:"set_subtask_state"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def set_subtask_state(id: str, state: str)\n"})}),"\n",(0,t.jsx)(s.p,{children:"Sets the state of a subtask."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"id"})," - The ID of the subtask."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"state"})," - The new state of the subtask."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"get_current_task-1",children:"get_current_task"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def get_current_task()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Retrieves the current task in progress."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"The current task in progress, or None if no task is in progress."})]})}function o(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>l,x:()=>a});var t=n(6540);const i={},r=t.createContext(i);function l(e){const s=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),t.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0a5eb39d.a7edba40.js b/assets/js/0a5eb39d.a7edba40.js new file mode 100644 index 0000000000..e63e8aaaba --- /dev/null +++ b/assets/js/0a5eb39d.a7edba40.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4302],{1106:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>l});var o=t(4848),s=t(8453);const a={sidebar_label:"observation",title:"opendevin.schema.observation"},i=void 0,r={id:"python/opendevin/schema/observation",title:"opendevin.schema.observation",description:"ObservationTypeSchema Objects",source:"@site/modules/python/opendevin/schema/observation.md",sourceDirName:"python/opendevin/schema",slug:"/python/opendevin/schema/observation",permalink:"/OpenDevin/modules/python/opendevin/schema/observation",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"observation",title:"opendevin.schema.observation"},sidebar:"apiSidebar",previous:{title:"action",permalink:"/OpenDevin/modules/python/opendevin/schema/action"},next:{title:"task",permalink:"/OpenDevin/modules/python/opendevin/schema/task"}},c={},l=[{value:"ObservationTypeSchema Objects",id:"observationtypeschema-objects",level:2},{value:"READ",id:"read",level:4},{value:"BROWSE",id:"browse",level:4},{value:"RUN",id:"run",level:4},{value:"RECALL",id:"recall",level:4},{value:"CHAT",id:"chat",level:4},{value:"DELEGATE",id:"delegate",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"observationtypeschema-objects",children:"ObservationTypeSchema Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class ObservationTypeSchema(BaseModel)\n"})}),"\n",(0,o.jsx)(n.h4,{id:"read",children:"READ"}),"\n",(0,o.jsx)(n.p,{children:"The content of a file"}),"\n",(0,o.jsx)(n.h4,{id:"browse",children:"BROWSE"}),"\n",(0,o.jsx)(n.p,{children:"The HTML content of a URL"}),"\n",(0,o.jsx)(n.h4,{id:"run",children:"RUN"}),"\n",(0,o.jsx)(n.p,{children:"The output of a command"}),"\n",(0,o.jsx)(n.h4,{id:"recall",children:"RECALL"}),"\n",(0,o.jsx)(n.p,{children:"The result of a search"}),"\n",(0,o.jsx)(n.h4,{id:"chat",children:"CHAT"}),"\n",(0,o.jsx)(n.p,{children:"A message from the user"}),"\n",(0,o.jsx)(n.h4,{id:"delegate",children:"DELEGATE"}),"\n",(0,o.jsx)(n.p,{children:"The result of a task delegated to another agent"})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>r});var o=t(6540);const s={},a=o.createContext(s);function i(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0af59dc2.9fb1b635.js b/assets/js/0af59dc2.9fb1b635.js deleted file mode 100644 index 44067c83cd..0000000000 --- a/assets/js/0af59dc2.9fb1b635.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3741],{9176:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>t,contentTitle:()=>o,default:()=>a,frontMatter:()=>s,metadata:()=>d,toc:()=>c});var i=l(4848),r=l(8453);const s={sidebar_label:"logger",title:"opendevin.logger"},o=void 0,d={id:"python/opendevin/logger",title:"opendevin.logger",description:"get\\console\\handler",source:"@site/docs/python/opendevin/logger.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/logger",permalink:"/OpenDevin/docs/python/opendevin/logger",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"logger",title:"opendevin.logger"},sidebar:"apiSidebar",previous:{title:"files",permalink:"/OpenDevin/docs/python/opendevin/files"},next:{title:"main",permalink:"/OpenDevin/docs/python/opendevin/main"}},t={},c=[{value:"get_console_handler",id:"get_console_handler",level:4},{value:"get_file_handler",id:"get_file_handler",level:4},{value:"log_uncaught_exceptions",id:"log_uncaught_exceptions",level:4},{value:"LlmFileHandler Objects",id:"llmfilehandler-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"emit",id:"emit",level:4},{value:"get_llm_prompt_file_handler",id:"get_llm_prompt_file_handler",level:4},{value:"get_llm_response_file_handler",id:"get_llm_response_file_handler",level:4}];function h(e){const n={code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h4,{id:"get_console_handler",children:"get_console_handler"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_console_handler()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Returns a console handler for logging."}),"\n",(0,i.jsx)(n.h4,{id:"get_file_handler",children:"get_file_handler"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_file_handler()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Returns a file handler for logging."}),"\n",(0,i.jsx)(n.h4,{id:"log_uncaught_exceptions",children:"log_uncaught_exceptions"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def log_uncaught_exceptions(ex_cls, ex, tb)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Logs uncaught exceptions along with the traceback."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ex_cls"})," ",(0,i.jsx)(n.em,{children:"type"})," - The type of the exception."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ex"})," ",(0,i.jsx)(n.em,{children:"Exception"})," - The exception instance."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"tb"})," ",(0,i.jsx)(n.em,{children:"traceback"})," - The traceback object."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,i.jsx)(n.p,{children:"None"}),"\n",(0,i.jsx)(n.h2,{id:"llmfilehandler-objects",children:"LlmFileHandler Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class LlmFileHandler(logging.FileHandler)\n"})}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.strong,{children:"LLM prompt and response logging"})}),"\n",(0,i.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(filename, mode='a', encoding='utf-8', delay=False)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Initializes an instance of LlmFileHandler."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"filename"})," ",(0,i.jsx)(n.em,{children:"str"})," - The name of the log file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"mode"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - The file mode. Defaults to 'a'."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"encoding"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - The file encoding. Defaults to None."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"delay"})," ",(0,i.jsx)(n.em,{children:"bool, optional"})," - Whether to delay file opening. Defaults to False."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"emit",children:"emit"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def emit(record)\n"})}),"\n",(0,i.jsx)(n.p,{children:"Emits a log record."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"record"})," ",(0,i.jsx)(n.em,{children:"logging.LogRecord"})," - The log record to emit."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"get_llm_prompt_file_handler",children:"get_llm_prompt_file_handler"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_llm_prompt_file_handler()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Returns a file handler for LLM prompt logging."}),"\n",(0,i.jsx)(n.h4,{id:"get_llm_response_file_handler",children:"get_llm_response_file_handler"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def get_llm_response_file_handler()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Returns a file handler for LLM response logging."})]})}function a(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,n,l)=>{l.d(n,{R:()=>o,x:()=>d});var i=l(6540);const r={},s=i.createContext(r);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/129b4986.1b4112a8.js b/assets/js/129b4986.1b4112a8.js deleted file mode 100644 index 1728af73ca..0000000000 --- a/assets/js/129b4986.1b4112a8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3560],{3700:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var s=t(4848),o=t(8453);const i={sidebar_label:"files",title:"opendevin.observation.files"},r=void 0,a={id:"python/opendevin/observation/files",title:"opendevin.observation.files",description:"FileReadObservation Objects",source:"@site/docs/python/opendevin/observation/files.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/files",permalink:"/OpenDevin/docs/python/opendevin/observation/files",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"files",title:"opendevin.observation.files"},sidebar:"apiSidebar",previous:{title:"error",permalink:"/OpenDevin/docs/python/opendevin/observation/error"},next:{title:"message",permalink:"/OpenDevin/docs/python/opendevin/observation/message"}},l={},c=[{value:"FileReadObservation Objects",id:"filereadobservation-objects",level:2},{value:"FileWriteObservation Objects",id:"filewriteobservation-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"filereadobservation-objects",children:"FileReadObservation Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass FileReadObservation(Observation)\n"})}),"\n",(0,s.jsx)(n.p,{children:"This data class represents the content of a file."}),"\n",(0,s.jsx)(n.h2,{id:"filewriteobservation-objects",children:"FileWriteObservation Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass FileWriteObservation(Observation)\n"})}),"\n",(0,s.jsx)(n.p,{children:"This data class represents a file write operation"})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var s=t(6540);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/149d2c0b.7e1e0f23.js b/assets/js/149d2c0b.7e1e0f23.js deleted file mode 100644 index d9c3c7cf79..0000000000 --- a/assets/js/149d2c0b.7e1e0f23.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[276],{4927:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var t=s(4848),r=s(8453);const a={sidebar_label:"agent",title:"opendevin.server.agent.agent"},i=void 0,l={id:"python/opendevin/server/agent/agent",title:"opendevin.server.agent.agent",description:"AgentUnit Objects",source:"@site/docs/python/opendevin/server/agent/agent.md",sourceDirName:"python/opendevin/server/agent",slug:"/python/opendevin/server/agent/",permalink:"/OpenDevin/docs/python/opendevin/server/agent/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"opendevin.server.agent.agent"},sidebar:"apiSidebar",previous:{title:"task",permalink:"/OpenDevin/docs/python/opendevin/schema/task"},next:{title:"manager",permalink:"/OpenDevin/docs/python/opendevin/server/agent/manager"}},d={},c=[{value:"AgentUnit Objects",id:"agentunit-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"send_error",id:"send_error",level:4},{value:"send_message",id:"send_message",level:4},{value:"send",id:"send",level:4},{value:"dispatch",id:"dispatch",level:4},{value:"get_arg_or_default",id:"get_arg_or_default",level:4},{value:"create_controller",id:"create_controller",level:4},{value:"start_task",id:"start_task",level:4},{value:"set_task_state",id:"set_task_state",level:4},{value:"on_agent_event",id:"on_agent_event",level:4}];function o(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"agentunit-objects",children:"AgentUnit Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class AgentUnit()\n"})}),"\n",(0,t.jsx)(n.p,{children:"Represents a session with an agent."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Attributes"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"controller"})," - The AgentController instance for controlling the agent."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"agent_task"})," - The task representing the agent's execution."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def __init__(sid)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Initializes a new instance of the Session class."}),"\n",(0,t.jsx)(n.h4,{id:"send_error",children:"send_error"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def send_error(message)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sends an error message to the client."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"message"})," - The error message to send."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"send_message",children:"send_message"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def send_message(message)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sends a message to the client."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"message"})," - The message to send."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"send",children:"send"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def send(data)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sends data to the client."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"data"})," - The data to send."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"dispatch",children:"dispatch"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def dispatch(action: str | None, data: dict)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Dispatches actions to the agent from the client."}),"\n",(0,t.jsx)(n.h4,{id:"get_arg_or_default",children:"get_arg_or_default"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def get_arg_or_default(_args: dict, key: ConfigType) -> str\n"})}),"\n",(0,t.jsx)(n.p,{children:"Gets an argument from the args dictionary or the default value."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_args"})," - The args dictionary."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"key"})," - The key to get."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(n.p,{children:"The value of the key or the default value."}),"\n",(0,t.jsx)(n.h4,{id:"create_controller",children:"create_controller"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def create_controller(start_event: dict)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Creates an AgentController instance."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"start_event"})," - The start event data (optional)."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"start_task",children:"start_task"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def start_task(start_event)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Starts a task for the agent."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"start_event"})," - The start event data."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"set_task_state",children:"set_task_state"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def set_task_state(new_state_action: TaskStateAction)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sets the state of the agent task."}),"\n",(0,t.jsx)(n.h4,{id:"on_agent_event",children:"on_agent_event"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def on_agent_event(event: Observation | Action)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Callback function for agent events."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"event"})," - The agent event (Observation or Action)."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>l});var t=s(6540);const r={},a=t.createContext(r);function i(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/17d20590.a9ef3538.js b/assets/js/17d20590.a9ef3538.js new file mode 100644 index 0000000000..a0872935ea --- /dev/null +++ b/assets/js/17d20590.a9ef3538.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4435],{3596:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>r,contentTitle:()=>l,default:()=>a,frontMatter:()=>o,metadata:()=>p,toc:()=>d});var t=i(4848),s=i(8453);const o={sidebar_label:"mixin",title:"opendevin.sandbox.plugins.mixin"},l=void 0,p={id:"python/opendevin/sandbox/plugins/mixin",title:"opendevin.sandbox.plugins.mixin",description:"PluginMixin Objects",source:"@site/modules/python/opendevin/sandbox/plugins/mixin.md",sourceDirName:"python/opendevin/sandbox/plugins",slug:"/python/opendevin/sandbox/plugins/mixin",permalink:"/OpenDevin/modules/python/opendevin/sandbox/plugins/mixin",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"mixin",title:"opendevin.sandbox.plugins.mixin"},sidebar:"apiSidebar",previous:{title:"jupyter",permalink:"/OpenDevin/modules/python/opendevin/sandbox/plugins/jupyter/__init__"},next:{title:"requirement",permalink:"/OpenDevin/modules/python/opendevin/sandbox/plugins/requirement"}},r={},d=[{value:"PluginMixin Objects",id:"pluginmixin-objects",level:2},{value:"init_plugins",id:"init_plugins",level:4}];function u(n){const e={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.h2,{id:"pluginmixin-objects",children:"PluginMixin Objects"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-python",children:"class PluginMixin()\n"})}),"\n",(0,t.jsx)(e.p,{children:"Mixin for Sandbox to support plugins."}),"\n",(0,t.jsx)(e.h4,{id:"init_plugins",children:"init_plugins"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-python",children:"def init_plugins(requirements: List[PluginRequirement])\n"})}),"\n",(0,t.jsx)(e.p,{children:"Load a plugin into the sandbox."})]})}function a(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(u,{...n})}):u(n)}},8453:(n,e,i)=>{i.d(e,{R:()=>l,x:()=>p});var t=i(6540);const s={},o=t.createContext(s);function l(n){const e=t.useContext(o);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function p(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:l(n.components),t.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/19826e21.1929c041.js b/assets/js/19826e21.1929c041.js deleted file mode 100644 index 6528077cde..0000000000 --- a/assets/js/19826e21.1929c041.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9867],{729:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>a,contentTitle:()=>i,default:()=>l,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var t=n(4848),o=n(8453);const r={sidebar_label:"msg_stack",title:"opendevin.server.session.msg_stack"},i=void 0,c={id:"python/opendevin/server/session/msg_stack",title:"opendevin.server.session.msg_stack",description:"Message Objects",source:"@site/docs/python/opendevin/server/session/msg_stack.md",sourceDirName:"python/opendevin/server/session",slug:"/python/opendevin/server/session/msg_stack",permalink:"/OpenDevin/docs/python/opendevin/server/session/msg_stack",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"msg_stack",title:"opendevin.server.session.msg_stack"},sidebar:"apiSidebar",previous:{title:"manager",permalink:"/OpenDevin/docs/python/opendevin/server/session/manager"},next:{title:"session",permalink:"/OpenDevin/docs/python/opendevin/server/session/"}},a={},d=[{value:"Message Objects",id:"message-objects",level:2},{value:"role",id:"role",level:4}];function p(e){const s={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h2,{id:"message-objects",children:"Message Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"class Message()\n"})}),"\n",(0,t.jsx)(s.h4,{id:"role",children:"role"}),"\n",(0,t.jsx)(s.p,{children:'"user"| "assistant"'})]})}function l(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>c});var t=n(6540);const o={},r=t.createContext(o);function i(e){const s=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1df93b7f.8b36893e.js b/assets/js/1df93b7f.8b36893e.js deleted file mode 100644 index cd04eedc83..0000000000 --- a/assets/js/1df93b7f.8b36893e.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4583],{1014:(e,n,t)=>{"use strict";t.r(n),t.d(n,{Header:()=>A,default:()=>k});var o=t(4586),r=t(781),a=t(8774),s=t(5293),i=t(1765),c=t(7965),l=t.n(c),d=t(6540);const u=function(e){void 0===e&&(e={});var n=(0,d.useState)(e),t=n[0],o=n[1];return[t,(0,d.useCallback)((function(e){o((function(n){return Object.assign({},n,e instanceof Function?e(n):e)}))}),[])]};const p=function(){var e,n,t=(e=(0,d.useRef)(!1),n=(0,d.useCallback)((function(){return e.current}),[]),(0,d.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),n),o=u({value:void 0,error:void 0,noUserInteraction:!0}),r=o[0],a=o[1];return[r,(0,d.useCallback)((function(e){var n,o;if(t())try{if("string"!=typeof e&&"number"!=typeof e){var r=new Error("Cannot copy typeof "+typeof e+" to clipboard, must be a string");return void a({value:e,error:r,noUserInteraction:!0})}if(""===e){r=new Error("Cannot copy empty string to clipboard.");return void a({value:e,error:r,noUserInteraction:!0})}o=e.toString(),n=l()(o),a({value:o,error:void 0,noUserInteraction:n})}catch(r){a({value:o,error:r,noUserInteraction:n})}}),[])]};var m=t(4848);function g(e){let{language:n,code:t}=e;const[o,r]=p(),{isDarkTheme:a}=(0,s.G)();return(0,m.jsxs)("div",{style:{position:"relative"},children:[(0,m.jsx)(i.f4,{theme:a?i.Zj.vsLight:i.Zj.vsDark,code:t,language:n,children:e=>{let{style:n,tokens:t,getLineProps:o,getTokenProps:r}=e;return(0,m.jsx)("pre",{style:n,children:t.map(((e,n)=>(0,m.jsxs)("div",{...o({line:e}),children:[(0,m.jsx)("span",{style:{display:"inline-block",width:"3em",color:"var(--gray)"},children:n+1}),e.map(((e,n)=>(0,m.jsx)("span",{...r({token:e})},n)))]},n)))})}}),(0,m.jsx)("button",{className:"button button--secondary",style:{position:"absolute",top:"10px",right:"10px"},onClick:()=>{r(t)},children:o.value?"Copied!":"Copy"})]})}const f={container:"container_P8BO",innerContainer:"innerContainer_JtmF",header:"header_c5gm"};function h(){return(0,m.jsx)("div",{className:f.container,children:(0,m.jsxs)("div",{className:f.innerContainer,children:[(0,m.jsxs)("div",{className:f.header,children:[(0,m.jsx)(A,{title:"Getting Started",summary:"Getting Started",description:"Get started using OpenDevin in just a few lines of code"}),(0,m.jsx)("div",{className:f.buttons,children:(0,m.jsx)(a.A,{className:"button button--secondary button--lg",to:"/docs/usage/intro",children:"Learn More"})})]}),(0,m.jsx)("br",{}),(0,m.jsx)(g,{language:"python",code:'# Your OpenAI API key, or any other LLM API key\nexport LLM_API_KEY="sk-..."'}),(0,m.jsx)(g,{language:"python",code:"# The directory you want OpenDevin to modify. MUST be an absolute path!\nexport WORKSPACE_BASE=$(pwd)/workspace"}),(0,m.jsx)(g,{language:"python",code:"docker run \\\n -e LLM_API_KEY \\\n -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \\\n -v $WORKSPACE_BASE:/opt/workspace_base \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -p 3000:3000 \\\n --add-host host.docker.internal=host-gateway \\\n ghcr.io/opendevin/opendevin:0.3.1"})]})})}var v=t(1107);const x={demo:"demo_AlZc"};function y(){const e=d.useRef(null);return(0,m.jsx)("div",{style:{paddingBottom:"30px",paddingTop:"20px",textAlign:"center"},children:(0,m.jsx)("video",{playsInline:!0,autoPlay:!0,loop:!0,className:x.demo,muted:!0,onMouseOver:()=>e.current.controls=!0,onMouseOut:()=>e.current.controls=!1,ref:e,children:(0,m.jsx)("source",{src:"img/teaser.mp4",type:"video/mp4"})})})}const b={headerContainer:"headerContainer_WVwZ",gradientAnimation:"gradientAnimation_naSo",header:"header_Mi5r"};function j(){const{siteConfig:e}=(0,o.A)();return(0,m.jsxs)("div",{className:b.headerContainer,children:[(0,m.jsxs)("div",{className:b.header,children:[(0,m.jsx)(v.A,{as:"h1",className:"hero__title",children:e.title}),(0,m.jsx)("p",{className:"hero__subtitle",children:e.tagline}),(0,m.jsx)("div",{className:b.buttons,children:(0,m.jsx)(a.A,{className:"button button--secondary button--lg",to:"/docs/usage/intro",children:"Get Started"})})]})," ",(0,m.jsx)(y,{})]})}const C={container:"container_eaIX",innerContainer:"innerContainer_hF2K",sidebarImage:"sidebarImage_Dubf",welcomeText:"welcomeText_rvQ0"};function w(){return(0,m.jsx)("div",{className:C.container,children:(0,m.jsxs)("div",{className:C.innerContainer,children:[(0,m.jsx)("img",{src:"img/logo.png",className:C.sidebarImage}),(0,m.jsx)("p",{className:C.welcomeText,children:"Welcome to OpenDevin, an open-source project aiming to replicate 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."})]})})}function A(e){let{title:n,summary:t,description:o}=e;return(0,m.jsxs)("div",{children:[(0,m.jsx)("h2",{style:{fontSize:"40px"},children:t}),(0,m.jsx)("h3",{className:"headerDescription",children:o})]})}function k(){const{siteConfig:e}=(0,o.A)();return(0,m.jsx)(r.A,{title:`Hello from ${e.title}`,description:"AI-powered code generation for software engineering.",children:(0,m.jsxs)("div",{children:[(0,m.jsx)(j,{}),(0,m.jsxs)("div",{children:[(0,m.jsx)(w,{}),(0,m.jsx)(h,{})]})]})})}},7965:(e,n,t)=>{"use strict";var o=t(6426),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,a,s,i,c,l,d=!1;n||(n={}),t=n.debug||!1;try{if(s=o(),i=document.createRange(),c=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(o){if(o.stopPropagation(),n.format)if(o.preventDefault(),void 0===o.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=r[n.format]||r.default;window.clipboardData.setData(a,e)}else o.clipboardData.clearData(),o.clipboardData.setData(n.format,e);n.onCopy&&(o.preventDefault(),n.onCopy(o.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),c.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(u){t&&console.error("unable to copy using execCommand: ",u),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),d=!0}catch(u){t&&console.error("unable to copy using clipboardData: ",u),t&&console.error("falling back to prompt"),a=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(i):c.removeAllRanges()),l&&document.body.removeChild(l),s()}return d}},6426:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],o=0;o{"use strict";t.r(n),t.d(n,{Header:()=>A,default:()=>k});var o=t(4586),r=t(781),a=t(8774),s=t(5293),i=t(1765),c=t(7965),l=t.n(c),d=t(6540);const u=function(e){void 0===e&&(e={});var n=(0,d.useState)(e),t=n[0],o=n[1];return[t,(0,d.useCallback)((function(e){o((function(n){return Object.assign({},n,e instanceof Function?e(n):e)}))}),[])]};const p=function(){var e,n,t=(e=(0,d.useRef)(!1),n=(0,d.useCallback)((function(){return e.current}),[]),(0,d.useEffect)((function(){return e.current=!0,function(){e.current=!1}}),[]),n),o=u({value:void 0,error:void 0,noUserInteraction:!0}),r=o[0],a=o[1];return[r,(0,d.useCallback)((function(e){var n,o;if(t())try{if("string"!=typeof e&&"number"!=typeof e){var r=new Error("Cannot copy typeof "+typeof e+" to clipboard, must be a string");return void a({value:e,error:r,noUserInteraction:!0})}if(""===e){r=new Error("Cannot copy empty string to clipboard.");return void a({value:e,error:r,noUserInteraction:!0})}o=e.toString(),n=l()(o),a({value:o,error:void 0,noUserInteraction:n})}catch(r){a({value:o,error:r,noUserInteraction:n})}}),[])]};var m=t(4848);function g(e){let{language:n,code:t}=e;const[o,r]=p(),{isDarkTheme:a}=(0,s.G)();return(0,m.jsxs)("div",{style:{position:"relative"},children:[(0,m.jsx)(i.f4,{theme:a?i.Zj.vsLight:i.Zj.vsDark,code:t,language:n,children:e=>{let{style:n,tokens:t,getLineProps:o,getTokenProps:r}=e;return(0,m.jsx)("pre",{style:n,children:t.map(((e,n)=>(0,m.jsxs)("div",{...o({line:e}),children:[(0,m.jsx)("span",{style:{display:"inline-block",width:"3em",color:"var(--gray)"},children:n+1}),e.map(((e,n)=>(0,m.jsx)("span",{...r({token:e})},n)))]},n)))})}}),(0,m.jsx)("button",{className:"button button--secondary",style:{position:"absolute",top:"10px",right:"10px"},onClick:()=>{r(t)},children:o.value?"Copied!":"Copy"})]})}const f={container:"container_P8BO",innerContainer:"innerContainer_JtmF",header:"header_c5gm"};function h(){return(0,m.jsx)("div",{className:f.container,children:(0,m.jsxs)("div",{className:f.innerContainer,children:[(0,m.jsxs)("div",{className:f.header,children:[(0,m.jsx)(A,{title:"Getting Started",summary:"Getting Started",description:"Get started using OpenDevin in just a few lines of code"}),(0,m.jsx)("div",{className:f.buttons,children:(0,m.jsx)(a.A,{className:"button button--secondary button--lg",to:"/modules/usage/intro",children:"Learn More"})})]}),(0,m.jsx)("br",{}),(0,m.jsx)(g,{language:"python",code:'# Your OpenAI API key, or any other LLM API key\nexport LLM_API_KEY="sk-..."'}),(0,m.jsx)(g,{language:"python",code:"# The directory you want OpenDevin to modify. MUST be an absolute path!\nexport WORKSPACE_BASE=$(pwd)/workspace"}),(0,m.jsx)(g,{language:"python",code:"docker run \\\n -e LLM_API_KEY \\\n -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \\\n -v $WORKSPACE_BASE:/opt/workspace_base \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -p 3000:3000 \\\n --add-host host.docker.internal=host-gateway \\\n ghcr.io/opendevin/opendevin:0.3.1"})]})})}var v=t(1107);const x={demo:"demo_AlZc"};function y(){const e=d.useRef(null);return(0,m.jsx)("div",{style:{paddingBottom:"30px",paddingTop:"20px",textAlign:"center"},children:(0,m.jsx)("video",{playsInline:!0,autoPlay:!0,loop:!0,className:x.demo,muted:!0,onMouseOver:()=>e.current.controls=!0,onMouseOut:()=>e.current.controls=!1,ref:e,children:(0,m.jsx)("source",{src:"img/teaser.mp4",type:"video/mp4"})})})}const b={headerContainer:"headerContainer_WVwZ",gradientAnimation:"gradientAnimation_naSo",header:"header_Mi5r"};function j(){const{siteConfig:e}=(0,o.A)();return(0,m.jsxs)("div",{className:b.headerContainer,children:[(0,m.jsxs)("div",{className:b.header,children:[(0,m.jsx)(v.A,{as:"h1",className:"hero__title",children:e.title}),(0,m.jsx)("p",{className:"hero__subtitle",children:e.tagline}),(0,m.jsx)("div",{className:b.buttons,children:(0,m.jsx)(a.A,{className:"button button--secondary button--lg",to:"/modules/usage/intro",children:"Get Started"})})]})," ",(0,m.jsx)(y,{})]})}const C={container:"container_eaIX",innerContainer:"innerContainer_hF2K",sidebarImage:"sidebarImage_Dubf",welcomeText:"welcomeText_rvQ0"};function w(){return(0,m.jsx)("div",{className:C.container,children:(0,m.jsxs)("div",{className:C.innerContainer,children:[(0,m.jsx)("img",{src:"img/logo.png",className:C.sidebarImage}),(0,m.jsx)("p",{className:C.welcomeText,children:"Welcome to OpenDevin, an open-source project aiming to replicate 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."})]})})}function A(e){let{title:n,summary:t,description:o}=e;return(0,m.jsxs)("div",{children:[(0,m.jsx)("h2",{style:{fontSize:"40px"},children:t}),(0,m.jsx)("h3",{className:"headerDescription",children:o})]})}function k(){const{siteConfig:e}=(0,o.A)();return(0,m.jsx)(r.A,{title:`Hello from ${e.title}`,description:"AI-powered code generation for software engineering.",children:(0,m.jsxs)("div",{children:[(0,m.jsx)(j,{}),(0,m.jsxs)("div",{children:[(0,m.jsx)(w,{}),(0,m.jsx)(h,{})]})]})})}},7965:(e,n,t)=>{"use strict";var o=t(6426),r={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,n){var t,a,s,i,c,l,d=!1;n||(n={}),t=n.debug||!1;try{if(s=o(),i=document.createRange(),c=document.getSelection(),(l=document.createElement("span")).textContent=e,l.ariaHidden="true",l.style.all="unset",l.style.position="fixed",l.style.top=0,l.style.clip="rect(0, 0, 0, 0)",l.style.whiteSpace="pre",l.style.webkitUserSelect="text",l.style.MozUserSelect="text",l.style.msUserSelect="text",l.style.userSelect="text",l.addEventListener("copy",(function(o){if(o.stopPropagation(),n.format)if(o.preventDefault(),void 0===o.clipboardData){t&&console.warn("unable to use e.clipboardData"),t&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=r[n.format]||r.default;window.clipboardData.setData(a,e)}else o.clipboardData.clearData(),o.clipboardData.setData(n.format,e);n.onCopy&&(o.preventDefault(),n.onCopy(o.clipboardData))})),document.body.appendChild(l),i.selectNodeContents(l),c.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(u){t&&console.error("unable to copy using execCommand: ",u),t&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(n.format||"text",e),n.onCopy&&n.onCopy(window.clipboardData),d=!0}catch(u){t&&console.error("unable to copy using clipboardData: ",u),t&&console.error("falling back to prompt"),a=function(e){var n=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,n)}("message"in n?n.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{c&&("function"==typeof c.removeRange?c.removeRange(i):c.removeAllRanges()),l&&document.body.removeChild(l),s()}return d}},6426:e=>{e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var n=document.activeElement,t=[],o=0;o{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var o=t(4848),s=t(8453);const r={sidebar_label:"browse",title:"opendevin.observation.browse"},i=void 0,a={id:"python/opendevin/observation/browse",title:"opendevin.observation.browse",description:"BrowserOutputObservation Objects",source:"@site/modules/python/opendevin/observation/browse.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/browse",permalink:"/OpenDevin/modules/python/opendevin/observation/browse",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"browse",title:"opendevin.observation.browse"},sidebar:"apiSidebar",previous:{title:"base",permalink:"/OpenDevin/modules/python/opendevin/observation/base"},next:{title:"delegate",permalink:"/OpenDevin/modules/python/opendevin/observation/delegate"}},p={},c=[{value:"BrowserOutputObservation Objects",id:"browseroutputobservation-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"browseroutputobservation-objects",children:"BrowserOutputObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass BrowserOutputObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents the output of a browser."})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var o=t(6540);const s={},r=o.createContext(s);function i(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/241f2d2b.8583a5e7.js b/assets/js/241f2d2b.8583a5e7.js deleted file mode 100644 index 5315b6ad1d..0000000000 --- a/assets/js/241f2d2b.8583a5e7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5566],{9077:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var o=n(4848),s=n(8453);const a={sidebar_label:"delegate",title:"observation.delegate"},r=void 0,i={id:"python/observation/delegate",title:"observation.delegate",description:"AgentDelegateObservation Objects",source:"@site/docs/python/observation/delegate.md",sourceDirName:"python/observation",slug:"/python/observation/delegate",permalink:"/OpenDevin/docs/python/observation/delegate",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"delegate",title:"observation.delegate"}},c={},l=[{value:"AgentDelegateObservation Objects",id:"agentdelegateobservation-objects",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"agentdelegateobservation-objects",children:"AgentDelegateObservation Objects"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass AgentDelegateObservation(Observation)\n"})}),"\n",(0,o.jsx)(t.p,{children:"This data class represents a delegate observation.\nThis is used when the produced action is NOT executable."})]})}function p(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var o=n(6540);const s={},a=o.createContext(s);function r(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/280598d2.4162f6c6.js b/assets/js/280598d2.4162f6c6.js deleted file mode 100644 index 5319c736bb..0000000000 --- a/assets/js/280598d2.4162f6c6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2205],{1620:(n,e,i)=>{i.r(e),i.d(e,{assets:()=>r,contentTitle:()=>p,default:()=>c,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var t=i(4848),s=i(8453);const o={sidebar_label:"mixin",title:"opendevin.sandbox.plugins.mixin"},p=void 0,l={id:"python/opendevin/sandbox/plugins/mixin",title:"opendevin.sandbox.plugins.mixin",description:"PluginMixin Objects",source:"@site/docs/python/opendevin/sandbox/plugins/mixin.md",sourceDirName:"python/opendevin/sandbox/plugins",slug:"/python/opendevin/sandbox/plugins/mixin",permalink:"/OpenDevin/docs/python/opendevin/sandbox/plugins/mixin",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"mixin",title:"opendevin.sandbox.plugins.mixin"},sidebar:"apiSidebar",previous:{title:"jupyter",permalink:"/OpenDevin/docs/python/opendevin/sandbox/plugins/jupyter/__init__"},next:{title:"requirement",permalink:"/OpenDevin/docs/python/opendevin/sandbox/plugins/requirement"}},r={},d=[{value:"PluginMixin Objects",id:"pluginmixin-objects",level:2},{value:"init_plugins",id:"init_plugins",level:4}];function u(n){const e={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e.h2,{id:"pluginmixin-objects",children:"PluginMixin Objects"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-python",children:"class PluginMixin()\n"})}),"\n",(0,t.jsx)(e.p,{children:"Mixin for Sandbox to support plugins."}),"\n",(0,t.jsx)(e.h4,{id:"init_plugins",children:"init_plugins"}),"\n",(0,t.jsx)(e.pre,{children:(0,t.jsx)(e.code,{className:"language-python",children:"def init_plugins(requirements: List[PluginRequirement])\n"})}),"\n",(0,t.jsx)(e.p,{children:"Load a plugin into the sandbox."})]})}function c(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(u,{...n})}):u(n)}},8453:(n,e,i)=>{i.d(e,{R:()=>p,x:()=>l});var t=i(6540);const s={},o=t.createContext(s);function p(n){const e=t.useContext(o);return t.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function l(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:p(n.components),t.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/28801d74.5f713150.js b/assets/js/28801d74.5f713150.js deleted file mode 100644 index c01d4049ff..0000000000 --- a/assets/js/28801d74.5f713150.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4675],{738:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>r});var c=t(4848),s=t(8453);const o={sidebar_label:"codeact_agent",title:"codeact_agent.codeact_agent"},a=void 0,i={id:"python/codeact_agent/codeact_agent",title:"codeact_agent.codeact_agent",description:"CodeActAgent Objects",source:"@site/docs/python/codeact_agent/codeact_agent.md",sourceDirName:"python/codeact_agent",slug:"/python/codeact_agent/",permalink:"/OpenDevin/docs/python/codeact_agent/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"codeact_agent",title:"codeact_agent.codeact_agent"}},d={},r=[{value:"CodeActAgent Objects",id:"codeactagent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.h2,{id:"codeactagent-objects",children:"CodeActAgent Objects"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-python",children:"class CodeActAgent(Agent)\n"})}),"\n",(0,c.jsx)(n.p,{children:"The Code Act Agent is a minimalist agent.\nThe agent works by passing the model a list of action-observation pairs and prompting the model to take the next step."}),"\n",(0,c.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM) -> None\n"})}),"\n",(0,c.jsx)(n.p,{children:"Initializes a new instance of the CodeActAgent class."}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,c.jsx)(n.p,{children:"Performs one step using the Code Act Agent.\nThis includes gathering info on previous steps and prompting the model to make a command to execute."}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"state (State): used to get updated info and background commands"}),"\n"]}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"CmdRunAction(command) - command action to run"}),"\n",(0,c.jsx)(n.li,{children:"AgentEchoAction(content=INVALID_INPUT_MESSAGE) - invalid command output"}),"\n"]}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsx)(n.li,{children:"NotImplementedError - for actions other than CmdOutputObservation or AgentMessageObservation"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var c=t(6540);const s={},o=c.createContext(s);function a(e){const n=c.useContext(o);return c.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),c.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2a19c2bb.4fff51b8.js b/assets/js/2a19c2bb.4fff51b8.js deleted file mode 100644 index 33813c694a..0000000000 --- a/assets/js/2a19c2bb.4fff51b8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3665],{7420:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var r=s(4848),t=s(8453);const o={sidebar_label:"manager",title:"opendevin.server.session.manager"},a=void 0,i={id:"python/opendevin/server/session/manager",title:"opendevin.server.session.manager",description:"SessionManager Objects",source:"@site/docs/python/opendevin/server/session/manager.md",sourceDirName:"python/opendevin/server/session",slug:"/python/opendevin/server/session/manager",permalink:"/OpenDevin/docs/python/opendevin/server/session/manager",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"manager",title:"opendevin.server.session.manager"},sidebar:"apiSidebar",previous:{title:"auth",permalink:"/OpenDevin/docs/python/opendevin/server/auth/"},next:{title:"msg_stack",permalink:"/OpenDevin/docs/python/opendevin/server/session/msg_stack"}},d={},c=[{value:"SessionManager Objects",id:"sessionmanager-objects",level:2},{value:"send",id:"send",level:4},{value:"send_error",id:"send_error",level:4},{value:"send_message",id:"send_message",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"sessionmanager-objects",children:"SessionManager Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class SessionManager()\n"})}),"\n",(0,r.jsx)(n.h4,{id:"send",children:"send"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def send(sid: str, data: Dict[str, object]) -> bool\n"})}),"\n",(0,r.jsx)(n.p,{children:"Sends data to the client."}),"\n",(0,r.jsx)(n.h4,{id:"send_error",children:"send_error"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def send_error(sid: str, message: str) -> bool\n"})}),"\n",(0,r.jsx)(n.p,{children:"Sends an error message to the client."}),"\n",(0,r.jsx)(n.h4,{id:"send_message",children:"send_message"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def send_message(sid: str, message: str) -> bool\n"})}),"\n",(0,r.jsx)(n.p,{children:"Sends a message to the client."})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>i});var r=s(6540);const t={},o=r.createContext(t);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2bcf47f1.037ebf0e.js b/assets/js/2bcf47f1.037ebf0e.js deleted file mode 100644 index b1f78e9439..0000000000 --- a/assets/js/2bcf47f1.037ebf0e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7440],{3820:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>c,metadata:()=>s,toc:()=>p});var o=t(4848),i=t(8453);const c={sidebar_label:"fileop",title:"opendevin.action.fileop"},a=void 0,s={id:"python/opendevin/action/fileop",title:"opendevin.action.fileop",description:"FileReadAction Objects",source:"@site/docs/python/opendevin/action/fileop.md",sourceDirName:"python/opendevin/action",slug:"/python/opendevin/action/fileop",permalink:"/OpenDevin/docs/python/opendevin/action/fileop",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"fileop",title:"opendevin.action.fileop"},sidebar:"apiSidebar",previous:{title:"base",permalink:"/OpenDevin/docs/python/opendevin/action/base"},next:{title:"tasks",permalink:"/OpenDevin/docs/python/opendevin/action/tasks"}},l={},p=[{value:"FileReadAction Objects",id:"filereadaction-objects",level:2}];function r(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"filereadaction-objects",children:"FileReadAction Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass FileReadAction(ExecutableAction)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Reads a file from a given path.\nCan be set to read specific lines using start and end\nDefault lines 0:-1 (whole file)"})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(r,{...e})}):r(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>s});var o=t(6540);const i={},c=o.createContext(i);function a(e){const n=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2bdcc17b.53c4addc.js b/assets/js/2bdcc17b.53c4addc.js deleted file mode 100644 index ec581232b9..0000000000 --- a/assets/js/2bdcc17b.53c4addc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5095],{8044:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var o=t(4848),s=t(8453);const a={sidebar_label:"delegate",title:"opendevin.observation.delegate"},r=void 0,i={id:"python/opendevin/observation/delegate",title:"opendevin.observation.delegate",description:"AgentDelegateObservation Objects",source:"@site/docs/python/opendevin/observation/delegate.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/delegate",permalink:"/OpenDevin/docs/python/opendevin/observation/delegate",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"delegate",title:"opendevin.observation.delegate"},sidebar:"apiSidebar",previous:{title:"browse",permalink:"/OpenDevin/docs/python/opendevin/observation/browse"},next:{title:"error",permalink:"/OpenDevin/docs/python/opendevin/observation/error"}},d={},c=[{value:"AgentDelegateObservation Objects",id:"agentdelegateobservation-objects",level:2}];function l(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"agentdelegateobservation-objects",children:"AgentDelegateObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass AgentDelegateObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents a delegate observation.\nThis is used when the produced action is NOT executable."})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>i});var o=t(6540);const s={},a=o.createContext(s);function r(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2d9af1ea.d5f77349.js b/assets/js/2d9af1ea.d5f77349.js new file mode 100644 index 0000000000..52ac28cdc1 --- /dev/null +++ b/assets/js/2d9af1ea.d5f77349.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8878],{2207:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var o=t(4848),s=t(8453);const r={sidebar_label:"agent",title:"agenthub.monologue_agent.agent"},l=void 0,i={id:"python/agenthub/monologue_agent/agent",title:"agenthub.monologue_agent.agent",description:"MonologueAgent Objects",source:"@site/modules/python/agenthub/monologue_agent/agent.md",sourceDirName:"python/agenthub/monologue_agent",slug:"/python/agenthub/monologue_agent/agent",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.monologue_agent.agent"},sidebar:"apiSidebar",previous:{title:"prompts",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/prompts"},next:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/planner_agent/agent"}},a={},c=[{value:"MonologueAgent Objects",id:"monologueagent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4},{value:"search_memory",id:"search_memory",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"monologueagent-objects",children:"MonologueAgent Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class MonologueAgent(Agent)\n"})}),"\n",(0,o.jsx)(n.p,{children:"The Monologue Agent utilizes long and short term memory to complete tasks.\nLong term memory is stored as a LongTermMemory object and the model uses it to search for examples from the past.\nShort term memory is stored as a Monologue object and the model can condense it as necessary."}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initializes the Monologue Agent with an llm, monologue, and memory."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,o.jsx)(n.p,{children:"Modifies the current state by adding the most recent actions and observations, then prompts the model to think about it's next action to take using monologue, memory, and hint."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"state (State): The current state based on previous steps taken"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Action: The next action to take based on LLM response"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"search_memory",children:"search_memory"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def search_memory(query: str) -> List[str]\n"})}),"\n",(0,o.jsx)(n.p,{children:"Uses VectorIndexRetriever to find related memories within the long term memory.\nUses search to produce top 10 results."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"query (str): The query that we want to find related memories for"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"List[str]: A list of top 10 text results that matched the query"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>i});var o=t(6540);const s={},r=o.createContext(s);function l(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2f886f65.7e96617f.js b/assets/js/2f886f65.7e96617f.js deleted file mode 100644 index 8138a1db3c..0000000000 --- a/assets/js/2f886f65.7e96617f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7400],{3231:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>s,contentTitle:()=>a,default:()=>l,frontMatter:()=>c,metadata:()=>r,toc:()=>p});var o=t(4848),i=t(8453);const c={sidebar_label:"action",title:"opendevin.action"},a=void 0,r={id:"python/opendevin/action/__init__",title:"opendevin.action",description:"ACTION\\TYPE\\TO\\_CLASS",source:"@site/docs/python/opendevin/action/__init__.md",sourceDirName:"python/opendevin/action",slug:"/python/opendevin/action/__init__",permalink:"/OpenDevin/docs/python/opendevin/action/__init__",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"action",title:"opendevin.action"},sidebar:"apiSidebar",previous:{title:"prompt",permalink:"/OpenDevin/docs/python/agenthub/planner_agent/prompt"},next:{title:"base",permalink:"/OpenDevin/docs/python/opendevin/action/base"}},s={},p=[{value:"ACTION_TYPE_TO_CLASS",id:"action_type_to_class",level:4}];function d(n){const e={h4:"h4",p:"p",...(0,i.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h4,{id:"action_type_to_class",children:"ACTION_TYPE_TO_CLASS"}),"\n",(0,o.jsx)(e.p,{children:"type: ignore[attr-defined]"})]})}function l(n={}){const{wrapper:e}={...(0,i.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(d,{...n})}):d(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>a,x:()=>r});var o=t(6540);const i={},c=o.createContext(i);function a(n){const e=o.useContext(c);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function r(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(i):n.components||i:a(n.components),o.createElement(c.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/2fb7ca26.a3e0788d.js b/assets/js/2fb7ca26.a3e0788d.js deleted file mode 100644 index d982d281bc..0000000000 --- a/assets/js/2fb7ca26.a3e0788d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7722],{8695:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>p});var i=t(4848),s=t(8453);const o={sidebar_label:"system",title:"opendevin.utils.system"},a=void 0,r={id:"python/opendevin/utils/system",title:"opendevin.utils.system",description:"find\\available\\tcp\\_port",source:"@site/docs/python/opendevin/utils/system.md",sourceDirName:"python/opendevin/utils",slug:"/python/opendevin/utils/system",permalink:"/OpenDevin/docs/python/opendevin/utils/system",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"system",title:"opendevin.utils.system"},sidebar:"apiSidebar",previous:{title:"listen",permalink:"/OpenDevin/docs/python/opendevin/server/listen"},next:{title:"agent",permalink:"/OpenDevin/docs/python/opendevin/agent"}},l={},p=[{value:"find_available_tcp_port",id:"find_available_tcp_port",level:4}];function c(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h4,{id:"find_available_tcp_port",children:"find_available_tcp_port"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def find_available_tcp_port() -> int\n"})}),"\n",(0,i.jsx)(n.p,{children:"Find an available TCP port, return -1 if none available."})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>r});var i=t(6540);const s={},o=i.createContext(s);function a(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3248220a.7f48dc88.js b/assets/js/3248220a.7f48dc88.js new file mode 100644 index 0000000000..97383e00fa --- /dev/null +++ b/assets/js/3248220a.7f48dc88.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6289],{1969:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>m,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var t=l(4848),i=l(8453);const s={sidebar_label:"llm",title:"opendevin.llm.llm"},o=void 0,r={id:"python/opendevin/llm/llm",title:"opendevin.llm.llm",description:"LLM Objects",source:"@site/modules/python/opendevin/llm/llm.md",sourceDirName:"python/opendevin/llm",slug:"/python/opendevin/llm/",permalink:"/OpenDevin/modules/python/opendevin/llm/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"llm",title:"opendevin.llm.llm"},sidebar:"apiSidebar",previous:{title:"agent_controller",permalink:"/OpenDevin/modules/python/opendevin/controller/agent_controller"},next:{title:"observation",permalink:"/OpenDevin/modules/python/opendevin/observation/__init__"}},c={},d=[{value:"LLM Objects",id:"llm-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"completion",id:"completion",level:4}];function a(e){const n={code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"llm-objects",children:"LLM Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class LLM()\n"})}),"\n",(0,t.jsx)(n.p,{children:"The LLM class represents a Language Model instance."}),"\n",(0,t.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def __init__(model=DEFAULT_MODEL_NAME,\n api_key=DEFAULT_API_KEY,\n base_url=DEFAULT_BASE_URL,\n api_version=DEFAULT_API_VERSION,\n num_retries=LLM_NUM_RETRIES,\n retry_min_wait=LLM_RETRY_MIN_WAIT,\n retry_max_wait=LLM_RETRY_MAX_WAIT,\n llm_timeout=LLM_TIMEOUT,\n llm_max_return_tokens=LLM_MAX_RETURN_TOKENS)\n"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"model"})," ",(0,t.jsx)(n.em,{children:"str, optional"})," - The name of the language model. Defaults to LLM_MODEL."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"api_key"})," ",(0,t.jsx)(n.em,{children:"str, optional"})," - The API key for accessing the language model. Defaults to LLM_API_KEY."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"base_url"})," ",(0,t.jsx)(n.em,{children:"str, optional"})," - The base URL for the language model API. Defaults to LLM_BASE_URL. Not necessary for OpenAI."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"api_version"})," ",(0,t.jsx)(n.em,{children:"str, optional"})," - The version of the API to use. Defaults to LLM_API_VERSION. Not necessary for OpenAI."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"num_retries"})," ",(0,t.jsx)(n.em,{children:"int, optional"})," - The number of retries for API calls. Defaults to LLM_NUM_RETRIES."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"retry_min_wait"})," ",(0,t.jsx)(n.em,{children:"int, optional"})," - The minimum time to wait between retries in seconds. Defaults to LLM_RETRY_MIN_TIME."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"retry_max_wait"})," ",(0,t.jsx)(n.em,{children:"int, optional"})," - The maximum time to wait between retries in seconds. Defaults to LLM_RETRY_MAX_TIME."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"llm_timeout"})," ",(0,t.jsx)(n.em,{children:"int, optional"})," - The maximum time to wait for a response in seconds. Defaults to LLM_TIMEOUT."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"llm_max_return_tokens"})," ",(0,t.jsx)(n.em,{children:"int, optional"})," - The maximum number of tokens to return. Defaults to LLM_MAX_RETURN_TOKENS."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Attributes"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"model_name"})," ",(0,t.jsx)(n.em,{children:"str"})," - The name of the language model."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"api_key"})," ",(0,t.jsx)(n.em,{children:"str"})," - The API key for accessing the language model."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"base_url"})," ",(0,t.jsx)(n.em,{children:"str"})," - The base URL for the language model API."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"api_version"})," ",(0,t.jsx)(n.em,{children:"str"})," - The version of the API to use."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"completion",children:"completion"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@property\ndef completion()\n"})}),"\n",(0,t.jsx)(n.p,{children:"Decorator for the litellm completion function."})]})}function m(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453:(e,n,l)=>{l.d(n,{R:()=>o,x:()=>r});var t=l(6540);const i={},s=t.createContext(i);function o(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/33f11751.6faab49f.js b/assets/js/33f11751.6faab49f.js deleted file mode 100644 index bcfeff9820..0000000000 --- a/assets/js/33f11751.6faab49f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3860],{9048:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var o=i(4848),t=i(8453);const s={},r="Azure OpenAI LLM",a={id:"usage/llms/azureLLMs",title:"Azure OpenAI LLM",description:"Completion",source:"@site/docs/usage/llms/azureLLMs.md",sourceDirName:"usage/llms",slug:"/usage/llms/azureLLMs",permalink:"/OpenDevin/docs/usage/llms/azureLLMs",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"\ud83e\udd16 LLM Backends",permalink:"/OpenDevin/docs/usage/llms/"},next:{title:"Google Gemini/Vertex LLM",permalink:"/OpenDevin/docs/usage/llms/googleLLMs"}},d={},l=[{value:"Completion",id:"completion",level:2},{value:"Azure openai configs",id:"azure-openai-configs",level:3},{value:"Embeddings",id:"embeddings",level:2},{value:"Azure openai configs",id:"azure-openai-configs-1",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"azure-openai-llm",children:"Azure OpenAI LLM"}),"\n",(0,o.jsx)(n.h2,{id:"completion",children:"Completion"}),"\n",(0,o.jsxs)(n.p,{children:["OpenDevin uses LiteLLM for completion calls. You can find their documentation on Azure ",(0,o.jsx)(n.a,{href:"https://docs.litellm.ai/docs/providers/azure",children:"here"})]}),"\n",(0,o.jsx)(n.h3,{id:"azure-openai-configs",children:"Azure openai configs"}),"\n",(0,o.jsxs)(n.p,{children:["When running the OpenDevin Docker image, you'll need to set the following environment variables using ",(0,o.jsx)(n.code,{children:"-e"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'LLM_BASE_URL="" # e.g. "https://openai-gpt-4-test-v-1.openai.azure.com/"\nLLM_API_KEY=""\nLLM_MODEL="azure/"\nLLM_API_VERSION = "" # e.g. "2024-02-15-preview"\n'})}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsx)(n.p,{children:"You can find your ChatGPT deployment name on the deployments page in Azure. It could be the same with the chat model name (e.g. 'GPT4-1106-preview'), by default or initially set, but it doesn't have to be the same. Run opendevin, and when you load it in the browser, go to Settings and set model as above: \"azure/\". If it's not in the list, enter your own text and save it."})}),"\n",(0,o.jsx)(n.h2,{id:"embeddings",children:"Embeddings"}),"\n",(0,o.jsxs)(n.p,{children:["OpenDevin uses llama-index for embeddings. You can find their documentation on Azure ",(0,o.jsx)(n.a,{href:"https://docs.llamaindex.ai/en/stable/api_reference/embeddings/azure_openai/",children:"here"})]}),"\n",(0,o.jsx)(n.h3,{id:"azure-openai-configs-1",children:"Azure openai configs"}),"\n",(0,o.jsx)(n.p,{children:'The model used for Azure OpenAI embeddings is "text-embedding-ada-002".\nYou need the correct deployment name for this model in your Azure account.'}),"\n",(0,o.jsxs)(n.p,{children:["When running OpenDevin in Docker, set the following environment variables using ",(0,o.jsx)(n.code,{children:"-e"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'LLM_EMBEDDING_MODEL="azureopenai"\nLLM_EMBEDDING_DEPLOYMENT_NAME = "" # e.g. "TextEmbedding..."\nLLM_API_VERSION = "" # e.g. "2024-02-15-preview"\n'})})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>a});var o=i(6540);const t={},s=o.createContext(t);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/36ebda83.e3370f05.js b/assets/js/36ebda83.e3370f05.js deleted file mode 100644 index 940d776bca..0000000000 --- a/assets/js/36ebda83.e3370f05.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1087],{7949:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>r,default:()=>l,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var o=t(4848),i=t(8453);const s={sidebar_label:"observation",title:"opendevin.observation"},r=void 0,a={id:"python/opendevin/observation/__init__",title:"opendevin.observation",description:"OBSERVATION\\TYPE\\TO\\_CLASS",source:"@site/docs/python/opendevin/observation/__init__.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/__init__",permalink:"/OpenDevin/docs/python/opendevin/observation/__init__",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"observation",title:"opendevin.observation"},sidebar:"apiSidebar",previous:{title:"llm",permalink:"/OpenDevin/docs/python/opendevin/llm/"},next:{title:"base",permalink:"/OpenDevin/docs/python/opendevin/observation/base"}},p={},c=[{value:"OBSERVATION_TYPE_TO_CLASS",id:"observation_type_to_class",level:4}];function d(e){const n={h4:"h4",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"observation_type_to_class",children:"OBSERVATION_TYPE_TO_CLASS"}),"\n",(0,o.jsx)(n.p,{children:"type: ignore[attr-defined]"})]})}function l(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var o=t(6540);const i={},s=o.createContext(i);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/377852db.9c36d5fc.js b/assets/js/377852db.9c36d5fc.js new file mode 100644 index 0000000000..967f8fb48d --- /dev/null +++ b/assets/js/377852db.9c36d5fc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8659],{759:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var o=t(4848),i=t(8453);const a={sidebar_label:"action",title:"opendevin.action"},r=void 0,s={id:"python/opendevin/action/__init__",title:"opendevin.action",description:"ACTION\\TYPE\\TO\\_CLASS",source:"@site/modules/python/opendevin/action/__init__.md",sourceDirName:"python/opendevin/action",slug:"/python/opendevin/action/__init__",permalink:"/OpenDevin/modules/python/opendevin/action/__init__",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"action",title:"opendevin.action"},sidebar:"apiSidebar",previous:{title:"prompt",permalink:"/OpenDevin/modules/python/agenthub/planner_agent/prompt"},next:{title:"base",permalink:"/OpenDevin/modules/python/opendevin/action/base"}},c={},p=[{value:"ACTION_TYPE_TO_CLASS",id:"action_type_to_class",level:4}];function d(n){const e={h4:"h4",p:"p",...(0,i.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h4,{id:"action_type_to_class",children:"ACTION_TYPE_TO_CLASS"}),"\n",(0,o.jsx)(e.p,{children:"type: ignore[attr-defined]"})]})}function l(n={}){const{wrapper:e}={...(0,i.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(d,{...n})}):d(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>r,x:()=>s});var o=t(6540);const i={},a=o.createContext(i);function r(n){const e=o.useContext(a);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(i):n.components||i:r(n.components),o.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/37b15e81.d64e1bd0.js b/assets/js/37b15e81.d64e1bd0.js deleted file mode 100644 index 1a11335c1e..0000000000 --- a/assets/js/37b15e81.d64e1bd0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2465],{95:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>c,frontMatter:()=>r,metadata:()=>l,toc:()=>p});var s=t(4848),o=t(8453);const r={sidebar_label:"prompts",title:"agenthub.monologue_agent.utils.prompts"},i=void 0,l={id:"python/agenthub/monologue_agent/utils/prompts",title:"agenthub.monologue_agent.utils.prompts",description:"get\\summarize\\monologue\\_prompt",source:"@site/docs/python/agenthub/monologue_agent/utils/prompts.md",sourceDirName:"python/agenthub/monologue_agent/utils",slug:"/python/agenthub/monologue_agent/utils/prompts",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/prompts",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"prompts",title:"agenthub.monologue_agent.utils.prompts"},sidebar:"apiSidebar",previous:{title:"monologue",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/monologue"},next:{title:"agent",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/agent"}},a={},p=[{value:"get_summarize_monologue_prompt",id:"get_summarize_monologue_prompt",level:4},{value:"get_request_action_prompt",id:"get_request_action_prompt",level:4},{value:"parse_action_response",id:"parse_action_response",level:4},{value:"parse_summary_response",id:"parse_summary_response",level:4}];function u(e){const n={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h4,{id:"get_summarize_monologue_prompt",children:"get_summarize_monologue_prompt"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def get_summarize_monologue_prompt(thoughts: List[dict])\n"})}),"\n",(0,s.jsx)(n.p,{children:"Gets the prompt for summarizing the monologue"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"str: A formatted string with the current monologue within the prompt"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"get_request_action_prompt",children:"get_request_action_prompt"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def get_request_action_prompt(\n task: str,\n thoughts: List[dict],\n background_commands_obs: List[CmdOutputObservation] = [])\n"})}),"\n",(0,s.jsx)(n.p,{children:"Gets the action prompt formatted with appropriate values."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"task (str): The current task the agent is trying to accomplish"}),"\n",(0,s.jsx)(n.li,{children:"thoughts (List[dict]): The agent's current thoughts"}),"\n",(0,s.jsx)(n.li,{children:"background_commands_obs (List[CmdOutputObservation]): List of all observed background commands running"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"str: Formatted prompt string with hint, task, monologue, and background included"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"parse_action_response",children:"parse_action_response"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def parse_action_response(response: str) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Parses a string to find an action within it"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"response (str): The string to be parsed"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Action: The action that was found in the response string"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"parse_summary_response",children:"parse_summary_response"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def parse_summary_response(response: str) -> List[dict]\n"})}),"\n",(0,s.jsx)(n.p,{children:"Parses a summary of the monologue"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"response (str): The response string to be parsed"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"List[dict]: The list of summaries output by the model"}),"\n"]})]})}function c(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var s=t(6540);const o={},r=s.createContext(o);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3971e755.0bb90ebb.js b/assets/js/3971e755.0bb90ebb.js new file mode 100644 index 0000000000..0dbf004b54 --- /dev/null +++ b/assets/js/3971e755.0bb90ebb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1865],{1790:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>m,contentTitle:()=>s,default:()=>i,frontMatter:()=>u,metadata:()=>r,toc:()=>d});var a=n(4848),o=n(8453);const u={sidebar_label:"agent",title:"agenthub.dummy_agent.agent"},s=void 0,r={id:"python/agenthub/dummy_agent/agent",title:"agenthub.dummy_agent.agent",description:"Module for a Dummy agent.",source:"@site/modules/python/agenthub/dummy_agent/agent.md",sourceDirName:"python/agenthub/dummy_agent",slug:"/python/agenthub/dummy_agent/agent",permalink:"/OpenDevin/modules/python/agenthub/dummy_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.dummy_agent.agent"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/delegator_agent/agent"},next:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/micro/agent"}},m={},d=[{value:"DummyAgent Objects",id:"dummyagent-objects",level:2}];function c(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.p,{children:"Module for a Dummy agent."}),"\n",(0,a.jsx)(t.h2,{id:"dummyagent-objects",children:"DummyAgent Objects"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-python",children:"class DummyAgent(Agent)\n"})}),"\n",(0,a.jsx)(t.p,{children:"A dummy agent that does nothing but can be used in testing."})]})}function i(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>r});var a=n(6540);const o={},u=a.createContext(o);function s(e){const t=a.useContext(u);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),a.createElement(u.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3bc74c27.8949fd18.js b/assets/js/3bc74c27.8949fd18.js deleted file mode 100644 index 3253634323..0000000000 --- a/assets/js/3bc74c27.8949fd18.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8524],{8434:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var r=n(4848),s=n(8453);const c={sidebar_label:"files",title:"files"},o=void 0,i={id:"python/files",title:"files",description:"WorkspaceFile Objects",source:"@site/docs/python/files.md",sourceDirName:"python",slug:"/python/files",permalink:"/OpenDevin/docs/python/files",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"files",title:"files"}},l={},d=[{value:"WorkspaceFile Objects",id:"workspacefile-objects",level:2},{value:"to_dict",id:"to_dict",level:4},{value:"get_folder_structure",id:"get_folder_structure",level:4}];function a(e){const t={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"workspacefile-objects",children:"WorkspaceFile Objects"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"class WorkspaceFile()\n"})}),"\n",(0,r.jsx)(t.h4,{id:"to_dict",children:"to_dict"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"def to_dict() -> Dict[str, Any]\n"})}),"\n",(0,r.jsx)(t.p,{children:"Converts the File object to a dictionary."}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(t.p,{children:"The dictionary representation of the File object."}),"\n",(0,r.jsx)(t.h4,{id:"get_folder_structure",children:"get_folder_structure"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"def get_folder_structure(workdir: Path) -> WorkspaceFile\n"})}),"\n",(0,r.jsx)(t.p,{children:"Gets the folder structure of a directory."}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"workdir"})," - The directory path."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(t.p,{children:"The folder structure."})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>i});var r=n(6540);const s={},c=r.createContext(s);function o(e){const t=r.useContext(c);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3e51433d.d952ccf6.js b/assets/js/3e51433d.d952ccf6.js deleted file mode 100644 index 5db87824b6..0000000000 --- a/assets/js/3e51433d.d952ccf6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1535],{9712:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>i,contentTitle:()=>c,default:()=>u,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var n=t(4848),r=t(8453);const o={sidebar_label:"msg_stack",title:"server.session.msg_stack"},c=void 0,a={id:"python/server/session/msg_stack",title:"server.session.msg_stack",description:"Message Objects",source:"@site/docs/python/server/session/msg_stack.md",sourceDirName:"python/server/session",slug:"/python/server/session/msg_stack",permalink:"/OpenDevin/docs/python/server/session/msg_stack",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"msg_stack",title:"server.session.msg_stack"}},i={},l=[{value:"Message Objects",id:"message-objects",level:2},{value:"role",id:"role",level:4}];function d(e){const s={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h2,{id:"message-objects",children:"Message Objects"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"class Message()\n"})}),"\n",(0,n.jsx)(s.h4,{id:"role",children:"role"}),"\n",(0,n.jsx)(s.p,{children:'"user"| "assistant"'})]})}function u(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,s,t)=>{t.d(s,{R:()=>c,x:()=>a});var n=t(6540);const r={},o=n.createContext(r);function c(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/40be84db.a0c94cac.js b/assets/js/40be84db.a0c94cac.js deleted file mode 100644 index 6ad8fe33f8..0000000000 --- a/assets/js/40be84db.a0c94cac.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5670],{282:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var o=t(4848),s=t(8453);const r={sidebar_label:"recall",title:"opendevin.observation.recall"},a=void 0,i={id:"python/opendevin/observation/recall",title:"opendevin.observation.recall",description:"AgentRecallObservation Objects",source:"@site/docs/python/opendevin/observation/recall.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/recall",permalink:"/OpenDevin/docs/python/opendevin/observation/recall",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"recall",title:"opendevin.observation.recall"},sidebar:"apiSidebar",previous:{title:"message",permalink:"/OpenDevin/docs/python/opendevin/observation/message"},next:{title:"run",permalink:"/OpenDevin/docs/python/opendevin/observation/run"}},c={},l=[{value:"AgentRecallObservation Objects",id:"agentrecallobservation-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"agentrecallobservation-objects",children:"AgentRecallObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass AgentRecallObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents a list of memories recalled by the agent."})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var o=t(6540);const s={},r=o.createContext(s);function a(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4163c636.b29455f8.js b/assets/js/4163c636.b29455f8.js new file mode 100644 index 0000000000..15edbdf8be --- /dev/null +++ b/assets/js/4163c636.b29455f8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9903],{9619:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>t,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var i=s(4848),r=s(8453);const o={sidebar_position:2},t="\ud83e\udd16 LLM Backends",l={id:"usage/llms/llms",title:"\ud83e\udd16 LLM Backends",description:"OpenDevin can work with any LLM backend.",source:"@site/modules/usage/llms/llms.md",sourceDirName:"usage/llms",slug:"/usage/llms/",permalink:"/OpenDevin/modules/usage/llms/",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"\ud83d\udcbb OpenDevin",permalink:"/OpenDevin/modules/usage/intro"},next:{title:"Azure OpenAI LLM",permalink:"/OpenDevin/modules/usage/llms/azureLLMs"}},a={},d=[{value:"Note on Alternative Models",id:"note-on-alternative-models",level:2},{value:"API retries and rate limits",id:"api-retries-and-rate-limits",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"-llm-backends",children:"\ud83e\udd16 LLM Backends"}),"\n",(0,i.jsxs)(n.p,{children:["OpenDevin can work with any LLM backend.\nFor a full list of the LM providers and models available, please consult the\n",(0,i.jsx)(n.a,{href:"https://docs.litellm.ai/docs/providers",children:"litellm documentation"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"OpenDevin will issue many prompts to the LLM you configure. Most of these LLMs cost money--be sure to set spending limits and monitor usage."})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"LLM_MODEL"})," environment variable controls which model is used in programmatic interactions.\nBut when using the OpenDevin UI, you'll need to choose your model in the settings window (the gear\nwheel on the bottom left)."]}),"\n",(0,i.jsx)(n.p,{children:"The following environment variables might be necessary for some LLMs:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_API_KEY"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_BASE_URL"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_EMBEDDING_MODEL"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_EMBEDDING_DEPLOYMENT_NAME"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_API_VERSION"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"We have a few guides for running OpenDevin with specific model providers:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"llms/localLLMs",children:"ollama"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"llms/azureLLMs",children:"Azure"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"If you're using another provider, we encourage you to open a PR to share your setup!"}),"\n",(0,i.jsx)(n.h2,{id:"note-on-alternative-models",children:"Note on Alternative Models"}),"\n",(0,i.jsx)(n.p,{children:"The best models are GPT-4 and Claude 3. Current local and open source models are\nnot nearly as powerful. When using an alternative model,\nyou may see long wait times between messages,\npoor responses, or errors about malformed JSON. OpenDevin\ncan only be as powerful as the models driving it--fortunately folks on our team\nare actively working on building better open source models!"}),"\n",(0,i.jsx)(n.h2,{id:"api-retries-and-rate-limits",children:"API retries and rate limits"}),"\n",(0,i.jsxs)(n.p,{children:["Some LLMs have rate limits and may require retries. OpenDevin will automatically retry requests if it receives a 429 error or API connection error.\nYou can set ",(0,i.jsx)(n.code,{children:"LLM_NUM_RETRIES"}),", ",(0,i.jsx)(n.code,{children:"LLM_RETRY_MIN_WAIT"}),", ",(0,i.jsx)(n.code,{children:"LLM_RETRY_MAX_WAIT"})," environment variables to control the number of retries and the time between retries.\nBy default, ",(0,i.jsx)(n.code,{children:"LLM_NUM_RETRIES"})," is 5 and ",(0,i.jsx)(n.code,{children:"LLM_RETRY_MIN_WAIT"}),", ",(0,i.jsx)(n.code,{children:"LLM_RETRY_MAX_WAIT"})," are 3 seconds and respectively 60 seconds."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>l});var i=s(6540);const r={},o=i.createContext(r);function t(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/44f4e060.cb411b0b.js b/assets/js/44f4e060.cb411b0b.js new file mode 100644 index 0000000000..31c3892f91 --- /dev/null +++ b/assets/js/44f4e060.cb411b0b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8396],{6713:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>r,default:()=>c,frontMatter:()=>o,metadata:()=>p,toc:()=>d});var s=t(4848),i=t(8453);const o={sidebar_label:"jupyter",title:"opendevin.sandbox.plugins.jupyter"},r=void 0,p={id:"python/opendevin/sandbox/plugins/jupyter/__init__",title:"opendevin.sandbox.plugins.jupyter",description:"JupyterRequirement Objects",source:"@site/modules/python/opendevin/sandbox/plugins/jupyter/__init__.md",sourceDirName:"python/opendevin/sandbox/plugins/jupyter",slug:"/python/opendevin/sandbox/plugins/jupyter/__init__",permalink:"/OpenDevin/modules/python/opendevin/sandbox/plugins/jupyter/__init__",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"jupyter",title:"opendevin.sandbox.plugins.jupyter"},sidebar:"apiSidebar",previous:{title:"sandbox",permalink:"/OpenDevin/modules/python/opendevin/sandbox/e2b/sandbox"},next:{title:"mixin",permalink:"/OpenDevin/modules/python/opendevin/sandbox/plugins/mixin"}},u={},d=[{value:"JupyterRequirement Objects",id:"jupyterrequirement-objects",level:2},{value:"host_src",id:"host_src",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"jupyterrequirement-objects",children:"JupyterRequirement Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass JupyterRequirement(PluginRequirement)\n"})}),"\n",(0,s.jsx)(n.h4,{id:"host_src",children:"host_src"}),"\n",(0,s.jsx)(n.p,{children:"The directory of this file (sandbox/plugins/jupyter)"})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>p});var s=t(6540);const i={},o=s.createContext(i);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function p(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/472242d7.9f8ddef6.js b/assets/js/472242d7.9f8ddef6.js deleted file mode 100644 index 07ed13cf2d..0000000000 --- a/assets/js/472242d7.9f8ddef6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2685],{5233:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>a,frontMatter:()=>i,metadata:()=>t,toc:()=>c});var r=l(4848),s=l(8453);const i={sidebar_label:"logger",title:"logger"},o=void 0,t={id:"python/logger",title:"logger",description:"get\\console\\handler",source:"@site/docs/python/logger.md",sourceDirName:"python",slug:"/python/logger",permalink:"/OpenDevin/docs/python/logger",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"logger",title:"logger"}},d={},c=[{value:"get_console_handler",id:"get_console_handler",level:4},{value:"get_file_handler",id:"get_file_handler",level:4},{value:"log_uncaught_exceptions",id:"log_uncaught_exceptions",level:4},{value:"LlmFileHandler Objects",id:"llmfilehandler-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"emit",id:"emit",level:4},{value:"get_llm_prompt_file_handler",id:"get_llm_prompt_file_handler",level:4},{value:"get_llm_response_file_handler",id:"get_llm_response_file_handler",level:4}];function h(e){const n={code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h4,{id:"get_console_handler",children:"get_console_handler"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def get_console_handler()\n"})}),"\n",(0,r.jsx)(n.p,{children:"Returns a console handler for logging."}),"\n",(0,r.jsx)(n.h4,{id:"get_file_handler",children:"get_file_handler"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def get_file_handler()\n"})}),"\n",(0,r.jsx)(n.p,{children:"Returns a file handler for logging."}),"\n",(0,r.jsx)(n.h4,{id:"log_uncaught_exceptions",children:"log_uncaught_exceptions"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def log_uncaught_exceptions(ex_cls, ex, tb)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Logs uncaught exceptions along with the traceback."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ex_cls"})," ",(0,r.jsx)(n.em,{children:"type"})," - The type of the exception."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"ex"})," ",(0,r.jsx)(n.em,{children:"Exception"})," - The exception instance."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"tb"})," ",(0,r.jsx)(n.em,{children:"traceback"})," - The traceback object."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"None"}),"\n",(0,r.jsx)(n.h2,{id:"llmfilehandler-objects",children:"LlmFileHandler Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class LlmFileHandler(logging.FileHandler)\n"})}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"LLM prompt and response logging"})}),"\n",(0,r.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def __init__(filename, mode='a', encoding='utf-8', delay=False)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Initializes an instance of LlmFileHandler."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"filename"})," ",(0,r.jsx)(n.em,{children:"str"})," - The name of the log file."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"mode"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - The file mode. Defaults to 'a'."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"encoding"})," ",(0,r.jsx)(n.em,{children:"str, optional"})," - The file encoding. Defaults to None."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"delay"})," ",(0,r.jsx)(n.em,{children:"bool, optional"})," - Whether to delay file opening. Defaults to False."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"emit",children:"emit"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def emit(record)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Emits a log record."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"record"})," ",(0,r.jsx)(n.em,{children:"logging.LogRecord"})," - The log record to emit."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"get_llm_prompt_file_handler",children:"get_llm_prompt_file_handler"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def get_llm_prompt_file_handler()\n"})}),"\n",(0,r.jsx)(n.p,{children:"Returns a file handler for LLM prompt logging."}),"\n",(0,r.jsx)(n.h4,{id:"get_llm_response_file_handler",children:"get_llm_response_file_handler"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def get_llm_response_file_handler()\n"})}),"\n",(0,r.jsx)(n.p,{children:"Returns a file handler for LLM response logging."})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453:(e,n,l)=>{l.d(n,{R:()=>o,x:()=>t});var r=l(6540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4753dddc.21d84c05.js b/assets/js/4753dddc.21d84c05.js deleted file mode 100644 index ca7d48049d..0000000000 --- a/assets/js/4753dddc.21d84c05.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5463],{1634:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var s=n(4848),l=n(8453);const i={sidebar_label:"listen",title:"server.listen"},r=void 0,o={id:"python/server/listen",title:"server.listen",description:"get\\litellm\\models",source:"@site/docs/python/server/listen.md",sourceDirName:"python/server",slug:"/python/server/listen",permalink:"/OpenDevin/docs/python/server/listen",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"listen",title:"server.listen"}},a={},c=[{value:"get_litellm_models",id:"get_litellm_models",level:4},{value:"get_agents",id:"get_agents",level:4},{value:"get_token",id:"get_token",level:4}];function d(e){const t={code:"code",h4:"h4",p:"p",pre:"pre",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h4,{id:"get_litellm_models",children:"get_litellm_models"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"@app.get('/api/litellm-models')\nasync def get_litellm_models()\n"})}),"\n",(0,s.jsx)(t.p,{children:"Get all models supported by LiteLLM."}),"\n",(0,s.jsx)(t.h4,{id:"get_agents",children:"get_agents"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"@app.get('/api/agents')\nasync def get_agents()\n"})}),"\n",(0,s.jsx)(t.p,{children:"Get all agents supported by LiteLLM."}),"\n",(0,s.jsx)(t.h4,{id:"get_token",children:"get_token"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"@app.get('/api/auth')\nasync def get_token(\n credentials: HTTPAuthorizationCredentials = Depends(security_scheme))\n"})}),"\n",(0,s.jsx)(t.p,{children:"Generate a JWT for authentication when starting a WebSocket connection. This endpoint checks if valid credentials\nare provided and uses them to get a session ID. If no valid credentials are provided, it generates a new session ID."})]})}function p(e={}){const{wrapper:t}={...(0,l.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>o});var s=n(6540);const l={},i=s.createContext(l);function r(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/48209c71.2a61a013.js b/assets/js/48209c71.2a61a013.js deleted file mode 100644 index 8c67215990..0000000000 --- a/assets/js/48209c71.2a61a013.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4817],{2595:(n,i,e)=>{e.r(i),e.d(i,{assets:()=>c,contentTitle:()=>l,default:()=>a,frontMatter:()=>o,metadata:()=>r,toc:()=>u});var t=e(4848),s=e(8453);const o={sidebar_label:"mixin",title:"sandbox.plugins.mixin"},l=void 0,r={id:"python/sandbox/plugins/mixin",title:"sandbox.plugins.mixin",description:"PluginMixin Objects",source:"@site/docs/python/sandbox/plugins/mixin.md",sourceDirName:"python/sandbox/plugins",slug:"/python/sandbox/plugins/mixin",permalink:"/OpenDevin/docs/python/sandbox/plugins/mixin",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"mixin",title:"sandbox.plugins.mixin"}},c={},u=[{value:"PluginMixin Objects",id:"pluginmixin-objects",level:2},{value:"init_plugins",id:"init_plugins",level:4}];function p(n){const i={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...n.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.h2,{id:"pluginmixin-objects",children:"PluginMixin Objects"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-python",children:"class PluginMixin()\n"})}),"\n",(0,t.jsx)(i.p,{children:"Mixin for Sandbox to support plugins."}),"\n",(0,t.jsx)(i.h4,{id:"init_plugins",children:"init_plugins"}),"\n",(0,t.jsx)(i.pre,{children:(0,t.jsx)(i.code,{className:"language-python",children:"def init_plugins(requirements: List[PluginRequirement])\n"})}),"\n",(0,t.jsx)(i.p,{children:"Load a plugin into the sandbox."})]})}function a(n={}){const{wrapper:i}={...(0,s.R)(),...n.components};return i?(0,t.jsx)(i,{...n,children:(0,t.jsx)(p,{...n})}):p(n)}},8453:(n,i,e)=>{e.d(i,{R:()=>l,x:()=>r});var t=e(6540);const s={},o=t.createContext(s);function l(n){const i=t.useContext(o);return t.useMemo((function(){return"function"==typeof n?n(i):{...i,...n}}),[i,n])}function r(n){let i;return i=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:l(n.components),t.createElement(o.Provider,{value:i},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/48804a35.0b1e958e.js b/assets/js/48804a35.0b1e958e.js deleted file mode 100644 index 8537d49fb8..0000000000 --- a/assets/js/48804a35.0b1e958e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5886],{296:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>s,default:()=>d,frontMatter:()=>c,metadata:()=>a,toc:()=>l});var o=t(4848),i=t(8453);const c={sidebar_label:"base",title:"opendevin.action.base"},s=void 0,a={id:"python/opendevin/action/base",title:"opendevin.action.base",description:"NullAction Objects",source:"@site/docs/python/opendevin/action/base.md",sourceDirName:"python/opendevin/action",slug:"/python/opendevin/action/base",permalink:"/OpenDevin/docs/python/opendevin/action/base",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"base",title:"opendevin.action.base"},sidebar:"apiSidebar",previous:{title:"action",permalink:"/OpenDevin/docs/python/opendevin/action/__init__"},next:{title:"fileop",permalink:"/OpenDevin/docs/python/opendevin/action/fileop"}},r={},l=[{value:"NullAction Objects",id:"nullaction-objects",level:2}];function p(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"nullaction-objects",children:"NullAction Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass NullAction(NotExecutableAction)\n"})}),"\n",(0,o.jsx)(n.p,{children:"An action that does nothing."})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>a});var o=t(6540);const i={},c=o.createContext(i);function s(e){const n=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4b879815.7c82a774.js b/assets/js/4b879815.7c82a774.js deleted file mode 100644 index d09c4f84fd..0000000000 --- a/assets/js/4b879815.7c82a774.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8979],{2443:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var t=s(4848),o=s(8453);const a={sidebar_label:"base",title:"observation.base"},r=void 0,i={id:"python/observation/base",title:"observation.base",description:"Observation Objects",source:"@site/docs/python/observation/base.md",sourceDirName:"python/observation",slug:"/python/observation/base",permalink:"/OpenDevin/docs/python/observation/base",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"base",title:"observation.base"}},c={},l=[{value:"Observation Objects",id:"observation-objects",level:2},{value:"to_dict",id:"to_dict",level:4},{value:"to_memory",id:"to_memory",level:4},{value:"message",id:"message",level:4},{value:"NullObservation Objects",id:"nullobservation-objects",level:2}];function d(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"observation-objects",children:"Observation Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass Observation()\n"})}),"\n",(0,t.jsx)(n.p,{children:"This data class represents an observation of the environment."}),"\n",(0,t.jsx)(n.h4,{id:"to_dict",children:"to_dict"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def to_dict() -> dict\n"})}),"\n",(0,t.jsx)(n.p,{children:"Converts the observation to a dictionary and adds user message."}),"\n",(0,t.jsx)(n.h4,{id:"to_memory",children:"to_memory"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def to_memory() -> dict\n"})}),"\n",(0,t.jsx)(n.p,{children:"Converts the observation to a dictionary."}),"\n",(0,t.jsx)(n.h4,{id:"message",children:"message"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@property\ndef message() -> str\n"})}),"\n",(0,t.jsx)(n.p,{children:"Returns a message describing the observation."}),"\n",(0,t.jsx)(n.h2,{id:"nullobservation-objects",children:"NullObservation Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass NullObservation(Observation)\n"})}),"\n",(0,t.jsx)(n.p,{children:"This data class represents a null observation.\nThis is used when the produced action is NOT executable."})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>i});var t=s(6540);const o={},a=t.createContext(o);function r(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4bbfebcc.c4983eae.js b/assets/js/4bbfebcc.c4983eae.js deleted file mode 100644 index 46628b6278..0000000000 --- a/assets/js/4bbfebcc.c4983eae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2934],{5247:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var i=t(4848),s=t(8453);const o={sidebar_position:5},r="\ud83d\udcda Misc",a={id:"usage/about",title:"\ud83d\udcda Misc",description:"\u2b50\ufe0f Research Strategy",source:"@site/docs/usage/about.md",sourceDirName:"usage",slug:"/usage/about",permalink:"/OpenDevin/docs/usage/about",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"docsSidebar",previous:{title:"Notes for Windows and WSL Users",permalink:"/OpenDevin/docs/usage/troubleshooting/windows"}},l={},c=[{value:"\u2b50\ufe0f Research Strategy",id:"\ufe0f-research-strategy",level:2},{value:"\ud83d\udea7 Default Agent",id:"-default-agent",level:2},{value:"\ud83e\udd1d How to Contribute",id:"-how-to-contribute",level:2},{value:"\ud83e\udd16 Join Our Community",id:"-join-our-community",level:2},{value:"\ud83d\udee0\ufe0f Built With",id:"\ufe0f-built-with",level:2},{value:"\ud83d\udcdc License",id:"-license",level:2}];function d(e){const n={a:"a",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"-misc",children:"\ud83d\udcda Misc"}),"\n",(0,i.jsx)(n.h2,{id:"\ufe0f-research-strategy",children:"\u2b50\ufe0f Research Strategy"}),"\n",(0,i.jsx)(n.p,{children:"Achieving full replication of production-grade applications with LLMs is a complex endeavor. Our strategy involves:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Core Technical Research:"})," Focusing on foundational research to understand and improve the technical aspects of code generation and handling."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Specialist Abilities:"})," Enhancing the effectiveness of core components through data curation, training methods, and more."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Task Planning:"})," Developing capabilities for bug detection, codebase management, and optimization."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Evaluation:"})," Establishing comprehensive evaluation metrics to better understand and improve our models."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"-default-agent",children:"\ud83d\udea7 Default Agent"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Our default Agent is currently the MonologueAgent, which has limited capabilities, but is fairly stable. We're working on other Agent implementations, including ",(0,i.jsx)(n.a,{href:"https://swe-agent.com/",children:"SWE Agent"}),". You can ",(0,i.jsx)(n.a,{href:"./agents",children:"read about our current set of agents here"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"-how-to-contribute",children:"\ud83e\udd1d How to Contribute"}),"\n",(0,i.jsx)(n.p,{children:"OpenDevin 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:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Code Contributions:"})," Help us develop the core functionalities, frontend interface, or sandboxing solutions."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Research and Evaluation:"})," Contribute to our understanding of LLMs in software engineering, participate in evaluating the models, or suggest improvements."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Feedback and Testing:"})," Use the OpenDevin toolset, report bugs, suggest features, or provide feedback on usability."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For details, please check ",(0,i.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/blob/main/CONTRIBUTING.md",children:"this document"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"-join-our-community",children:"\ud83e\udd16 Join Our Community"}),"\n",(0,i.jsx)(n.p,{children:"Now we have both Slack workspace for the collaboration on building OpenDevin and Discord server for discussion about anything related, e.g., this project, LLM, agent, etc."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://join.slack.com/t/opendevin/shared_invite/zt-2etftj1dd-X1fDL2PYIVpsmJZkqEYANw",children:"Slack workspace"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://discord.gg/mBuDGRzzES",children:"Discord server"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["If you would love to contribute, feel free to join our community (note that now there is no need to fill in the ",(0,i.jsx)(n.a,{href:"https://forms.gle/758d5p6Ve8r2nxxq6",children:"form"}),"). Let's simplify software engineering together!"]}),"\n",(0,i.jsxs)(n.p,{children:["\ud83d\udc1a ",(0,i.jsx)(n.strong,{children:"Code less, make more with OpenDevin."})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://star-history.com/#OpenDevin/OpenDevin&Date",children:(0,i.jsx)(n.img,{src:"https://api.star-history.com/svg?repos=OpenDevin/OpenDevin&type=Date",alt:"Star History Chart"})})}),"\n",(0,i.jsx)(n.h2,{id:"\ufe0f-built-with",children:"\ud83d\udee0\ufe0f Built With"}),"\n",(0,i.jsx)(n.p,{children:"OpenDevin 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:"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/FastAPI-black?style=for-the-badge",alt:"FastAPI"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/uvicorn-black?style=for-the-badge",alt:"uvicorn"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/LiteLLM-black?style=for-the-badge",alt:"LiteLLM"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/Docker-black?style=for-the-badge",alt:"Docker"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/Ruff-black?style=for-the-badge",alt:"Ruff"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/MyPy-black?style=for-the-badge",alt:"MyPy"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/LlamaIndex-black?style=for-the-badge",alt:"LlamaIndex"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/React-black?style=for-the-badge",alt:"React"})]}),"\n",(0,i.jsx)(n.p,{children:"Please 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 OpenDevin."}),"\n",(0,i.jsx)(n.h2,{id:"-license",children:"\ud83d\udcdc License"}),"\n",(0,i.jsxs)(n.p,{children:["Distributed under the MIT License. See ",(0,i.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE",children:"our license"})," for more information."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(6540);const s={},o=i.createContext(s);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4c9dbbde.25cbece4.js b/assets/js/4c9dbbde.25cbece4.js new file mode 100644 index 0000000000..894d09932f --- /dev/null +++ b/assets/js/4c9dbbde.25cbece4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9086],{5184:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var t=n(4848),o=n(8453);const a={sidebar_label:"message",title:"opendevin.observation.message"},r=void 0,i={id:"python/opendevin/observation/message",title:"opendevin.observation.message",description:"UserMessageObservation Objects",source:"@site/modules/python/opendevin/observation/message.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/message",permalink:"/OpenDevin/modules/python/opendevin/observation/message",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"message",title:"opendevin.observation.message"},sidebar:"apiSidebar",previous:{title:"files",permalink:"/OpenDevin/modules/python/opendevin/observation/files"},next:{title:"recall",permalink:"/OpenDevin/modules/python/opendevin/observation/recall"}},c={},l=[{value:"UserMessageObservation Objects",id:"usermessageobservation-objects",level:2},{value:"AgentMessageObservation Objects",id:"agentmessageobservation-objects",level:2}];function d(e){const s={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h2,{id:"usermessageobservation-objects",children:"UserMessageObservation Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"@dataclass\nclass UserMessageObservation(Observation)\n"})}),"\n",(0,t.jsx)(s.p,{children:"This data class represents a message sent by the user."}),"\n",(0,t.jsx)(s.h2,{id:"agentmessageobservation-objects",children:"AgentMessageObservation Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"@dataclass\nclass AgentMessageObservation(Observation)\n"})}),"\n",(0,t.jsx)(s.p,{children:"This data class represents a message sent by the agent."})]})}function p(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>i});var t=n(6540);const o={},a=t.createContext(o);function r(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4e1accd0.174b9c22.js b/assets/js/4e1accd0.174b9c22.js new file mode 100644 index 0000000000..1aa374ea9a --- /dev/null +++ b/assets/js/4e1accd0.174b9c22.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9270],{9230:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>c,default:()=>a,frontMatter:()=>s,metadata:()=>r,toc:()=>l});var i=t(4848),o=t(8453);const s={sidebar_label:"github",title:"opendevin.action.github"},c=void 0,r={id:"python/opendevin/action/github",title:"opendevin.action.github",description:"GitHubPushAction Objects",source:"@site/modules/python/opendevin/action/github.md",sourceDirName:"python/opendevin/action",slug:"/python/opendevin/action/github",permalink:"/OpenDevin/modules/python/opendevin/action/github",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"github",title:"opendevin.action.github"},sidebar:"apiSidebar",previous:{title:"fileop",permalink:"/OpenDevin/modules/python/opendevin/action/fileop"},next:{title:"tasks",permalink:"/OpenDevin/modules/python/opendevin/action/tasks"}},h={},l=[{value:"GitHubPushAction Objects",id:"githubpushaction-objects",level:2},{value:"GitHubSendPRAction Objects",id:"githubsendpraction-objects",level:2}];function d(e){const n={code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"githubpushaction-objects",children:"GitHubPushAction Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass GitHubPushAction(ExecutableAction)\n"})}),"\n",(0,i.jsx)(n.p,{children:"This pushes the current branch to github."}),"\n",(0,i.jsx)(n.p,{children:"To use this, you need to set the GITHUB_TOKEN environment variable.\nThe agent will return a message with a URL that you can click to make a pull\nrequest."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Attributes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"owner"})," - The owner of the source repo"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"repo"})," - The name of the source repo"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"branch"})," - The branch to push"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"action"})," - The action identifier"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"githubsendpraction-objects",children:"GitHubSendPRAction Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass GitHubSendPRAction(ExecutableAction)\n"})}),"\n",(0,i.jsx)(n.p,{children:"An action to send a github PR."}),"\n",(0,i.jsx)(n.p,{children:"To use this, you need to set the GITHUB_TOKEN environment variable."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Attributes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"owner"})," - The owner of the source repo"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"repo"})," - The name of the source repo"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"title"})," - The title of the PR"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"head"})," - The branch to send the PR from"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"head_repo"})," - The repo to send the PR from"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"base"})," - The branch to send the PR to"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"body"})," - The body of the PR"]}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>r});var i=t(6540);const o={},s=i.createContext(o);function c(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4e85c74e.f6d5aca0.js b/assets/js/4e85c74e.f6d5aca0.js new file mode 100644 index 0000000000..b098fef22e --- /dev/null +++ b/assets/js/4e85c74e.f6d5aca0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6528],{8305:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>g,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=t(4848),s=t(8453);const a={sidebar_label:"manager",title:"opendevin.server.agent.manager"},i=void 0,o={id:"python/opendevin/server/agent/manager",title:"opendevin.server.agent.manager",description:"AgentManager Objects",source:"@site/modules/python/opendevin/server/agent/manager.md",sourceDirName:"python/opendevin/server/agent",slug:"/python/opendevin/server/agent/manager",permalink:"/OpenDevin/modules/python/opendevin/server/agent/manager",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"manager",title:"opendevin.server.agent.manager"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/modules/python/opendevin/server/agent/"},next:{title:"auth",permalink:"/OpenDevin/modules/python/opendevin/server/auth/"}},c={},d=[{value:"AgentManager Objects",id:"agentmanager-objects",level:2},{value:"register_agent",id:"register_agent",level:4},{value:"dispatch",id:"dispatch",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"agentmanager-objects",children:"AgentManager Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class AgentManager()\n"})}),"\n",(0,r.jsx)(n.h4,{id:"register_agent",children:"register_agent"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def register_agent(sid: str)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Registers a new agent."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"sid"})," - The session ID of the agent."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"dispatch",children:"dispatch"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def dispatch(sid: str, action: str | None, data: dict)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Dispatches actions to the agent from the client."})]})}function g(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var r=t(6540);const s={},a=r.createContext(s);function i(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/52071558.b86c6afc.js b/assets/js/52071558.b86c6afc.js deleted file mode 100644 index 68498ef7da..0000000000 --- a/assets/js/52071558.b86c6afc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[144],{3858:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>t,metadata:()=>c,toc:()=>a});var o=n(4848),r=n(8453);const t={sidebar_label:"session",title:"server.session.session"},i=void 0,c={id:"python/server/session/session",title:"server.session.session",description:"Session Objects",source:"@site/docs/python/server/session/session.md",sourceDirName:"python/server/session",slug:"/python/server/session/",permalink:"/OpenDevin/docs/python/server/session/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"session",title:"server.session.session"}},d={},a=[{value:"Session Objects",id:"session-objects",level:2},{value:"send_error",id:"send_error",level:4},{value:"send_message",id:"send_message",level:4}];function l(e){const s={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h2,{id:"session-objects",children:"Session Objects"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-python",children:"class Session()\n"})}),"\n",(0,o.jsx)(s.h4,{id:"send_error",children:"send_error"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-python",children:"async def send_error(message: str) -> bool\n"})}),"\n",(0,o.jsx)(s.p,{children:"Sends an error message to the client."}),"\n",(0,o.jsx)(s.h4,{id:"send_message",children:"send_message"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-python",children:"async def send_message(message: str) -> bool\n"})}),"\n",(0,o.jsx)(s.p,{children:"Sends a message to the client."})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>c});var o=n(6540);const r={},t=o.createContext(r);function i(e){const s=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5246e7a7.83c0da27.js b/assets/js/5246e7a7.83c0da27.js deleted file mode 100644 index dd0d11a99e..0000000000 --- a/assets/js/5246e7a7.83c0da27.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[700],{3463:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>c,metadata:()=>a,toc:()=>r});var o=n(4848),i=n(8453);const c={sidebar_label:"fileop",title:"action.fileop"},s=void 0,a={id:"python/action/fileop",title:"action.fileop",description:"FileReadAction Objects",source:"@site/docs/python/action/fileop.md",sourceDirName:"python/action",slug:"/python/action/fileop",permalink:"/OpenDevin/docs/python/action/fileop",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"fileop",title:"action.fileop"}},l={},r=[{value:"FileReadAction Objects",id:"filereadaction-objects",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"filereadaction-objects",children:"FileReadAction Objects"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass FileReadAction(ExecutableAction)\n"})}),"\n",(0,o.jsx)(t.p,{children:"Reads a file from a given path.\nCan be set to read specific lines using start and end\nDefault lines 0:-1 (whole file)"})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>a});var o=n(6540);const i={},c=o.createContext(i);function s(e){const t=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/52494f92.8b7c8146.js b/assets/js/52494f92.8b7c8146.js new file mode 100644 index 0000000000..751b7827eb --- /dev/null +++ b/assets/js/52494f92.8b7c8146.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2472],{4884:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var r=s(4848),t=s(8453);const o={sidebar_label:"manager",title:"opendevin.server.session.manager"},a=void 0,i={id:"python/opendevin/server/session/manager",title:"opendevin.server.session.manager",description:"SessionManager Objects",source:"@site/modules/python/opendevin/server/session/manager.md",sourceDirName:"python/opendevin/server/session",slug:"/python/opendevin/server/session/manager",permalink:"/OpenDevin/modules/python/opendevin/server/session/manager",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"manager",title:"opendevin.server.session.manager"},sidebar:"apiSidebar",previous:{title:"auth",permalink:"/OpenDevin/modules/python/opendevin/server/auth/"},next:{title:"msg_stack",permalink:"/OpenDevin/modules/python/opendevin/server/session/msg_stack"}},d={},c=[{value:"SessionManager Objects",id:"sessionmanager-objects",level:2},{value:"send",id:"send",level:4},{value:"send_error",id:"send_error",level:4},{value:"send_message",id:"send_message",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"sessionmanager-objects",children:"SessionManager Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class SessionManager()\n"})}),"\n",(0,r.jsx)(n.h4,{id:"send",children:"send"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def send(sid: str, data: Dict[str, object]) -> bool\n"})}),"\n",(0,r.jsx)(n.p,{children:"Sends data to the client."}),"\n",(0,r.jsx)(n.h4,{id:"send_error",children:"send_error"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def send_error(sid: str, message: str) -> bool\n"})}),"\n",(0,r.jsx)(n.p,{children:"Sends an error message to the client."}),"\n",(0,r.jsx)(n.h4,{id:"send_message",children:"send_message"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def send_message(sid: str, message: str) -> bool\n"})}),"\n",(0,r.jsx)(n.p,{children:"Sends a message to the client."})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>i});var r=s(6540);const t={},o=r.createContext(t);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5412fff2.0b577b85.js b/assets/js/5412fff2.0b577b85.js deleted file mode 100644 index dc61c191b9..0000000000 --- a/assets/js/5412fff2.0b577b85.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1033],{1512:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var r=t(4848),o=t(8453);const s={sidebar_label:"memory",title:"monologue_agent.utils.memory"},i=void 0,l={id:"python/monologue_agent/utils/memory",title:"monologue_agent.utils.memory",description:"LongTermMemory Objects",source:"@site/docs/python/monologue_agent/utils/memory.md",sourceDirName:"python/monologue_agent/utils",slug:"/python/monologue_agent/utils/memory",permalink:"/OpenDevin/docs/python/monologue_agent/utils/memory",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"memory",title:"monologue_agent.utils.memory"}},c={},d=[{value:"LongTermMemory Objects",id:"longtermmemory-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"add_event",id:"add_event",level:4},{value:"search",id:"search",level:4}];function a(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"longtermmemory-objects",children:"LongTermMemory Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class LongTermMemory()\n"})}),"\n",(0,r.jsx)(n.p,{children:"Responsible for storing information that the agent can call on later for better insights and context.\nUses chromadb to store and search through memories."}),"\n",(0,r.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def __init__()\n"})}),"\n",(0,r.jsx)(n.p,{children:"Initialize the chromadb and set up ChromaVectorStore for later use."}),"\n",(0,r.jsx)(n.h4,{id:"add_event",children:"add_event"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def add_event(event: dict)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Adds a new event to the long term memory with a unique id."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"event (dict): The new event to be added to memory"}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"search",children:"search"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def search(query: str, k: int = 10)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Searches through the current memory using VectorIndexRetriever"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"query (str): A query to match search results to"}),"\n",(0,r.jsx)(n.li,{children:"k (int): Number of top results to return"}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"List[str]: List of top k results found in current memory"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var r=t(6540);const o={},s=r.createContext(o);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5493cb6f.41e3ee08.js b/assets/js/5493cb6f.41e3ee08.js deleted file mode 100644 index 05fc49e8b2..0000000000 --- a/assets/js/5493cb6f.41e3ee08.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9303],{2560:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var i=t(4848),o=t(8453);const s={sidebar_position:1},r="\ud83d\udcbb OpenDevin",a={id:"usage/intro",title:"\ud83d\udcbb OpenDevin",description:"OpenDevin is an autonomous AI software engineer capable of executing complex engineering tasks and collaborating actively with users on software development projects.",source:"@site/docs/usage/intro.mdx",sourceDirName:"usage",slug:"/usage/intro",permalink:"/OpenDevin/docs/usage/intro",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",next:{title:"\ud83e\udd16 LLM Backends",permalink:"/OpenDevin/docs/usage/llms/"}},d={},c=[{value:"\ud83d\udee0\ufe0f Getting Started",id:"\ufe0f-getting-started",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"-opendevin",children:"\ud83d\udcbb OpenDevin"}),"\n",(0,i.jsxs)(n.p,{children:["OpenDevin is an ",(0,i.jsx)(n.strong,{children:"autonomous AI software engineer"})," capable of executing complex engineering tasks and collaborating actively with users on software development projects.\nThis project is fully open-source, so you can use and modify it however you like."]}),"\n",(0,i.jsxs)(n.admonition,{type:"tip",children:[(0,i.jsxs)(n.p,{children:["Explore the codebase of OpenDevin on ",(0,i.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin",children:"GitHub"})," or join one of our communities!"]}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/graphs/contributors",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge",alt:"Contributors"})}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/network/members",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge",alt:"Forks"})}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/stargazers",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge",alt:"Stargazers"})}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/issues",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge",alt:"Issues"})}),(0,i.jsx)("br",{}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge",alt:"MIT License"})}),(0,i.jsx)("br",{}),(0,i.jsx)("a",{href:"https://join.slack.com/t/opendevin/shared_invite/zt-2etftj1dd-X1fDL2PYIVpsmJZkqEYANw",children:(0,i.jsx)("img",{src:"https://img.shields.io/badge/Slack-Join%20Us-red?logo=slack&logoColor=white&style=for-the-badge",alt:"Join our Slack community"})}),(0,i.jsx)("a",{href:"https://discord.gg/mBuDGRzzES",children:(0,i.jsx)("img",{src:"https://img.shields.io/badge/Discord-Join%20Us-purple?logo=discord&logoColor=white&style=for-the-badge",alt:"Join our Discord community"})})]}),"\n",(0,i.jsx)(n.h2,{id:"\ufe0f-getting-started",children:"\ud83d\udee0\ufe0f Getting Started"}),"\n",(0,i.jsx)(n.p,{children:"The easiest way to run OpenDevin is inside a Docker container."}),"\n",(0,i.jsxs)(n.p,{children:["To start the app, run these commands, replacing ",(0,i.jsx)(n.code,{children:"$(pwd)/workspace"})," with the path to the code you want OpenDevin to work with."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'# Your OpenAI API key, or any other LLM API key\nexport LLM_API_KEY="sk-..."\n'})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"# The directory you want OpenDevin to modify.\n# MUST be an absolute path!\nexport WORKSPACE_BASE=$(pwd)/workspace\n"})}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"OpenDevin runs bash commands within a Docker sandbox, so it should not affect your machine. But your workspace directory will be attached to that sandbox, and files in the directory may be modified or deleted."})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"docker run \\\n -e LLM_API_KEY \\\n -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \\\n -v $WORKSPACE_BASE:/opt/workspace_base \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -p 3000:3000 \\\n --add-host host.docker.internal=host-gateway \\\n ghcr.io/opendevin/opendevin:0.4.0\n"})}),"\n",(0,i.jsxs)(n.p,{children:["You'll find opendevin running at ",(0,i.jsx)(n.a,{href:"http://localhost:3000",children:"http://localhost:3000"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["If you want to use the ",(0,i.jsx)(n.strong,{children:"(unstable!)"})," bleeding edge, you can use ",(0,i.jsx)(n.code,{children:"ghcr.io/opendevin/opendevin:main"})," as the image (last line)."]})}),"\n",(0,i.jsx)(n.p,{children:"See Development.md for instructions on running OpenDevin without Docker."}),"\n",(0,i.jsx)(n.p,{children:"Having trouble? Check out our Troubleshooting Guide."}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"OpenDevin is currently a work in progress, but you can already run the alpha version to see the end-to-end system in action."})})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(6540);const o={},s=i.createContext(o);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/54d6b847.66a8001e.js b/assets/js/54d6b847.66a8001e.js deleted file mode 100644 index e446fe36f5..0000000000 --- a/assets/js/54d6b847.66a8001e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7251],{2273:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>a,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var r=t(4848),s=t(8453);const o={sidebar_label:"files",title:"opendevin.files"},i=void 0,c={id:"python/opendevin/files",title:"opendevin.files",description:"WorkspaceFile Objects",source:"@site/docs/python/opendevin/files.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/files",permalink:"/OpenDevin/docs/python/opendevin/files",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"files",title:"opendevin.files"},sidebar:"apiSidebar",previous:{title:"config",permalink:"/OpenDevin/docs/python/opendevin/config"},next:{title:"logger",permalink:"/OpenDevin/docs/python/opendevin/logger"}},l={},d=[{value:"WorkspaceFile Objects",id:"workspacefile-objects",level:2},{value:"to_dict",id:"to_dict",level:4},{value:"get_folder_structure",id:"get_folder_structure",level:4}];function p(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"workspacefile-objects",children:"WorkspaceFile Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class WorkspaceFile()\n"})}),"\n",(0,r.jsx)(n.h4,{id:"to_dict",children:"to_dict"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def to_dict() -> Dict[str, Any]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Converts the File object to a dictionary."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"The dictionary representation of the File object."}),"\n",(0,r.jsx)(n.h4,{id:"get_folder_structure",children:"get_folder_structure"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def get_folder_structure(workdir: Path) -> WorkspaceFile\n"})}),"\n",(0,r.jsx)(n.p,{children:"Gets the folder structure of a directory."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"workdir"})," - The directory path."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"The folder structure."})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var r=t(6540);const s={},o=r.createContext(s);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5508b0af.e79bfe74.js b/assets/js/5508b0af.e79bfe74.js new file mode 100644 index 0000000000..db55f26b6a --- /dev/null +++ b/assets/js/5508b0af.e79bfe74.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9722],{7688:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var i=t(4848),o=t(8453);const s={sidebar_position:1},r="\ud83d\udcbb OpenDevin",a={id:"usage/intro",title:"\ud83d\udcbb OpenDevin",description:"OpenDevin is an autonomous AI software engineer capable of executing complex engineering tasks and collaborating actively with users on software development projects.",source:"@site/modules/usage/intro.mdx",sourceDirName:"usage",slug:"/usage/intro",permalink:"/OpenDevin/modules/usage/intro",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"docsSidebar",next:{title:"\ud83e\udd16 LLM Backends",permalink:"/OpenDevin/modules/usage/llms/"}},d={},c=[{value:"\ud83d\udee0\ufe0f Getting Started",id:"\ufe0f-getting-started",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"-opendevin",children:"\ud83d\udcbb OpenDevin"}),"\n",(0,i.jsxs)(n.p,{children:["OpenDevin is an ",(0,i.jsx)(n.strong,{children:"autonomous AI software engineer"})," capable of executing complex engineering tasks and collaborating actively with users on software development projects.\nThis project is fully open-source, so you can use and modify it however you like."]}),"\n",(0,i.jsxs)(n.admonition,{type:"tip",children:[(0,i.jsxs)(n.p,{children:["Explore the codebase of OpenDevin on ",(0,i.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin",children:"GitHub"})," or join one of our communities!"]}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/graphs/contributors",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/contributors/opendevin/opendevin?style=for-the-badge",alt:"Contributors"})}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/network/members",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/forks/opendevin/opendevin?style=for-the-badge",alt:"Forks"})}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/stargazers",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/stars/opendevin/opendevin?style=for-the-badge",alt:"Stargazers"})}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/issues",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/issues/opendevin/opendevin?style=for-the-badge",alt:"Issues"})}),(0,i.jsx)("br",{}),(0,i.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE",children:(0,i.jsx)("img",{src:"https://img.shields.io/github/license/opendevin/opendevin?style=for-the-badge",alt:"MIT License"})}),(0,i.jsx)("br",{}),(0,i.jsx)("a",{href:"https://join.slack.com/t/opendevin/shared_invite/zt-2etftj1dd-X1fDL2PYIVpsmJZkqEYANw",children:(0,i.jsx)("img",{src:"https://img.shields.io/badge/Slack-Join%20Us-red?logo=slack&logoColor=white&style=for-the-badge",alt:"Join our Slack community"})}),(0,i.jsx)("a",{href:"https://discord.gg/mBuDGRzzES",children:(0,i.jsx)("img",{src:"https://img.shields.io/badge/Discord-Join%20Us-purple?logo=discord&logoColor=white&style=for-the-badge",alt:"Join our Discord community"})})]}),"\n",(0,i.jsx)(n.h2,{id:"\ufe0f-getting-started",children:"\ud83d\udee0\ufe0f Getting Started"}),"\n",(0,i.jsx)(n.p,{children:"The easiest way to run OpenDevin is inside a Docker container."}),"\n",(0,i.jsxs)(n.p,{children:["To start the app, run these commands, replacing ",(0,i.jsx)(n.code,{children:"$(pwd)/workspace"})," with the path to the code you want OpenDevin to work with."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:'# Your OpenAI API key, or any other LLM API key\nexport LLM_API_KEY="sk-..."\n'})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"# The directory you want OpenDevin to modify.\n# MUST be an absolute path!\nexport WORKSPACE_BASE=$(pwd)/workspace\n"})}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"OpenDevin runs bash commands within a Docker sandbox, so it should not affect your machine. But your workspace directory will be attached to that sandbox, and files in the directory may be modified or deleted."})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"docker run \\\n -e LLM_API_KEY \\\n -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \\\n -v $WORKSPACE_BASE:/opt/workspace_base \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -p 3000:3000 \\\n --add-host host.docker.internal=host-gateway \\\n ghcr.io/opendevin/opendevin:0.4.0\n"})}),"\n",(0,i.jsxs)(n.p,{children:["You'll find opendevin running at ",(0,i.jsx)(n.a,{href:"http://localhost:3000",children:"http://localhost:3000"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["If you want to use the ",(0,i.jsx)(n.strong,{children:"(unstable!)"})," bleeding edge, you can use ",(0,i.jsx)(n.code,{children:"ghcr.io/opendevin/opendevin:main"})," as the image (last line)."]})}),"\n",(0,i.jsx)(n.p,{children:"See Development.md for instructions on running OpenDevin without Docker."}),"\n",(0,i.jsx)(n.p,{children:"Having trouble? Check out our Troubleshooting Guide."}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"OpenDevin is currently a work in progress, but you can already run the alpha version to see the end-to-end system in action."})})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(6540);const o={},s=i.createContext(o);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/57e69882.d0435af3.js b/assets/js/57e69882.d0435af3.js new file mode 100644 index 0000000000..72c5c2a785 --- /dev/null +++ b/assets/js/57e69882.d0435af3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7859],{1862:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var s=t(4848),a=t(8453);const r={sidebar_label:"agent",title:"agenthub.planner_agent.agent"},i=void 0,l={id:"python/agenthub/planner_agent/agent",title:"agenthub.planner_agent.agent",description:"PlannerAgent Objects",source:"@site/modules/python/agenthub/planner_agent/agent.md",sourceDirName:"python/agenthub/planner_agent",slug:"/python/agenthub/planner_agent/agent",permalink:"/OpenDevin/modules/python/agenthub/planner_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.planner_agent.agent"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/agent"},next:{title:"prompt",permalink:"/OpenDevin/modules/python/agenthub/planner_agent/prompt"}},o={},c=[{value:"PlannerAgent Objects",id:"planneragent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4}];function p(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"planneragent-objects",children:"PlannerAgent Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class PlannerAgent(Agent)\n"})}),"\n",(0,s.jsx)(n.p,{children:"The planner agent utilizes a special prompting strategy to create long term plans for solving problems.\nThe agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step."}),"\n",(0,s.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,s.jsx)(n.p,{children:"Initialize the Planner Agent with an LLM"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Checks to see if current step is completed, returns AgentFinishAction if True.\nOtherwise, creates a plan prompt and sends to model for inference, returning the result as the next action."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"state (State): The current state given the previous actions and observations"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"AgentFinishAction: If the last state was 'completed', 'verified', or 'abandoned'"}),"\n",(0,s.jsx)(n.li,{children:"Action: The next action to take based on llm response"}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var s=t(6540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/582f8d90.2cf4979f.js b/assets/js/582f8d90.2cf4979f.js new file mode 100644 index 0000000000..3cf9d31ac9 --- /dev/null +++ b/assets/js/582f8d90.2cf4979f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3159],{9604:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var o=t(4848),r=t(8453);const s={sidebar_label:"agent",title:"agenthub.micro.agent"},i=void 0,c={id:"python/agenthub/micro/agent",title:"agenthub.micro.agent",description:"my\\_encoder",source:"@site/modules/python/agenthub/micro/agent.md",sourceDirName:"python/agenthub/micro",slug:"/python/agenthub/micro/agent",permalink:"/OpenDevin/modules/python/agenthub/micro/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.micro.agent"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/dummy_agent/agent"},next:{title:"json",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/json"}},a={},l=[{value:"my_encoder",id:"my_encoder",level:4},{value:"to_json",id:"to_json",level:4}];function d(e){const n={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"my_encoder",children:"my_encoder"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def my_encoder(obj)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Encodes objects as dictionaries"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"obj (Object): An object that will be converted"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"dict: If the object can be converted it is returned in dict format"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"to_json",children:"to_json"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def to_json(obj, **kwargs)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Serialize an object to str format"})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var o=t(6540);const r={},s=o.createContext(r);function i(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5b169c1f.338958fd.js b/assets/js/5b169c1f.338958fd.js deleted file mode 100644 index 69f48ae473..0000000000 --- a/assets/js/5b169c1f.338958fd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8670],{3065:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>l,toc:()=>c});var o=t(4848),r=t(8453);const s={sidebar_label:"memory",title:"agenthub.monologue_agent.utils.memory"},i=void 0,l={id:"python/agenthub/monologue_agent/utils/memory",title:"agenthub.monologue_agent.utils.memory",description:"LongTermMemory Objects",source:"@site/docs/python/agenthub/monologue_agent/utils/memory.md",sourceDirName:"python/agenthub/monologue_agent/utils",slug:"/python/agenthub/monologue_agent/utils/memory",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/memory",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"memory",title:"agenthub.monologue_agent.utils.memory"},sidebar:"apiSidebar",previous:{title:"json",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/json"},next:{title:"monologue",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/monologue"}},a={},c=[{value:"LongTermMemory Objects",id:"longtermmemory-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"add_event",id:"add_event",level:4},{value:"search",id:"search",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"longtermmemory-objects",children:"LongTermMemory Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class LongTermMemory()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Responsible for storing information that the agent can call on later for better insights and context.\nUses chromadb to store and search through memories."}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initialize the chromadb and set up ChromaVectorStore for later use."}),"\n",(0,o.jsx)(n.h4,{id:"add_event",children:"add_event"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def add_event(event: dict)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Adds a new event to the long term memory with a unique id."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"event (dict): The new event to be added to memory"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"search",children:"search"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def search(query: str, k: int = 10)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Searches through the current memory using VectorIndexRetriever"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"query (str): A query to match search results to"}),"\n",(0,o.jsx)(n.li,{children:"k (int): Number of top results to return"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"List[str]: List of top k results found in current memory"}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var o=t(6540);const r={},s=o.createContext(r);function i(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5b901c66.ed955fb2.js b/assets/js/5b901c66.ed955fb2.js new file mode 100644 index 0000000000..3f551883f2 --- /dev/null +++ b/assets/js/5b901c66.ed955fb2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7457],{9991:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var t=s(4848),r=s(8453);const a={sidebar_label:"agent",title:"opendevin.server.agent.agent"},l=void 0,i={id:"python/opendevin/server/agent/agent",title:"opendevin.server.agent.agent",description:"AgentUnit Objects",source:"@site/modules/python/opendevin/server/agent/agent.md",sourceDirName:"python/opendevin/server/agent",slug:"/python/opendevin/server/agent/",permalink:"/OpenDevin/modules/python/opendevin/server/agent/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"opendevin.server.agent.agent"},sidebar:"apiSidebar",previous:{title:"task",permalink:"/OpenDevin/modules/python/opendevin/schema/task"},next:{title:"manager",permalink:"/OpenDevin/modules/python/opendevin/server/agent/manager"}},d={},c=[{value:"AgentUnit Objects",id:"agentunit-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"send_error",id:"send_error",level:4},{value:"send_message",id:"send_message",level:4},{value:"send",id:"send",level:4},{value:"dispatch",id:"dispatch",level:4},{value:"get_arg_or_default",id:"get_arg_or_default",level:4},{value:"create_controller",id:"create_controller",level:4},{value:"start_task",id:"start_task",level:4},{value:"set_task_state",id:"set_task_state",level:4},{value:"on_agent_event",id:"on_agent_event",level:4}];function o(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"agentunit-objects",children:"AgentUnit Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class AgentUnit()\n"})}),"\n",(0,t.jsx)(n.p,{children:"Represents a session with an agent."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Attributes"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"controller"})," - The AgentController instance for controlling the agent."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"agent_task"})," - The task representing the agent's execution."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def __init__(sid)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Initializes a new instance of the Session class."}),"\n",(0,t.jsx)(n.h4,{id:"send_error",children:"send_error"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def send_error(message)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sends an error message to the client."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"message"})," - The error message to send."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"send_message",children:"send_message"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def send_message(message)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sends a message to the client."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"message"})," - The message to send."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"send",children:"send"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def send(data)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sends data to the client."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"data"})," - The data to send."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"dispatch",children:"dispatch"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def dispatch(action: str | None, data: dict)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Dispatches actions to the agent from the client."}),"\n",(0,t.jsx)(n.h4,{id:"get_arg_or_default",children:"get_arg_or_default"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def get_arg_or_default(_args: dict, key: ConfigType) -> str\n"})}),"\n",(0,t.jsx)(n.p,{children:"Gets an argument from the args dictionary or the default value."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_args"})," - The args dictionary."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"key"})," - The key to get."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(n.p,{children:"The value of the key or the default value."}),"\n",(0,t.jsx)(n.h4,{id:"create_controller",children:"create_controller"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def create_controller(start_event: dict)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Creates an AgentController instance."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"start_event"})," - The start event data (optional)."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"start_task",children:"start_task"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def start_task(start_event)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Starts a task for the agent."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"start_event"})," - The start event data."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"set_task_state",children:"set_task_state"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def set_task_state(new_state_action: TaskStateAction)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sets the state of the agent task."}),"\n",(0,t.jsx)(n.h4,{id:"on_agent_event",children:"on_agent_event"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def on_agent_event(event: Observation | Action)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Callback function for agent events."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"event"})," - The agent event (Observation or Action)."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>i});var t=s(6540);const r={},a=t.createContext(r);function l(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5d5e205a.8457fd8d.js b/assets/js/5d5e205a.8457fd8d.js new file mode 100644 index 0000000000..b6ee80abce --- /dev/null +++ b/assets/js/5d5e205a.8457fd8d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2902],{3942:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>a,frontMatter:()=>r,metadata:()=>c,toc:()=>p});var o=t(4848),i=t(8453);const r={sidebar_label:"config",title:"opendevin.config"},s=void 0,c={id:"python/opendevin/config",title:"opendevin.config",description:"get",source:"@site/modules/python/opendevin/config.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/config",permalink:"/OpenDevin/modules/python/opendevin/config",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"config",title:"opendevin.config"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/modules/python/opendevin/agent"},next:{title:"files",permalink:"/OpenDevin/modules/python/opendevin/files"}},d={},p=[{value:"get",id:"get",level:4}];function l(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"get",children:"get"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def get(key: ConfigType, required: bool = False)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Get a key from the environment variables or config.toml or default configs."})]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>c});var o=t(6540);const i={},r=o.createContext(i);function s(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5de541ca.68d0ad63.js b/assets/js/5de541ca.68d0ad63.js deleted file mode 100644 index 952437130e..0000000000 --- a/assets/js/5de541ca.68d0ad63.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6335],{2272:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var o=t(4848),s=t(8453);const r={sidebar_label:"agent",title:"monologue_agent.agent"},l=void 0,i={id:"python/monologue_agent/agent",title:"monologue_agent.agent",description:"MonologueAgent Objects",source:"@site/docs/python/monologue_agent/agent.md",sourceDirName:"python/monologue_agent",slug:"/python/monologue_agent/agent",permalink:"/OpenDevin/docs/python/monologue_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"monologue_agent.agent"}},a={},c=[{value:"MonologueAgent Objects",id:"monologueagent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4},{value:"search_memory",id:"search_memory",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"monologueagent-objects",children:"MonologueAgent Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class MonologueAgent(Agent)\n"})}),"\n",(0,o.jsx)(n.p,{children:"The Monologue Agent utilizes long and short term memory to complete tasks.\nLong term memory is stored as a LongTermMemory object and the model uses it to search for examples from the past.\nShort term memory is stored as a Monologue object and the model can condense it as necessary."}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initializes the Monologue Agent with an llm, monologue, and memory."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,o.jsx)(n.p,{children:"Modifies the current state by adding the most recent actions and observations, then prompts the model to think about it's next action to take using monologue, memory, and hint."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"state (State): The current state based on previous steps taken"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Action: The next action to take based on LLM response"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"search_memory",children:"search_memory"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def search_memory(query: str) -> List[str]\n"})}),"\n",(0,o.jsx)(n.p,{children:"Uses VectorIndexRetriever to find related memories within the long term memory.\nUses search to produce top 10 results."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"query (str): The query that we want to find related memories for"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"List[str]: A list of top 10 text results that matched the query"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>i});var o=t(6540);const s={},r=o.createContext(s);function l(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5e3a92ae.1101e757.js b/assets/js/5e3a92ae.1101e757.js deleted file mode 100644 index ec65e522c8..0000000000 --- a/assets/js/5e3a92ae.1101e757.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4774],{2605:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>b,frontMatter:()=>d,metadata:()=>r,toc:()=>i});var t=o(4848),s=o(8453);const d={sidebar_label:"sandbox",title:"opendevin.sandbox.e2b.sandbox"},c=void 0,r={id:"python/opendevin/sandbox/e2b/sandbox",title:"opendevin.sandbox.e2b.sandbox",description:"E2BBox Objects",source:"@site/docs/python/opendevin/sandbox/e2b/sandbox.md",sourceDirName:"python/opendevin/sandbox/e2b",slug:"/python/opendevin/sandbox/e2b/sandbox",permalink:"/OpenDevin/docs/python/opendevin/sandbox/e2b/sandbox",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"sandbox",title:"opendevin.sandbox.e2b.sandbox"},sidebar:"apiSidebar",previous:{title:"process",permalink:"/OpenDevin/docs/python/opendevin/sandbox/docker/process"},next:{title:"jupyter",permalink:"/OpenDevin/docs/python/opendevin/sandbox/plugins/jupyter/__init__"}},a={},i=[{value:"E2BBox Objects",id:"e2bbox-objects",level:2},{value:"copy_to",id:"copy_to",level:4}];function p(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"e2bbox-objects",children:"E2BBox Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class E2BBox(Sandbox)\n"})}),"\n",(0,t.jsx)(n.h4,{id:"copy_to",children:"copy_to"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def copy_to(host_src: str, sandbox_dest: str, recursive: bool = False)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Copies a local file or directory to the sandbox."})]})}function b(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>c,x:()=>r});var t=o(6540);const s={},d=t.createContext(s);function c(e){const n=t.useContext(d);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),t.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/60d4308b.893c10b0.js b/assets/js/60d4308b.893c10b0.js deleted file mode 100644 index cf532e97ce..0000000000 --- a/assets/js/60d4308b.893c10b0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3186],{650:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>d});var o=t(4848),s=t(8453);const a={sidebar_label:"observation",title:"opendevin.schema.observation"},i=void 0,r={id:"python/opendevin/schema/observation",title:"opendevin.schema.observation",description:"ObservationTypeSchema Objects",source:"@site/docs/python/opendevin/schema/observation.md",sourceDirName:"python/opendevin/schema",slug:"/python/opendevin/schema/observation",permalink:"/OpenDevin/docs/python/opendevin/schema/observation",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"observation",title:"opendevin.schema.observation"},sidebar:"apiSidebar",previous:{title:"action",permalink:"/OpenDevin/docs/python/opendevin/schema/action"},next:{title:"task",permalink:"/OpenDevin/docs/python/opendevin/schema/task"}},c={},d=[{value:"ObservationTypeSchema Objects",id:"observationtypeschema-objects",level:2},{value:"READ",id:"read",level:4},{value:"BROWSE",id:"browse",level:4},{value:"RUN",id:"run",level:4},{value:"RECALL",id:"recall",level:4},{value:"CHAT",id:"chat",level:4},{value:"DELEGATE",id:"delegate",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"observationtypeschema-objects",children:"ObservationTypeSchema Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class ObservationTypeSchema(BaseModel)\n"})}),"\n",(0,o.jsx)(n.h4,{id:"read",children:"READ"}),"\n",(0,o.jsx)(n.p,{children:"The content of a file"}),"\n",(0,o.jsx)(n.h4,{id:"browse",children:"BROWSE"}),"\n",(0,o.jsx)(n.p,{children:"The HTML content of a URL"}),"\n",(0,o.jsx)(n.h4,{id:"run",children:"RUN"}),"\n",(0,o.jsx)(n.p,{children:"The output of a command"}),"\n",(0,o.jsx)(n.h4,{id:"recall",children:"RECALL"}),"\n",(0,o.jsx)(n.p,{children:"The result of a search"}),"\n",(0,o.jsx)(n.h4,{id:"chat",children:"CHAT"}),"\n",(0,o.jsx)(n.p,{children:"A message from the user"}),"\n",(0,o.jsx)(n.h4,{id:"delegate",children:"DELEGATE"}),"\n",(0,o.jsx)(n.p,{children:"The result of a task delegated to another agent"})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>r});var o=t(6540);const s={},a=o.createContext(s);function i(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/657482a4.b1c85de9.js b/assets/js/657482a4.b1c85de9.js new file mode 100644 index 0000000000..b3cf225a2b --- /dev/null +++ b/assets/js/657482a4.b1c85de9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5360],{8613:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var o=t(4848),i=t(8453);const s={sidebar_label:"observation",title:"opendevin.observation"},r=void 0,a={id:"python/opendevin/observation/__init__",title:"opendevin.observation",description:"OBSERVATION\\TYPE\\TO\\_CLASS",source:"@site/modules/python/opendevin/observation/__init__.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/__init__",permalink:"/OpenDevin/modules/python/opendevin/observation/__init__",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"observation",title:"opendevin.observation"},sidebar:"apiSidebar",previous:{title:"llm",permalink:"/OpenDevin/modules/python/opendevin/llm/"},next:{title:"base",permalink:"/OpenDevin/modules/python/opendevin/observation/base"}},p={},d=[{value:"OBSERVATION_TYPE_TO_CLASS",id:"observation_type_to_class",level:4}];function l(e){const n={h4:"h4",p:"p",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"observation_type_to_class",children:"OBSERVATION_TYPE_TO_CLASS"}),"\n",(0,o.jsx)(n.p,{children:"type: ignore[attr-defined]"})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var o=t(6540);const i={},s=o.createContext(i);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/662652d6.2159eb16.js b/assets/js/662652d6.2159eb16.js deleted file mode 100644 index fd134633e3..0000000000 --- a/assets/js/662652d6.2159eb16.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8716],{3359:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>b,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var s=n(4848),o=n(8453);const i={sidebar_label:"files",title:"observation.files"},r=void 0,a={id:"python/observation/files",title:"observation.files",description:"FileReadObservation Objects",source:"@site/docs/python/observation/files.md",sourceDirName:"python/observation",slug:"/python/observation/files",permalink:"/OpenDevin/docs/python/observation/files",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"files",title:"observation.files"}},l={},c=[{value:"FileReadObservation Objects",id:"filereadobservation-objects",level:2},{value:"FileWriteObservation Objects",id:"filewriteobservation-objects",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"filereadobservation-objects",children:"FileReadObservation Objects"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass FileReadObservation(Observation)\n"})}),"\n",(0,s.jsx)(t.p,{children:"This data class represents the content of a file."}),"\n",(0,s.jsx)(t.h2,{id:"filewriteobservation-objects",children:"FileWriteObservation Objects"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass FileWriteObservation(Observation)\n"})}),"\n",(0,s.jsx)(t.p,{children:"This data class represents a file write operation"})]})}function b(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var s=n(6540);const o={},i=s.createContext(o);function r(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/669d2fb4.8427ab88.js b/assets/js/669d2fb4.8427ab88.js deleted file mode 100644 index 3c6e3bba63..0000000000 --- a/assets/js/669d2fb4.8427ab88.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8730],{1585:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>d,toc:()=>c});var s=t(4848),r=t(8453);const o={sidebar_label:"auth",title:"opendevin.server.auth.auth"},i=void 0,d={id:"python/opendevin/server/auth/auth",title:"opendevin.server.auth.auth",description:"get\\sid\\from\\_token",source:"@site/docs/python/opendevin/server/auth/auth.md",sourceDirName:"python/opendevin/server/auth",slug:"/python/opendevin/server/auth/",permalink:"/OpenDevin/docs/python/opendevin/server/auth/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"auth",title:"opendevin.server.auth.auth"},sidebar:"apiSidebar",previous:{title:"manager",permalink:"/OpenDevin/docs/python/opendevin/server/agent/manager"},next:{title:"manager",permalink:"/OpenDevin/docs/python/opendevin/server/session/manager"}},a={},c=[{value:"get_sid_from_token",id:"get_sid_from_token",level:4},{value:"sign_token",id:"sign_token",level:4}];function l(e){const n={code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h4,{id:"get_sid_from_token",children:"get_sid_from_token"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def get_sid_from_token(token: str) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Retrieves the session id from a JWT token."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"token"})," ",(0,s.jsx)(n.em,{children:"str"})," - The JWT token from which the session id is to be extracted."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"str"})," - The session id if found and valid, otherwise an empty string."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"sign_token",children:"sign_token"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def sign_token(payload: Dict[str, object]) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Signs a JWT token."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>d});var s=t(6540);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/67fae27e.a9654e29.js b/assets/js/67fae27e.a9654e29.js deleted file mode 100644 index d7552816dc..0000000000 --- a/assets/js/67fae27e.a9654e29.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5724],{9007:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>i,contentTitle:()=>r,default:()=>b,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var n=t(4848),a=t(8453);const o={sidebar_label:"message",title:"observation.message"},r=void 0,c={id:"python/observation/message",title:"observation.message",description:"UserMessageObservation Objects",source:"@site/docs/python/observation/message.md",sourceDirName:"python/observation",slug:"/python/observation/message",permalink:"/OpenDevin/docs/python/observation/message",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"message",title:"observation.message"}},i={},l=[{value:"UserMessageObservation Objects",id:"usermessageobservation-objects",level:2},{value:"AgentMessageObservation Objects",id:"agentmessageobservation-objects",level:2}];function d(e){const s={code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.h2,{id:"usermessageobservation-objects",children:"UserMessageObservation Objects"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"@dataclass\nclass UserMessageObservation(Observation)\n"})}),"\n",(0,n.jsx)(s.p,{children:"This data class represents a message sent by the user."}),"\n",(0,n.jsx)(s.h2,{id:"agentmessageobservation-objects",children:"AgentMessageObservation Objects"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-python",children:"@dataclass\nclass AgentMessageObservation(Observation)\n"})}),"\n",(0,n.jsx)(s.p,{children:"This data class represents a message sent by the agent."})]})}function b(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>c});var n=t(6540);const a={},o=n.createContext(a);function r(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/68ae658f.3a472cc5.js b/assets/js/68ae658f.3a472cc5.js new file mode 100644 index 0000000000..4e1588aea8 --- /dev/null +++ b/assets/js/68ae658f.3a472cc5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8726],{8343:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>l});var s=n(4848),a=n(8453);const r={sidebar_label:"agent",title:"agenthub.SWE_agent.agent"},o=void 0,c={id:"python/agenthub/SWE_agent/agent",title:"agenthub.SWE_agent.agent",description:"SWEAgent Objects",source:"@site/modules/python/agenthub/SWE_agent/agent.md",sourceDirName:"python/agenthub/SWE_agent",slug:"/python/agenthub/SWE_agent/agent",permalink:"/OpenDevin/modules/python/agenthub/SWE_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.SWE_agent.agent"},sidebar:"apiSidebar",next:{title:"parser",permalink:"/OpenDevin/modules/python/agenthub/SWE_agent/parser"}},i={},l=[{value:"SWEAgent Objects",id:"sweagent-objects",level:2},{value:"step",id:"step",level:4},{value:"reset",id:"reset",level:4}];function d(e){const t={code:"code",h2:"h2",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"sweagent-objects",children:"SWEAgent Objects"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"class SWEAgent(Agent)\n"})}),"\n",(0,s.jsx)(t.p,{children:"An attempt to recreate swe_agent with output parsing, prompting style, and Application Computer Interface (ACI)."}),"\n",(0,s.jsx)(t.p,{children:"SWE-agent includes ACI functions like 'goto', 'search_for', 'edit', 'scroll', 'run'"}),"\n",(0,s.jsx)(t.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(t.p,{children:"SWE-Agent step:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Get context - past actions, custom commands, current step"}),"\n",(0,s.jsx)(t.li,{children:"Perform think-act - prompt model for action and reasoning"}),"\n",(0,s.jsx)(t.li,{children:"Catch errors - ensure model takes action (5 attempts max)"}),"\n"]}),"\n",(0,s.jsx)(t.h4,{id:"reset",children:"reset"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def reset() -> None\n"})}),"\n",(0,s.jsx)(t.p,{children:"Used to reset the agent"})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>c});var s=n(6540);const a={},r=s.createContext(a);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/68c038dc.f7da3191.js b/assets/js/68c038dc.f7da3191.js deleted file mode 100644 index babd830027..0000000000 --- a/assets/js/68c038dc.f7da3191.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2166],{8212:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>g,frontMatter:()=>a,metadata:()=>o,toc:()=>c});var s=t(4848),r=t(8453);const a={sidebar_label:"agent",title:"delegator_agent.agent"},i=void 0,o={id:"python/delegator_agent/agent",title:"delegator_agent.agent",description:"DelegatorAgent Objects",source:"@site/docs/python/delegator_agent/agent.md",sourceDirName:"python/delegator_agent",slug:"/python/delegator_agent/agent",permalink:"/OpenDevin/docs/python/delegator_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"delegator_agent.agent"}},l={},c=[{value:"DelegatorAgent Objects",id:"delegatoragent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"delegatoragent-objects",children:"DelegatorAgent Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class DelegatorAgent(Agent)\n"})}),"\n",(0,s.jsx)(n.p,{children:"The planner agent utilizes a special prompting strategy to create long term plans for solving problems.\nThe agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step."}),"\n",(0,s.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,s.jsx)(n.p,{children:"Initialize the Delegator Agent with an LLM"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Checks to see if current step is completed, returns AgentFinishAction if True.\nOtherwise, creates a plan prompt and sends to model for inference, returning the result as the next action."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"state (State): The current state given the previous actions and observations"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"AgentFinishAction: If the last state was 'completed', 'verified', or 'abandoned'"}),"\n",(0,s.jsx)(n.li,{children:"Action: The next action to take based on llm response"}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(6540);const r={},a=s.createContext(r);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6ba271c9.20c3a808.js b/assets/js/6ba271c9.20c3a808.js new file mode 100644 index 0000000000..f200b260db --- /dev/null +++ b/assets/js/6ba271c9.20c3a808.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[694],{380:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>i,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>c});var o=l(4848),t=l(8453);const s={},a="Local LLM with Ollama",r={id:"usage/llms/localLLMs",title:"Local LLM with Ollama",description:"Ensure that you have the Ollama server up and running.",source:"@site/modules/usage/llms/localLLMs.md",sourceDirName:"usage/llms",slug:"/usage/llms/localLLMs",permalink:"/OpenDevin/modules/usage/llms/localLLMs",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Google Gemini/Vertex LLM",permalink:"/OpenDevin/modules/usage/llms/googleLLMs"},next:{title:"\ud83e\udde0 Agents and Capabilities",permalink:"/OpenDevin/modules/usage/agents"}},i={},c=[{value:"Pull Models",id:"pull-models",level:2},{value:"Start OpenDevin",id:"start-opendevin",level:2},{value:"Docker",id:"docker",level:3},{value:"Build from Source",id:"build-from-source",level:3},{value:"Select your Model",id:"select-your-model",level:2},{value:"Configuring the ollama service (WSL)",id:"configuring-the-ollama-service-wsl",level:2},{value:"Fixing it",id:"fixing-it",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"local-llm-with-ollama",children:"Local LLM with Ollama"}),"\n",(0,o.jsxs)(n.p,{children:["Ensure that you have the Ollama server up and running.\nFor detailed startup instructions, refer to the ",(0,o.jsx)(n.a,{href:"https://github.com/ollama/ollama",children:"here"})]}),"\n",(0,o.jsxs)(n.p,{children:["This guide assumes you've started ollama with ",(0,o.jsx)(n.code,{children:"ollama serve"}),". If you're running ollama differently (e.g. inside docker), the instructions might need to be modified. Please note that if you're running wsl the default ollama configuration blocks requests from docker containers. See ",(0,o.jsx)(n.a,{href:"#4-configuring-the-ollama-service-wsl",children:"here"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"pull-models",children:"Pull Models"}),"\n",(0,o.jsxs)(n.p,{children:["Ollama model names can be found ",(0,o.jsx)(n.a,{href:"https://ollama.com/library",children:"here"}),". For a small example, you can use\nthe ",(0,o.jsx)(n.code,{children:"codellama:7b"})," model. Bigger models will generally perform better."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"ollama pull codellama:7b\n"})}),"\n",(0,o.jsx)(n.p,{children:"you can check which models you have downloaded like this:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"~$ ollama list\nNAME ID SIZE MODIFIED\ncodellama:7b 8fdf8f752f6e 3.8 GB 6 weeks ago\nmistral:7b-instruct-v0.2-q4_K_M eb14864c7427 4.4 GB 2 weeks ago\nstarcoder2:latest f67ae0f64584 1.7 GB 19 hours ago\n"})}),"\n",(0,o.jsx)(n.h2,{id:"start-opendevin",children:"Start OpenDevin"}),"\n",(0,o.jsx)(n.h3,{id:"docker",children:"Docker"}),"\n",(0,o.jsxs)(n.p,{children:["Use the instructions ",(0,o.jsx)(n.a,{href:"../intro",children:"here"})," to start OpenDevin using Docker.\nBut when running ",(0,o.jsx)(n.code,{children:"docker run"}),", you'll need to add a few more arguments:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'--add-host host.docker.internal=host-gateway \\\n-e LLM_API_KEY="ollama" \\\n-e LLM_BASE_URL="http://host.docker.internal:11434" \\\n'})}),"\n",(0,o.jsx)(n.p,{children:"For example:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'# The directory you want OpenDevin to modify. MUST be an absolute path!\nexport WORKSPACE_BASE=$(pwd)/workspace\n\ndocker run \\\n --add-host host.docker.internal=host-gateway \\\n -e LLM_API_KEY="ollama" \\\n -e LLM_BASE_URL="http://host.docker.internal:11434" \\\n -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \\\n -v $WORKSPACE_BASE:/opt/workspace_base \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -p 3000:3000 \\\n ghcr.io/opendevin/opendevin:main\n'})}),"\n",(0,o.jsxs)(n.p,{children:["You should now be able to connect to ",(0,o.jsx)(n.code,{children:"http://localhost:3000/"})]}),"\n",(0,o.jsx)(n.h3,{id:"build-from-source",children:"Build from Source"}),"\n",(0,o.jsxs)(n.p,{children:["Use the instructions in ",(0,o.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/blob/main/Development.md",children:"Development.md"})," to build OpenDevin.\nMake sure ",(0,o.jsx)(n.code,{children:"config.toml"})," is there by running ",(0,o.jsx)(n.code,{children:"make setup-config"})," which will create one for you. In ",(0,o.jsx)(n.code,{children:"config.toml"}),", enter the followings:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'LLM_MODEL="ollama/codellama:7b"\nLLM_API_KEY="ollama"\nLLM_EMBEDDING_MODEL="local"\nLLM_BASE_URL="http://localhost:11434"\nWORKSPACE_BASE="./workspace"\nWORKSPACE_DIR="$(pwd)/workspace"\n'})}),"\n",(0,o.jsxs)(n.p,{children:["Replace ",(0,o.jsx)(n.code,{children:"LLM_MODEL"})," of your choice if you need to."]}),"\n",(0,o.jsxs)(n.p,{children:["Done! Now you can start Devin by: ",(0,o.jsx)(n.code,{children:"make run"})," without Docker. You now should be able to connect to ",(0,o.jsx)(n.code,{children:"http://localhost:3000/"})]}),"\n",(0,o.jsx)(n.h2,{id:"select-your-model",children:"Select your Model"}),"\n",(0,o.jsxs)(n.p,{children:["In the OpenDevin UI, click on the Settings wheel in the bottom-left corner.\nThen in the ",(0,o.jsx)(n.code,{children:"Model"})," input, enter ",(0,o.jsx)(n.code,{children:"ollama/codellama:7b"}),", or the name of the model you pulled earlier.\nIf it doesn\u2019t show up in a dropdown, that\u2019s fine, just type it in. Click Save when you\u2019re done."]}),"\n",(0,o.jsx)(n.p,{children:"And now you're ready to go!"}),"\n",(0,o.jsx)(n.h2,{id:"configuring-the-ollama-service-wsl",children:"Configuring the ollama service (WSL)"}),"\n",(0,o.jsx)(n.p,{children:"The default configuration for ollama in wsl only serves localhost. This means you can't reach it from a docker container. eg. it wont work with OpenDevin. First let's test that ollama is running correctly."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'ollama list # get list of installed models\ncurl http://localhost:11434/api/generate -d \'{"model":"[NAME]","prompt":"hi"}\'\n#ex. curl http://localhost:11434/api/generate -d \'{"model":"codellama:7b","prompt":"hi"}\'\n#ex. curl http://localhost:11434/api/generate -d \'{"model":"codellama","prompt":"hi"}\' #the tag is optional if there is only one\n'})}),"\n",(0,o.jsx)(n.p,{children:'Once that is done test that it allows "outside" requests, like those from inside a docker container.'}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'docker ps # get list of running docker containers, for most accurate test choose the open devin sandbox container.\ndocker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d \'{"model":"[NAME]","prompt":"hi"}\'\n#ex. docker exec cd9cc82f7a11 curl http://host.docker.internal:11434/api/generate -d \'{"model":"codellama","prompt":"hi"}\'\n'})}),"\n",(0,o.jsx)(n.h2,{id:"fixing-it",children:"Fixing it"}),"\n",(0,o.jsx)(n.p,{children:"Now let's make it work, edit /etc/systemd/system/ollama.service with sudo priviledges. (Path may vary depending on linux flavor)"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sudo vi /etc/systemd/system/ollama.service\n"})}),"\n",(0,o.jsx)(n.p,{children:"or"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sudo nano /etc/systemd/system/ollama.service\n"})}),"\n",(0,o.jsx)(n.p,{children:"In the [Service] bracket add these lines"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'Environment="OLLAMA_HOST=0.0.0.0:11434"\nEnvironment="OLLAMA_ORIGINS=*"\n'})}),"\n",(0,o.jsx)(n.p,{children:"Then save, reload the configuration and restart the service."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sudo systemctl daemon-reload\nsudo systemctl restart ollama\n"})}),"\n",(0,o.jsx)(n.p,{children:"Finally test that ollama is accessible from within the container"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'ollama list # get list of installed models\ndocker ps # get list of running docker containers, for most accurate test choose the open devin sandbox container.\ndocker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d \'{"model":"[NAME]","prompt":"hi"}\'\n'})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,l)=>{l.d(n,{R:()=>a,x:()=>r});var o=l(6540);const t={},s=o.createContext(t);function a(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6c0a88f8.21e60952.js b/assets/js/6c0a88f8.21e60952.js new file mode 100644 index 0000000000..930e3fa9f0 --- /dev/null +++ b/assets/js/6c0a88f8.21e60952.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1309],{1409:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var i=t(4848),r=t(8453);const a={sidebar_label:"main",title:"opendevin.main"},o=void 0,s={id:"python/opendevin/main",title:"opendevin.main",description:"read\\task\\from\\_file",source:"@site/modules/python/opendevin/main.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/main",permalink:"/OpenDevin/modules/python/opendevin/main",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"main",title:"opendevin.main"},sidebar:"apiSidebar",previous:{title:"logger",permalink:"/OpenDevin/modules/python/opendevin/logger"},next:{title:"plan",permalink:"/OpenDevin/modules/python/opendevin/plan"}},d={},l=[{value:"read_task_from_file",id:"read_task_from_file",level:4},{value:"read_task_from_stdin",id:"read_task_from_stdin",level:4},{value:"main",id:"main",level:4}];function c(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h4,{id:"read_task_from_file",children:"read_task_from_file"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def read_task_from_file(file_path: str) -> str\n"})}),"\n",(0,i.jsx)(n.p,{children:"Read task from the specified file."}),"\n",(0,i.jsx)(n.h4,{id:"read_task_from_stdin",children:"read_task_from_stdin"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def read_task_from_stdin() -> str\n"})}),"\n",(0,i.jsx)(n.p,{children:"Read task from stdin."}),"\n",(0,i.jsx)(n.h4,{id:"main",children:"main"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"async def main(task_str: str = '')\n"})}),"\n",(0,i.jsx)(n.p,{children:"Main coroutine to run the agent controller with task input flexibility."})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var i=t(6540);const r={},a=i.createContext(r);function o(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6d0f81ff.9c1d0928.js b/assets/js/6d0f81ff.9c1d0928.js deleted file mode 100644 index b61f4fc68e..0000000000 --- a/assets/js/6d0f81ff.9c1d0928.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8486],{5370:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>r,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var s=n(4848),a=n(8453);const o={sidebar_label:"tasks",title:"action.tasks"},c=void 0,i={id:"python/action/tasks",title:"action.tasks",description:"TaskStateChangedAction Objects",source:"@site/docs/python/action/tasks.md",sourceDirName:"python/action",slug:"/python/action/tasks",permalink:"/OpenDevin/docs/python/action/tasks",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"tasks",title:"action.tasks"}},r={},d=[{value:"TaskStateChangedAction Objects",id:"taskstatechangedaction-objects",level:2}];function l(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h2,{id:"taskstatechangedaction-objects",children:"TaskStateChangedAction Objects"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:"@dataclass\nclass TaskStateChangedAction(NotExecutableAction)\n"})}),"\n",(0,s.jsx)(e.p,{children:"Fake action, just to notify the client that a task state has changed."})]})}function h(t={}){const{wrapper:e}={...(0,a.R)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(l,{...t})}):l(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>c,x:()=>i});var s=n(6540);const a={},o=s.createContext(a);function c(t){const e=s.useContext(o);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function i(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(a):t.components||a:c(t.components),s.createElement(o.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/6fa566de.17863c2a.js b/assets/js/6fa566de.17863c2a.js deleted file mode 100644 index cd25dd939e..0000000000 --- a/assets/js/6fa566de.17863c2a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8808],{5031:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>l});var s=t(4848),i=t(8453);const a={sidebar_label:"task",title:"opendevin.schema.task"},r=void 0,d={id:"python/opendevin/schema/task",title:"opendevin.schema.task",description:"TaskState Objects",source:"@site/docs/python/opendevin/schema/task.md",sourceDirName:"python/opendevin/schema",slug:"/python/opendevin/schema/task",permalink:"/OpenDevin/docs/python/opendevin/schema/task",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"task",title:"opendevin.schema.task"},sidebar:"apiSidebar",previous:{title:"observation",permalink:"/OpenDevin/docs/python/opendevin/schema/observation"},next:{title:"agent",permalink:"/OpenDevin/docs/python/opendevin/server/agent/"}},c={},l=[{value:"TaskState Objects",id:"taskstate-objects",level:2},{value:"INIT",id:"init",level:4},{value:"RUNNING",id:"running",level:4},{value:"PAUSED",id:"paused",level:4},{value:"STOPPED",id:"stopped",level:4},{value:"FINISHED",id:"finished",level:4},{value:"ERROR",id:"error",level:4},{value:"TaskStateAction Objects",id:"taskstateaction-objects",level:2},{value:"START",id:"start",level:4},{value:"PAUSE",id:"pause",level:4},{value:"RESUME",id:"resume",level:4},{value:"STOP",id:"stop",level:4}];function o(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"taskstate-objects",children:"TaskState Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class TaskState(str, Enum)\n"})}),"\n",(0,s.jsx)(n.h4,{id:"init",children:"INIT"}),"\n",(0,s.jsx)(n.p,{children:"Initial state of the task."}),"\n",(0,s.jsx)(n.h4,{id:"running",children:"RUNNING"}),"\n",(0,s.jsx)(n.p,{children:"The task is running."}),"\n",(0,s.jsx)(n.h4,{id:"paused",children:"PAUSED"}),"\n",(0,s.jsx)(n.p,{children:"The task is paused."}),"\n",(0,s.jsx)(n.h4,{id:"stopped",children:"STOPPED"}),"\n",(0,s.jsx)(n.p,{children:"The task is stopped."}),"\n",(0,s.jsx)(n.h4,{id:"finished",children:"FINISHED"}),"\n",(0,s.jsx)(n.p,{children:"The task is finished."}),"\n",(0,s.jsx)(n.h4,{id:"error",children:"ERROR"}),"\n",(0,s.jsx)(n.p,{children:"An error occurred during the task."}),"\n",(0,s.jsx)(n.h2,{id:"taskstateaction-objects",children:"TaskStateAction Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class TaskStateAction(str, Enum)\n"})}),"\n",(0,s.jsx)(n.h4,{id:"start",children:"START"}),"\n",(0,s.jsx)(n.p,{children:"Starts the task."}),"\n",(0,s.jsx)(n.h4,{id:"pause",children:"PAUSE"}),"\n",(0,s.jsx)(n.p,{children:"Pauses the task."}),"\n",(0,s.jsx)(n.h4,{id:"resume",children:"RESUME"}),"\n",(0,s.jsx)(n.p,{children:"Resumes the task."}),"\n",(0,s.jsx)(n.h4,{id:"stop",children:"STOP"}),"\n",(0,s.jsx)(n.p,{children:"Stops the task."})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>d});var s=t(6540);const i={},a=s.createContext(i);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/71601b48.7ecfdf5e.js b/assets/js/71601b48.7ecfdf5e.js deleted file mode 100644 index 5df8333775..0000000000 --- a/assets/js/71601b48.7ecfdf5e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3848],{9738:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var t=o(4848),s=o(8453);const i={},r="Notes for Windows and WSL Users",l={id:"usage/troubleshooting/windows",title:"Notes for Windows and WSL Users",description:"OpenDevin only supports Windows via WSL.",source:"@site/docs/usage/troubleshooting/windows.md",sourceDirName:"usage/troubleshooting",slug:"/usage/troubleshooting/windows",permalink:"/OpenDevin/docs/usage/troubleshooting/windows",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"\ud83d\udea7 Troubleshooting",permalink:"/OpenDevin/docs/usage/troubleshooting/"},next:{title:"\ud83d\udcda Misc",permalink:"/OpenDevin/docs/usage/about"}},d={},c=[{value:"Troubleshooting",id:"troubleshooting",level:2},{value:"Failed to create opendevin user",id:"failed-to-create-opendevin-user",level:3},{value:"Poetry Installation",id:"poetry-installation",level:3},{value:"NoneType object has no attribute 'request'",id:"nonetype-object-has-no-attribute-request",level:3}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"notes-for-windows-and-wsl-users",children:"Notes for Windows and WSL Users"}),"\n",(0,t.jsxs)(n.p,{children:["OpenDevin only supports Windows via ",(0,t.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/windows/wsl/install",children:"WSL"}),".\nPlease be sure to run all commands inside your WSL terminal."]}),"\n",(0,t.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsx)(n.h3,{id:"failed-to-create-opendevin-user",children:"Failed to create opendevin user"}),"\n",(0,t.jsxs)(n.p,{children:["If you encounter the following error during setup: ",(0,t.jsx)(n.code,{children:"Exception: Failed to create opendevin user in sandbox: b'useradd: UID 0 is not unique\\n'"}),"\nYou can resolve it by running:\n",(0,t.jsx)(n.code,{children:" export SANDBOX_USER_ID=1000 "})]}),"\n",(0,t.jsx)(n.h3,{id:"poetry-installation",children:"Poetry Installation"}),"\n",(0,t.jsxs)(n.p,{children:["If you face issues running Poetry even after installing it during the build process, you may need to add its binary path to your environment:\n",(0,t.jsx)(n.code,{children:' export PATH="$HOME/.local/bin:$PATH" '})]}),"\n",(0,t.jsx)(n.h3,{id:"nonetype-object-has-no-attribute-request",children:"NoneType object has no attribute 'request'"}),"\n",(0,t.jsxs)(n.p,{children:["If you experiencing issues related to networking, such as ",(0,t.jsx)(n.code,{children:"NoneType object has no attribute 'request'"})," when executing ",(0,t.jsx)(n.code,{children:"make run"}),", you may need to configure your WSL2 networking settings. Follow these steps:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Open or create the ",(0,t.jsx)(n.code,{children:".wslconfig"})," file located at ",(0,t.jsx)(n.code,{children:"C:\\Users\\%username%\\.wslconfig"})," on your Windows host machine."]}),"\n",(0,t.jsxs)(n.li,{children:["Add the following configuration to the ",(0,t.jsx)(n.code,{children:".wslconfig"})," file:"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[wsl2]\nnetworkingMode=mirrored\nlocalhostForwarding=true\n"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Save the ",(0,t.jsx)(n.code,{children:".wslconfig"})," file."]}),"\n",(0,t.jsxs)(n.li,{children:["Restart WSL2 completely by exiting any running WSL2 instances and executing the command ",(0,t.jsx)(n.code,{children:"wsl --shutdown"})," in your command prompt or terminal."]}),"\n",(0,t.jsxs)(n.li,{children:["After restarting WSL, attempt to execute ",(0,t.jsx)(n.code,{children:"make run"})," again. The networking issue should be resolved."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>l});var t=o(6540);const s={},i=t.createContext(s);function r(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/728ae092.0a7c163c.js b/assets/js/728ae092.0a7c163c.js deleted file mode 100644 index 2b8daa0702..0000000000 --- a/assets/js/728ae092.0a7c163c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8267],{4951:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var o=t(4848),s=t(8453);const r={sidebar_label:"agent",title:"agenthub.monologue_agent.agent"},l=void 0,i={id:"python/agenthub/monologue_agent/agent",title:"agenthub.monologue_agent.agent",description:"MonologueAgent Objects",source:"@site/docs/python/agenthub/monologue_agent/agent.md",sourceDirName:"python/agenthub/monologue_agent",slug:"/python/agenthub/monologue_agent/agent",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.monologue_agent.agent"},sidebar:"apiSidebar",previous:{title:"prompts",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/prompts"},next:{title:"agent",permalink:"/OpenDevin/docs/python/agenthub/planner_agent/agent"}},a={},c=[{value:"MonologueAgent Objects",id:"monologueagent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4},{value:"search_memory",id:"search_memory",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"monologueagent-objects",children:"MonologueAgent Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class MonologueAgent(Agent)\n"})}),"\n",(0,o.jsx)(n.p,{children:"The Monologue Agent utilizes long and short term memory to complete tasks.\nLong term memory is stored as a LongTermMemory object and the model uses it to search for examples from the past.\nShort term memory is stored as a Monologue object and the model can condense it as necessary."}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initializes the Monologue Agent with an llm, monologue, and memory."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,o.jsx)(n.p,{children:"Modifies the current state by adding the most recent actions and observations, then prompts the model to think about it's next action to take using monologue, memory, and hint."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"state (State): The current state based on previous steps taken"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Action: The next action to take based on LLM response"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"search_memory",children:"search_memory"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def search_memory(query: str) -> List[str]\n"})}),"\n",(0,o.jsx)(n.p,{children:"Uses VectorIndexRetriever to find related memories within the long term memory.\nUses search to produce top 10 results."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"query (str): The query that we want to find related memories for"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"List[str]: A list of top 10 text results that matched the query"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>i});var o=t(6540);const s={},r=o.createContext(s);function l(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/735ced4f.89f03d6c.js b/assets/js/735ced4f.89f03d6c.js new file mode 100644 index 0000000000..5bcb9891e9 --- /dev/null +++ b/assets/js/735ced4f.89f03d6c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9200],{375:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var o=n(4848),a=n(8453);const s={sidebar_label:"tasks",title:"opendevin.action.tasks"},i=void 0,c={id:"python/opendevin/action/tasks",title:"opendevin.action.tasks",description:"TaskStateChangedAction Objects",source:"@site/modules/python/opendevin/action/tasks.md",sourceDirName:"python/opendevin/action",slug:"/python/opendevin/action/tasks",permalink:"/OpenDevin/modules/python/opendevin/action/tasks",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"tasks",title:"opendevin.action.tasks"},sidebar:"apiSidebar",previous:{title:"github",permalink:"/OpenDevin/modules/python/opendevin/action/github"},next:{title:"agent_controller",permalink:"/OpenDevin/modules/python/opendevin/controller/agent_controller"}},r={},d=[{value:"TaskStateChangedAction Objects",id:"taskstatechangedaction-objects",level:2}];function l(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"taskstatechangedaction-objects",children:"TaskStateChangedAction Objects"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass TaskStateChangedAction(NotExecutableAction)\n"})}),"\n",(0,o.jsx)(t.p,{children:"Fake action, just to notify the client that a task state has changed."})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>c});var o=n(6540);const a={},s=o.createContext(a);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/73b24ddd.a24f51ef.js b/assets/js/73b24ddd.a24f51ef.js deleted file mode 100644 index 906f471cf5..0000000000 --- a/assets/js/73b24ddd.a24f51ef.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2173],{7004:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>p,contentTitle:()=>i,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>c});var t=s(4848),r=s(8453);const o={sidebar_label:"prompts",title:"monologue_agent.utils.prompts"},i=void 0,l={id:"python/monologue_agent/utils/prompts",title:"monologue_agent.utils.prompts",description:"get\\summarize\\monologue\\_prompt",source:"@site/docs/python/monologue_agent/utils/prompts.md",sourceDirName:"python/monologue_agent/utils",slug:"/python/monologue_agent/utils/prompts",permalink:"/OpenDevin/docs/python/monologue_agent/utils/prompts",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"prompts",title:"monologue_agent.utils.prompts"}},p={},c=[{value:"get_summarize_monologue_prompt",id:"get_summarize_monologue_prompt",level:4},{value:"get_request_action_prompt",id:"get_request_action_prompt",level:4},{value:"parse_action_response",id:"parse_action_response",level:4},{value:"parse_summary_response",id:"parse_summary_response",level:4}];function a(e){const n={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h4,{id:"get_summarize_monologue_prompt",children:"get_summarize_monologue_prompt"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def get_summarize_monologue_prompt(thoughts: List[dict])\n"})}),"\n",(0,t.jsx)(n.p,{children:"Gets the prompt for summarizing the monologue"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"str: A formatted string with the current monologue within the prompt"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"get_request_action_prompt",children:"get_request_action_prompt"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def get_request_action_prompt(\n task: str,\n thoughts: List[dict],\n background_commands_obs: List[CmdOutputObservation] = [])\n"})}),"\n",(0,t.jsx)(n.p,{children:"Gets the action prompt formatted with appropriate values."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"task (str): The current task the agent is trying to accomplish"}),"\n",(0,t.jsx)(n.li,{children:"thoughts (List[dict]): The agent's current thoughts"}),"\n",(0,t.jsx)(n.li,{children:"background_commands_obs (List[CmdOutputObservation]): List of all observed background commands running"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"str: Formatted prompt string with hint, task, monologue, and background included"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"parse_action_response",children:"parse_action_response"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def parse_action_response(response: str) -> Action\n"})}),"\n",(0,t.jsx)(n.p,{children:"Parses a string to find an action within it"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"response (str): The string to be parsed"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Action: The action that was found in the response string"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"parse_summary_response",children:"parse_summary_response"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def parse_summary_response(response: str) -> List[dict]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Parses a summary of the monologue"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"response (str): The response string to be parsed"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"List[dict]: The list of summaries output by the model"}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>l});var t=s(6540);const r={},o=t.createContext(r);function i(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/74f506f5.2265f25a.js b/assets/js/74f506f5.2265f25a.js deleted file mode 100644 index ac2617b528..0000000000 --- a/assets/js/74f506f5.2265f25a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9824],{7465:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>l});var i=t(4848),r=t(8453);const a={sidebar_label:"main",title:"opendevin.main"},o=void 0,s={id:"python/opendevin/main",title:"opendevin.main",description:"read\\task\\from\\_file",source:"@site/docs/python/opendevin/main.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/main",permalink:"/OpenDevin/docs/python/opendevin/main",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"main",title:"opendevin.main"},sidebar:"apiSidebar",previous:{title:"logger",permalink:"/OpenDevin/docs/python/opendevin/logger"},next:{title:"plan",permalink:"/OpenDevin/docs/python/opendevin/plan"}},d={},l=[{value:"read_task_from_file",id:"read_task_from_file",level:4},{value:"read_task_from_stdin",id:"read_task_from_stdin",level:4},{value:"main",id:"main",level:4}];function c(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h4,{id:"read_task_from_file",children:"read_task_from_file"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def read_task_from_file(file_path: str) -> str\n"})}),"\n",(0,i.jsx)(n.p,{children:"Read task from the specified file."}),"\n",(0,i.jsx)(n.h4,{id:"read_task_from_stdin",children:"read_task_from_stdin"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def read_task_from_stdin() -> str\n"})}),"\n",(0,i.jsx)(n.p,{children:"Read task from stdin."}),"\n",(0,i.jsx)(n.h4,{id:"main",children:"main"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"async def main(task_str: str = '')\n"})}),"\n",(0,i.jsx)(n.p,{children:"Main coroutine to run the agent controller with task input flexibility."})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>s});var i=t(6540);const r={},a=i.createContext(r);function o(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7560c034.fcd39ecb.js b/assets/js/7560c034.fcd39ecb.js new file mode 100644 index 0000000000..8c82168108 --- /dev/null +++ b/assets/js/7560c034.fcd39ecb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5289],{6771:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var r=t(4848),s=t(8453);const a={sidebar_label:"parser",title:"agenthub.SWE_agent.parser"},o=void 0,i={id:"python/agenthub/SWE_agent/parser",title:"agenthub.SWE_agent.parser",description:"get\\action\\from\\_string",source:"@site/modules/python/agenthub/SWE_agent/parser.md",sourceDirName:"python/agenthub/SWE_agent",slug:"/python/agenthub/SWE_agent/parser",permalink:"/OpenDevin/modules/python/agenthub/SWE_agent/parser",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"parser",title:"agenthub.SWE_agent.parser"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/SWE_agent/agent"},next:{title:"codeact_agent",permalink:"/OpenDevin/modules/python/agenthub/codeact_agent/"}},c={},d=[{value:"get_action_from_string",id:"get_action_from_string",level:4},{value:"parse_command",id:"parse_command",level:4}];function l(n){const e={code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h4,{id:"get_action_from_string",children:"get_action_from_string"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def get_action_from_string(command_string: str,\n path: str,\n line: int,\n thoughts: str = '') -> Action | None\n"})}),"\n",(0,r.jsx)(e.p,{children:"Parses the command string to find which command the agent wants to run\nConverts the command into a proper Action and returns"}),"\n",(0,r.jsx)(e.h4,{id:"parse_command",children:"parse_command"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def parse_command(input_str: str, path: str, line: int)\n"})}),"\n",(0,r.jsx)(e.p,{children:"Parses a given string and separates the command (enclosed in triple backticks) from any accompanying text."}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"input_str"})," ",(0,r.jsx)(e.em,{children:"str"})," - The input string to be parsed."]}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"tuple"})," - A tuple containing the command and the accompanying text (if any)."]}),"\n"]})]})}function p(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(l,{...n})}):l(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>o,x:()=>i});var r=t(6540);const s={},a=r.createContext(s);function o(n){const e=r.useContext(a);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function i(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:o(n.components),r.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/77a072c5.e31dabef.js b/assets/js/77a072c5.e31dabef.js deleted file mode 100644 index 0cd1145560..0000000000 --- a/assets/js/77a072c5.e31dabef.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9473],{9943:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>c,toc:()=>r});var s=t(4848),i=t(8453);const l={sidebar_label:"action",title:"schema.action"},a=void 0,c={id:"python/schema/action",title:"schema.action",description:"ActionTypeSchema Objects",source:"@site/docs/python/schema/action.md",sourceDirName:"python/schema",slug:"/python/schema/action",permalink:"/OpenDevin/docs/python/schema/action",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"action",title:"schema.action"}},o={},r=[{value:"ActionTypeSchema Objects",id:"actiontypeschema-objects",level:2},{value:"INIT",id:"init",level:4},{value:"START",id:"start",level:4},{value:"READ",id:"read",level:4},{value:"WRITE",id:"write",level:4},{value:"RUN",id:"run",level:4},{value:"KILL",id:"kill",level:4},{value:"BROWSE",id:"browse",level:4},{value:"RECALL",id:"recall",level:4},{value:"THINK",id:"think",level:4},{value:"DELEGATE",id:"delegate",level:4},{value:"FINISH",id:"finish",level:4},{value:"PAUSE",id:"pause",level:4},{value:"RESUME",id:"resume",level:4},{value:"STOP",id:"stop",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"actiontypeschema-objects",children:"ActionTypeSchema Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class ActionTypeSchema(BaseModel)\n"})}),"\n",(0,s.jsx)(n.h4,{id:"init",children:"INIT"}),"\n",(0,s.jsx)(n.p,{children:"Initializes the agent. Only sent by client."}),"\n",(0,s.jsx)(n.h4,{id:"start",children:"START"}),"\n",(0,s.jsx)(n.p,{children:"Starts a new development task. Only sent by the client."}),"\n",(0,s.jsx)(n.h4,{id:"read",children:"READ"}),"\n",(0,s.jsx)(n.p,{children:"Reads the content of a file."}),"\n",(0,s.jsx)(n.h4,{id:"write",children:"WRITE"}),"\n",(0,s.jsx)(n.p,{children:"Writes the content to a file."}),"\n",(0,s.jsx)(n.h4,{id:"run",children:"RUN"}),"\n",(0,s.jsx)(n.p,{children:"Runs a command."}),"\n",(0,s.jsx)(n.h4,{id:"kill",children:"KILL"}),"\n",(0,s.jsx)(n.p,{children:"Kills a background command."}),"\n",(0,s.jsx)(n.h4,{id:"browse",children:"BROWSE"}),"\n",(0,s.jsx)(n.p,{children:"Opens a web page."}),"\n",(0,s.jsx)(n.h4,{id:"recall",children:"RECALL"}),"\n",(0,s.jsx)(n.p,{children:"Searches long-term memory"}),"\n",(0,s.jsx)(n.h4,{id:"think",children:"THINK"}),"\n",(0,s.jsx)(n.p,{children:"Allows the agent to make a plan, set a goal, or record thoughts"}),"\n",(0,s.jsx)(n.h4,{id:"delegate",children:"DELEGATE"}),"\n",(0,s.jsx)(n.p,{children:"Delegates a task to another agent."}),"\n",(0,s.jsx)(n.h4,{id:"finish",children:"FINISH"}),"\n",(0,s.jsx)(n.p,{children:"If you're absolutely certain that you've completed your task and have tested your work,\nuse the finish action to stop working."}),"\n",(0,s.jsx)(n.h4,{id:"pause",children:"PAUSE"}),"\n",(0,s.jsx)(n.p,{children:"Pauses the task."}),"\n",(0,s.jsx)(n.h4,{id:"resume",children:"RESUME"}),"\n",(0,s.jsx)(n.p,{children:"Resumes the task."}),"\n",(0,s.jsx)(n.h4,{id:"stop",children:"STOP"}),"\n",(0,s.jsx)(n.p,{children:"Stops the task. Must send a start action to restart a new task."})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>c});var s=t(6540);const i={},l=s.createContext(i);function a(e){const n=s.useContext(l);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7869fe0d.c267fdc9.js b/assets/js/7869fe0d.c267fdc9.js new file mode 100644 index 0000000000..38670e4865 --- /dev/null +++ b/assets/js/7869fe0d.c267fdc9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5650],{3577:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>r,toc:()=>a});var o=t(4848),s=t(8453);const l={sidebar_label:"monologue",title:"agenthub.monologue_agent.utils.monologue"},i=void 0,r={id:"python/agenthub/monologue_agent/utils/monologue",title:"agenthub.monologue_agent.utils.monologue",description:"Monologue Objects",source:"@site/modules/python/agenthub/monologue_agent/utils/monologue.md",sourceDirName:"python/agenthub/monologue_agent/utils",slug:"/python/agenthub/monologue_agent/utils/monologue",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/monologue",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"monologue",title:"agenthub.monologue_agent.utils.monologue"},sidebar:"apiSidebar",previous:{title:"memory",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/memory"},next:{title:"prompts",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/prompts"}},h={},a=[{value:"Monologue Objects",id:"monologue-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"add_event",id:"add_event",level:4},{value:"get_thoughts",id:"get_thoughts",level:4},{value:"get_total_length",id:"get_total_length",level:4},{value:"condense",id:"condense",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"monologue-objects",children:"Monologue Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class Monologue()\n"})}),"\n",(0,o.jsx)(n.p,{children:"The monologue is a representation for the agent's internal monologue where it can think.\nThe agent has the capability of using this monologue for whatever it wants."}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initialize the empty list of thoughts"}),"\n",(0,o.jsx)(n.h4,{id:"add_event",children:"add_event"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def add_event(t: dict)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Adds an event to memory if it is a valid event."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"t (dict): The thought that we want to add to memory"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"AgentEventTypeError: If t is not a dict"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"get_thoughts",children:"get_thoughts"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def get_thoughts()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Get the current thoughts of the agent."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"List: The list of thoughts that the agent has."}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"get_total_length",children:"get_total_length"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def get_total_length()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Gives the total number of characters in all thoughts"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Int: Total number of chars in thoughts."}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"condense",children:"condense"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def condense(llm: LLM)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Attempts to condense the monologue by using the llm"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"llm (LLM): llm to be used for summarization"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Exception: the same exception as it got from the llm or processing the response"}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>r});var o=t(6540);const s={},l=o.createContext(s);function i(e){const n=o.useContext(l);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7a3df8fe.51cf651a.js b/assets/js/7a3df8fe.51cf651a.js deleted file mode 100644 index b068c9468f..0000000000 --- a/assets/js/7a3df8fe.51cf651a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[691],{6326:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>p});var o=t(4848),s=t(8453);const r={sidebar_label:"run",title:"opendevin.observation.run"},i=void 0,a={id:"python/opendevin/observation/run",title:"opendevin.observation.run",description:"CmdOutputObservation Objects",source:"@site/docs/python/opendevin/observation/run.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/run",permalink:"/OpenDevin/docs/python/opendevin/observation/run",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"run",title:"opendevin.observation.run"},sidebar:"apiSidebar",previous:{title:"recall",permalink:"/OpenDevin/docs/python/opendevin/observation/recall"},next:{title:"process",permalink:"/OpenDevin/docs/python/opendevin/sandbox/docker/process"}},c={},p=[{value:"CmdOutputObservation Objects",id:"cmdoutputobservation-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"cmdoutputobservation-objects",children:"CmdOutputObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass CmdOutputObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents the output of a command."})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var o=t(6540);const s={},r=o.createContext(s);function i(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7bbf9390.8de2b381.js b/assets/js/7bbf9390.8de2b381.js new file mode 100644 index 0000000000..f44c136788 --- /dev/null +++ b/assets/js/7bbf9390.8de2b381.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7127],{1519:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>o});var s=t(4848),i=t(8453);const a={sidebar_label:"task",title:"opendevin.schema.task"},r=void 0,d={id:"python/opendevin/schema/task",title:"opendevin.schema.task",description:"TaskState Objects",source:"@site/modules/python/opendevin/schema/task.md",sourceDirName:"python/opendevin/schema",slug:"/python/opendevin/schema/task",permalink:"/OpenDevin/modules/python/opendevin/schema/task",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"task",title:"opendevin.schema.task"},sidebar:"apiSidebar",previous:{title:"observation",permalink:"/OpenDevin/modules/python/opendevin/schema/observation"},next:{title:"agent",permalink:"/OpenDevin/modules/python/opendevin/server/agent/"}},l={},o=[{value:"TaskState Objects",id:"taskstate-objects",level:2},{value:"INIT",id:"init",level:4},{value:"RUNNING",id:"running",level:4},{value:"PAUSED",id:"paused",level:4},{value:"STOPPED",id:"stopped",level:4},{value:"FINISHED",id:"finished",level:4},{value:"ERROR",id:"error",level:4},{value:"TaskStateAction Objects",id:"taskstateaction-objects",level:2},{value:"START",id:"start",level:4},{value:"PAUSE",id:"pause",level:4},{value:"RESUME",id:"resume",level:4},{value:"STOP",id:"stop",level:4}];function c(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"taskstate-objects",children:"TaskState Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class TaskState(str, Enum)\n"})}),"\n",(0,s.jsx)(n.h4,{id:"init",children:"INIT"}),"\n",(0,s.jsx)(n.p,{children:"Initial state of the task."}),"\n",(0,s.jsx)(n.h4,{id:"running",children:"RUNNING"}),"\n",(0,s.jsx)(n.p,{children:"The task is running."}),"\n",(0,s.jsx)(n.h4,{id:"paused",children:"PAUSED"}),"\n",(0,s.jsx)(n.p,{children:"The task is paused."}),"\n",(0,s.jsx)(n.h4,{id:"stopped",children:"STOPPED"}),"\n",(0,s.jsx)(n.p,{children:"The task is stopped."}),"\n",(0,s.jsx)(n.h4,{id:"finished",children:"FINISHED"}),"\n",(0,s.jsx)(n.p,{children:"The task is finished."}),"\n",(0,s.jsx)(n.h4,{id:"error",children:"ERROR"}),"\n",(0,s.jsx)(n.p,{children:"An error occurred during the task."}),"\n",(0,s.jsx)(n.h2,{id:"taskstateaction-objects",children:"TaskStateAction Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class TaskStateAction(str, Enum)\n"})}),"\n",(0,s.jsx)(n.h4,{id:"start",children:"START"}),"\n",(0,s.jsx)(n.p,{children:"Starts the task."}),"\n",(0,s.jsx)(n.h4,{id:"pause",children:"PAUSE"}),"\n",(0,s.jsx)(n.p,{children:"Pauses the task."}),"\n",(0,s.jsx)(n.h4,{id:"resume",children:"RESUME"}),"\n",(0,s.jsx)(n.p,{children:"Resumes the task."}),"\n",(0,s.jsx)(n.h4,{id:"stop",children:"STOP"}),"\n",(0,s.jsx)(n.p,{children:"Stops the task."})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>d});var s=t(6540);const i={},a=s.createContext(i);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7c083d5c.bc07f806.js b/assets/js/7c083d5c.bc07f806.js deleted file mode 100644 index ba76cacd7a..0000000000 --- a/assets/js/7c083d5c.bc07f806.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9420],{3250:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>a,frontMatter:()=>d,metadata:()=>c,toc:()=>l});var i=t(4848),s=t(8453);const d={sidebar_position:3},o="\ud83e\udde0 Agents and Capabilities",c={id:"usage/agents",title:"\ud83e\udde0 Agents and Capabilities",description:"Monologue Agent",source:"@site/docs/usage/agents.md",sourceDirName:"usage",slug:"/usage/agents",permalink:"/OpenDevin/docs/usage/agents",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"docsSidebar",previous:{title:"Local LLM with Ollama",permalink:"/OpenDevin/docs/usage/llms/localLLMs"},next:{title:"\ud83d\udea7 Troubleshooting",permalink:"/OpenDevin/docs/usage/troubleshooting/"}},r={},l=[{value:"Monologue Agent",id:"monologue-agent",level:2},{value:"Description",id:"description",level:3},{value:"Actions",id:"actions",level:3},{value:"Observations",id:"observations",level:3},{value:"Methods",id:"methods",level:3},{value:"Planner Agent",id:"planner-agent",level:2},{value:"Description",id:"description-1",level:3},{value:"Actions",id:"actions-1",level:3},{value:"Observations",id:"observations-1",level:3},{value:"Methods",id:"methods-1",level:3},{value:"CodeAct Agent",id:"codeact-agent",level:2},{value:"Description",id:"description-2",level:3},{value:"Actions",id:"actions-2",level:3},{value:"Observations",id:"observations-2",level:3},{value:"Methods",id:"methods-2",level:3}];function h(e){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"-agents-and-capabilities",children:"\ud83e\udde0 Agents and Capabilities"}),"\n",(0,i.jsx)(n.h2,{id:"monologue-agent",children:"Monologue Agent"}),"\n",(0,i.jsx)(n.h3,{id:"description",children:"Description"}),"\n",(0,i.jsx)(n.p,{children:"The Monologue Agent utilizes long and short term memory to complete tasks.\nLong term memory is stored as a LongTermMemory object and the model uses it to search for examples from the past.\nShort term memory is stored as a Monologue object and the model can condense it as necessary."}),"\n",(0,i.jsx)(n.h3,{id:"actions",children:"Actions"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Action"}),",\n",(0,i.jsx)(n.code,{children:"NullAction"}),",\n",(0,i.jsx)(n.code,{children:"CmdRunAction"}),",\n",(0,i.jsx)(n.code,{children:"FileWriteAction"}),",\n",(0,i.jsx)(n.code,{children:"FileReadAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentRecallAction"}),",\n",(0,i.jsx)(n.code,{children:"BrowseURLAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentThinkAction"})]}),"\n",(0,i.jsx)(n.h3,{id:"observations",children:"Observations"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Observation"}),",\n",(0,i.jsx)(n.code,{children:"NullObservation"}),",\n",(0,i.jsx)(n.code,{children:"CmdOutputObservation"}),",\n",(0,i.jsx)(n.code,{children:"FileReadObservation"}),",\n",(0,i.jsx)(n.code,{children:"AgentRecallObservation"}),",\n",(0,i.jsx)(n.code,{children:"BrowserOutputObservation"})]}),"\n",(0,i.jsx)(n.h3,{id:"methods",children:"Methods"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Method"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"__init__"})}),(0,i.jsx)(n.td,{children:"Initializes the agent with a long term memory, and an internal monologue"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"_add_event"})}),(0,i.jsx)(n.td,{children:"Appends events to the monologue of the agent and condenses with summary automatically if the monologue is too long"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"_initialize"})}),(0,i.jsxs)(n.td,{children:["Utilizes the ",(0,i.jsx)(n.code,{children:"INITIAL_THOUGHTS"})," list to give the agent a context for its capabilities and how to navigate the ",(0,i.jsx)(n.code,{children:"/workspace"})]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"step"})}),(0,i.jsx)(n.td,{children:"Modifies the current state by adding the most recent actions and observations, then prompts the model to think about its next action to take."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"search_memory"})}),(0,i.jsxs)(n.td,{children:["Uses ",(0,i.jsx)(n.code,{children:"VectorIndexRetriever"})," to find related memories within the long term memory."]})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"planner-agent",children:"Planner Agent"}),"\n",(0,i.jsx)(n.h3,{id:"description-1",children:"Description"}),"\n",(0,i.jsx)(n.p,{children:"The planner agent utilizes a special prompting strategy to create long term plans for solving problems.\nThe agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step."}),"\n",(0,i.jsx)(n.h3,{id:"actions-1",children:"Actions"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"NullAction"}),",\n",(0,i.jsx)(n.code,{children:"CmdRunAction"}),",\n",(0,i.jsx)(n.code,{children:"CmdKillAction"}),",\n",(0,i.jsx)(n.code,{children:"BrowseURLAction"}),",\n",(0,i.jsx)(n.code,{children:"FileReadAction"}),",\n",(0,i.jsx)(n.code,{children:"FileWriteAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentRecallAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentThinkAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentFinishAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentSummarizeAction"}),",\n",(0,i.jsx)(n.code,{children:"AddTaskAction"}),",\n",(0,i.jsx)(n.code,{children:"ModifyTaskAction"}),","]}),"\n",(0,i.jsx)(n.h3,{id:"observations-1",children:"Observations"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Observation"}),",\n",(0,i.jsx)(n.code,{children:"NullObservation"}),",\n",(0,i.jsx)(n.code,{children:"CmdOutputObservation"}),",\n",(0,i.jsx)(n.code,{children:"FileReadObservation"}),",\n",(0,i.jsx)(n.code,{children:"AgentRecallObservation"}),",\n",(0,i.jsx)(n.code,{children:"BrowserOutputObservation"})]}),"\n",(0,i.jsx)(n.h3,{id:"methods-1",children:"Methods"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Method"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"__init__"})}),(0,i.jsxs)(n.td,{children:["Initializes an agent with ",(0,i.jsx)(n.code,{children:"llm"})]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"step"})}),(0,i.jsxs)(n.td,{children:["Checks to see if current step is completed, returns ",(0,i.jsx)(n.code,{children:"AgentFinishAction"})," if True. Otherwise, creates a plan prompt and sends to model for inference, adding the result as the next action."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"search_memory"})}),(0,i.jsx)(n.td,{children:"Not yet implemented"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"codeact-agent",children:"CodeAct Agent"}),"\n",(0,i.jsx)(n.h3,{id:"description-2",children:"Description"}),"\n",(0,i.jsx)(n.p,{children:"The Code Act Agent is a minimalist agent. The agent works by passing the model a list of action-observation pairs and prompting the model to take the next step."}),"\n",(0,i.jsx)(n.h3,{id:"actions-2",children:"Actions"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Action"}),",\n",(0,i.jsx)(n.code,{children:"CmdRunAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentEchoAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentFinishAction"}),","]}),"\n",(0,i.jsx)(n.h3,{id:"observations-2",children:"Observations"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"CmdOutputObservation"}),",\n",(0,i.jsx)(n.code,{children:"AgentMessageObservation"}),","]}),"\n",(0,i.jsx)(n.h3,{id:"methods-2",children:"Methods"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Method"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"__init__"})}),(0,i.jsxs)(n.td,{children:["Initializes an agent with ",(0,i.jsx)(n.code,{children:"llm"})," and a list of messages ",(0,i.jsx)(n.code,{children:"List[Mapping[str, str]]"})]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"step"})}),(0,i.jsxs)(n.td,{children:["First, gets messages from state and then compiles them into a list for context. Next, pass the context list with the prompt to get the next command to execute. Finally, Execute command if valid, else return ",(0,i.jsx)(n.code,{children:"AgentEchoAction(INVALID_INPUT_MESSAGE)"})]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"search_memory"})}),(0,i.jsx)(n.td,{children:"Not yet implemented"})]})]})]})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>c});var i=t(6540);const s={},d=i.createContext(s);function o(e){const n=i.useContext(d);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7c4044b6.2a33e759.js b/assets/js/7c4044b6.2a33e759.js deleted file mode 100644 index a08caed0d2..0000000000 --- a/assets/js/7c4044b6.2a33e759.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2973],{3323:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>a});var t=s(4848),r=s(8453);const i={sidebar_label:"agent",title:"opendevin.agent"},l=void 0,c={id:"python/opendevin/agent",title:"opendevin.agent",description:"Agent Objects",source:"@site/docs/python/opendevin/agent.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/agent",permalink:"/OpenDevin/docs/python/opendevin/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"opendevin.agent"},sidebar:"apiSidebar",previous:{title:"system",permalink:"/OpenDevin/docs/python/opendevin/utils/system"},next:{title:"config",permalink:"/OpenDevin/docs/python/opendevin/config"}},o={},a=[{value:"Agent Objects",id:"agent-objects",level:2},{value:"complete",id:"complete",level:4},{value:"step",id:"step",level:4},{value:"search_memory",id:"search_memory",level:4},{value:"reset",id:"reset",level:4},{value:"register",id:"register",level:4},{value:"get_cls",id:"get_cls",level:4},{value:"list_agents",id:"list_agents",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"agent-objects",children:"Agent Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class Agent(ABC)\n"})}),"\n",(0,t.jsx)(n.p,{children:"This abstract base class is an general interface for an agent dedicated to\nexecuting a specific instruction and allowing human interaction with the\nagent during execution.\nIt tracks the execution status and maintains a history of interactions."}),"\n",(0,t.jsx)(n.h4,{id:"complete",children:"complete"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@property\ndef complete() -> bool\n"})}),"\n",(0,t.jsx)(n.p,{children:"Indicates whether the current instruction execution is complete."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"complete (bool): True if execution is complete; False otherwise."}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@abstractmethod\ndef step(state: 'State') -> 'Action'\n"})}),"\n",(0,t.jsx)(n.p,{children:"Starts the execution of the assigned instruction. This method should\nbe implemented by subclasses to define the specific execution logic."}),"\n",(0,t.jsx)(n.h4,{id:"search_memory",children:"search_memory"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@abstractmethod\ndef search_memory(query: str) -> List[str]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Searches the agent's memory for information relevant to the given query."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"query (str): The query to search for in the agent's memory."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"response (str): The response to the query."}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"reset",children:"reset"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def reset() -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Resets the agent's execution status and clears the history. This method can be used\nto prepare the agent for restarting the instruction or cleaning up before destruction."}),"\n",(0,t.jsx)(n.h4,{id:"register",children:"register"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@classmethod\ndef register(cls, name: str, agent_cls: Type['Agent'])\n"})}),"\n",(0,t.jsx)(n.p,{children:"Registers an agent class in the registry."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"name (str): The name to register the class under."}),"\n",(0,t.jsx)(n.li,{children:"agent_cls (Type['Agent']): The class to register."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AgentAlreadyRegisteredError: If name already registered"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"get_cls",children:"get_cls"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@classmethod\ndef get_cls(cls, name: str) -> Type['Agent']\n"})}),"\n",(0,t.jsx)(n.p,{children:"Retrieves an agent class from the registry."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"name (str): The name of the class to retrieve"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"agent_cls (Type['Agent']): The class registered under the specified name."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AgentNotRegisteredError: If name not registered"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"list_agents",children:"list_agents"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@classmethod\ndef list_agents(cls) -> list[str]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Retrieves the list of all agent names from the registry."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AgentNotRegisteredError: If no agent is registered"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>c});var t=s(6540);const r={},i=t.createContext(r);function l(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/81195787.2f0e6c60.js b/assets/js/81195787.2f0e6c60.js new file mode 100644 index 0000000000..2cc2152bd2 --- /dev/null +++ b/assets/js/81195787.2f0e6c60.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1487],{4308:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var o=t(4848),i=t(8453);const a={sidebar_label:"fileop",title:"opendevin.action.fileop"},c=void 0,s={id:"python/opendevin/action/fileop",title:"opendevin.action.fileop",description:"FileReadAction Objects",source:"@site/modules/python/opendevin/action/fileop.md",sourceDirName:"python/opendevin/action",slug:"/python/opendevin/action/fileop",permalink:"/OpenDevin/modules/python/opendevin/action/fileop",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"fileop",title:"opendevin.action.fileop"},sidebar:"apiSidebar",previous:{title:"base",permalink:"/OpenDevin/modules/python/opendevin/action/base"},next:{title:"github",permalink:"/OpenDevin/modules/python/opendevin/action/github"}},l={},p=[{value:"FileReadAction Objects",id:"filereadaction-objects",level:2}];function r(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"filereadaction-objects",children:"FileReadAction Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass FileReadAction(ExecutableAction)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Reads a file from a given path.\nCan be set to read specific lines using start and end\nDefault lines 0:-1 (whole file)"})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(r,{...e})}):r(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>s});var o=t(6540);const i={},a=o.createContext(i);function c(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/81dcebe5.10c0d73f.js b/assets/js/81dcebe5.10c0d73f.js deleted file mode 100644 index 576401f441..0000000000 --- a/assets/js/81dcebe5.10c0d73f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6362],{654:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>c,default:()=>p,frontMatter:()=>t,metadata:()=>d,toc:()=>l});var o=s(4848),r=s(8453);const t={sidebar_label:"process",title:"opendevin.sandbox.docker.process"},c=void 0,d={id:"python/opendevin/sandbox/docker/process",title:"opendevin.sandbox.docker.process",description:"DockerProcess Objects",source:"@site/docs/python/opendevin/sandbox/docker/process.md",sourceDirName:"python/opendevin/sandbox/docker",slug:"/python/opendevin/sandbox/docker/process",permalink:"/OpenDevin/docs/python/opendevin/sandbox/docker/process",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"process",title:"opendevin.sandbox.docker.process"},sidebar:"apiSidebar",previous:{title:"run",permalink:"/OpenDevin/docs/python/opendevin/observation/run"},next:{title:"sandbox",permalink:"/OpenDevin/docs/python/opendevin/sandbox/e2b/sandbox"}},i={},l=[{value:"DockerProcess Objects",id:"dockerprocess-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"parse_docker_exec_output",id:"parse_docker_exec_output",level:4},{value:"read_logs",id:"read_logs",level:4}];function a(e){const n={code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"dockerprocess-objects",children:"DockerProcess Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class DockerProcess(Process)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Represents a background command execution"}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__(id: int, command: str, result, pid: int)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initialize a DockerProcess instance."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"id"})," ",(0,o.jsx)(n.em,{children:"int"})," - The identifier of the command."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"command"})," ",(0,o.jsx)(n.em,{children:"str"})," - The command to be executed."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"result"})," - The result of the command execution."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"pid"})," ",(0,o.jsx)(n.em,{children:"int"})," - The process ID (PID) of the command."]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"parse_docker_exec_output",children:"parse_docker_exec_output"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def parse_docker_exec_output(logs: bytes) -> Tuple[bytes, bytes]\n"})}),"\n",(0,o.jsxs)(n.p,{children:["When you execute a command using ",(0,o.jsx)(n.code,{children:"exec"})," in a docker container, the output produced will be in bytes. this function parses the output of a Docker exec command."]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,o.jsxs)(n.p,{children:["Considering you have a docker container named ",(0,o.jsx)(n.code,{children:"my_container"})," up and running\n$ docker exec my_container echo \"Hello OpenDevin!\"\n>> b'\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\x13Hello OpenDevin!'"]}),"\n",(0,o.jsx)(n.p,{children:"Such binary logs will be processed by this function."}),"\n",(0,o.jsx)(n.p,{children:"The function handles message types, padding, and byte order to create a usable result. The primary goal is to convert raw container logs into a more structured format for further analysis or display."}),"\n",(0,o.jsx)(n.p,{children:"The function also returns a tail of bytes to ensure that no information is lost. It is a way to handle edge cases and maintain data integrity."}),"\n",(0,o.jsx)(n.p,{children:">> output_bytes = b'\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\x13Hello OpenDevin!'\n>> parsed_output, remaining_bytes = parse_docker_exec_output(output_bytes)"}),"\n",(0,o.jsx)(n.p,{children:">> print(parsed_output)\nb'Hello OpenDevin!'"}),"\n",(0,o.jsx)(n.p,{children:">> print(remaining_bytes)\nb''"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"logs"})," ",(0,o.jsx)(n.em,{children:"bytes"})," - The raw output logs of the command."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsx)(n.p,{children:"Tuple[bytes, bytes]: A tuple containing the parsed output and any remaining data."}),"\n",(0,o.jsx)(n.h4,{id:"read_logs",children:"read_logs"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def read_logs() -> str\n"})}),"\n",(0,o.jsx)(n.p,{children:"Read and decode the logs of the command."}),"\n",(0,o.jsx)(n.p,{children:"This function continuously reads the standard output of a subprocess and\nprocesses the output using the parse_docker_exec_output function to handle\nbinary log messages. It concatenates and decodes the output bytes into a\nstring, ensuring that no partial messages are lost during reading."}),"\n",(0,o.jsx)(n.p,{children:"Dummy Example:"}),"\n",(0,o.jsx)(n.p,{children:">> cmd = 'echo \"Hello OpenDevin!\"'\n>> result = subprocess.Popen(\ncmd, shell=True, stdout=subprocess.PIPE,\nstderr=subprocess.STDOUT, text=True, cwd='.'\n)\n>> bg_cmd = DockerProcess(id, cmd = cmd, result = result, pid)"}),"\n",(0,o.jsx)(n.p,{children:">> logs = bg_cmd.read_logs()\n>> print(logs)\nHello OpenDevin!"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"str"})," - The decoded logs(string) of the command."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>d});var o=s(6540);const r={},t=o.createContext(r);function c(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/822f9405.d2bdd3c9.js b/assets/js/822f9405.d2bdd3c9.js deleted file mode 100644 index ed5f9a15ac..0000000000 --- a/assets/js/822f9405.d2bdd3c9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5943],{3955:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>t,metadata:()=>d,toc:()=>a});var o=n(4848),r=n(8453);const t={sidebar_label:"session",title:"opendevin.server.session.session"},i=void 0,d={id:"python/opendevin/server/session/session",title:"opendevin.server.session.session",description:"Session Objects",source:"@site/docs/python/opendevin/server/session/session.md",sourceDirName:"python/opendevin/server/session",slug:"/python/opendevin/server/session/",permalink:"/OpenDevin/docs/python/opendevin/server/session/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"session",title:"opendevin.server.session.session"},sidebar:"apiSidebar",previous:{title:"msg_stack",permalink:"/OpenDevin/docs/python/opendevin/server/session/msg_stack"},next:{title:"listen",permalink:"/OpenDevin/docs/python/opendevin/server/listen"}},c={},a=[{value:"Session Objects",id:"session-objects",level:2},{value:"send_error",id:"send_error",level:4},{value:"send_message",id:"send_message",level:4}];function l(e){const s={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h2,{id:"session-objects",children:"Session Objects"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-python",children:"class Session()\n"})}),"\n",(0,o.jsx)(s.h4,{id:"send_error",children:"send_error"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-python",children:"async def send_error(message: str) -> bool\n"})}),"\n",(0,o.jsx)(s.p,{children:"Sends an error message to the client."}),"\n",(0,o.jsx)(s.h4,{id:"send_message",children:"send_message"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-python",children:"async def send_message(message: str) -> bool\n"})}),"\n",(0,o.jsx)(s.p,{children:"Sends a message to the client."})]})}function p(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>d});var o=n(6540);const r={},t=o.createContext(r);function i(e){const s=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/858ab766.9a225a54.js b/assets/js/858ab766.9a225a54.js deleted file mode 100644 index 1b0d50f638..0000000000 --- a/assets/js/858ab766.9a225a54.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4162],{2801:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>r,default:()=>a,frontMatter:()=>o,metadata:()=>p,toc:()=>d});var s=t(4848),i=t(8453);const o={sidebar_label:"jupyter",title:"opendevin.sandbox.plugins.jupyter"},r=void 0,p={id:"python/opendevin/sandbox/plugins/jupyter/__init__",title:"opendevin.sandbox.plugins.jupyter",description:"JupyterRequirement Objects",source:"@site/docs/python/opendevin/sandbox/plugins/jupyter/__init__.md",sourceDirName:"python/opendevin/sandbox/plugins/jupyter",slug:"/python/opendevin/sandbox/plugins/jupyter/__init__",permalink:"/OpenDevin/docs/python/opendevin/sandbox/plugins/jupyter/__init__",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"jupyter",title:"opendevin.sandbox.plugins.jupyter"},sidebar:"apiSidebar",previous:{title:"sandbox",permalink:"/OpenDevin/docs/python/opendevin/sandbox/e2b/sandbox"},next:{title:"mixin",permalink:"/OpenDevin/docs/python/opendevin/sandbox/plugins/mixin"}},u={},d=[{value:"JupyterRequirement Objects",id:"jupyterrequirement-objects",level:2},{value:"host_src",id:"host_src",level:4}];function c(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"jupyterrequirement-objects",children:"JupyterRequirement Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass JupyterRequirement(PluginRequirement)\n"})}),"\n",(0,s.jsx)(n.h4,{id:"host_src",children:"host_src"}),"\n",(0,s.jsx)(n.p,{children:"The directory of this file (sandbox/plugins/jupyter)"})]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>p});var s=t(6540);const i={},o=s.createContext(i);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function p(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8625080f.65a13058.js b/assets/js/8625080f.65a13058.js deleted file mode 100644 index 8e73a61245..0000000000 --- a/assets/js/8625080f.65a13058.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6152],{1968:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>o});var t=s(4848),r=s(8453);const i={sidebar_label:"agent",title:"agent"},l=void 0,c={id:"python/agent",title:"agent",description:"Agent Objects",source:"@site/docs/python/agent.md",sourceDirName:"python",slug:"/python/agent",permalink:"/OpenDevin/docs/python/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agent"}},a={},o=[{value:"Agent Objects",id:"agent-objects",level:2},{value:"complete",id:"complete",level:4},{value:"step",id:"step",level:4},{value:"search_memory",id:"search_memory",level:4},{value:"reset",id:"reset",level:4},{value:"register",id:"register",level:4},{value:"get_cls",id:"get_cls",level:4},{value:"list_agents",id:"list_agents",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"agent-objects",children:"Agent Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class Agent(ABC)\n"})}),"\n",(0,t.jsx)(n.p,{children:"This abstract base class is an general interface for an agent dedicated to\nexecuting a specific instruction and allowing human interaction with the\nagent during execution.\nIt tracks the execution status and maintains a history of interactions."}),"\n",(0,t.jsx)(n.h4,{id:"complete",children:"complete"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@property\ndef complete() -> bool\n"})}),"\n",(0,t.jsx)(n.p,{children:"Indicates whether the current instruction execution is complete."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"complete (bool): True if execution is complete; False otherwise."}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@abstractmethod\ndef step(state: 'State') -> 'Action'\n"})}),"\n",(0,t.jsx)(n.p,{children:"Starts the execution of the assigned instruction. This method should\nbe implemented by subclasses to define the specific execution logic."}),"\n",(0,t.jsx)(n.h4,{id:"search_memory",children:"search_memory"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@abstractmethod\ndef search_memory(query: str) -> List[str]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Searches the agent's memory for information relevant to the given query."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"query (str): The query to search for in the agent's memory."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"response (str): The response to the query."}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"reset",children:"reset"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def reset() -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Resets the agent's execution status and clears the history. This method can be used\nto prepare the agent for restarting the instruction or cleaning up before destruction."}),"\n",(0,t.jsx)(n.h4,{id:"register",children:"register"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@classmethod\ndef register(cls, name: str, agent_cls: Type['Agent'])\n"})}),"\n",(0,t.jsx)(n.p,{children:"Registers an agent class in the registry."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"name (str): The name to register the class under."}),"\n",(0,t.jsx)(n.li,{children:"agent_cls (Type['Agent']): The class to register."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AgentAlreadyRegisteredError: If name already registered"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"get_cls",children:"get_cls"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@classmethod\ndef get_cls(cls, name: str) -> Type['Agent']\n"})}),"\n",(0,t.jsx)(n.p,{children:"Retrieves an agent class from the registry."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"name (str): The name of the class to retrieve"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"agent_cls (Type['Agent']): The class registered under the specified name."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AgentNotRegisteredError: If name not registered"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"list_agents",children:"list_agents"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@classmethod\ndef list_agents(cls) -> list[str]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Retrieves the list of all agent names from the registry."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AgentNotRegisteredError: If no agent is registered"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>c});var t=s(6540);const r={},i=t.createContext(r);function l(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8698cc2c.b3bc0fbe.js b/assets/js/8698cc2c.b3bc0fbe.js deleted file mode 100644 index 74daca2cc8..0000000000 --- a/assets/js/8698cc2c.b3bc0fbe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8605],{8916:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>p,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var r=t(4848),s=t(8453);const o={sidebar_label:"prompt",title:"planner_agent.prompt"},i=void 0,l={id:"python/planner_agent/prompt",title:"planner_agent.prompt",description:"get\\_hint",source:"@site/docs/python/planner_agent/prompt.md",sourceDirName:"python/planner_agent",slug:"/python/planner_agent/prompt",permalink:"/OpenDevin/docs/python/planner_agent/prompt",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"prompt",title:"planner_agent.prompt"}},p={},a=[{value:"get_hint",id:"get_hint",level:4},{value:"get_prompt",id:"get_prompt",level:4},{value:"parse_response",id:"parse_response",level:4}];function c(n){const e={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h4,{id:"get_hint",children:"get_hint"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def get_hint(latest_action_id: str) -> str\n"})}),"\n",(0,r.jsx)(e.p,{children:"Returns action type hint based on given action_id"}),"\n",(0,r.jsx)(e.h4,{id:"get_prompt",children:"get_prompt"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def get_prompt(plan: Plan, history: List[Tuple[Action, Observation]]) -> str\n"})}),"\n",(0,r.jsx)(e.p,{children:"Gets the prompt for the planner agent.\nFormatted with the most recent action-observation pairs, current task, and hint based on last action"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"plan (Plan): The original plan outlined by the user with LLM defined tasks"}),"\n",(0,r.jsx)(e.li,{children:"history (List[Tuple[Action, Observation]]): List of corresponding action-observation pairs"}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"str: The formatted string prompt with historical values"}),"\n"]}),"\n",(0,r.jsx)(e.h4,{id:"parse_response",children:"parse_response"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def parse_response(response: str) -> Action\n"})}),"\n",(0,r.jsx)(e.p,{children:"Parses the model output to find a valid action to take"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"response (str): A response from the model that potentially contains an Action."}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Action: A valid next action to perform from model output"}),"\n"]})]})}function d(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(c,{...n})}):c(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>i,x:()=>l});var r=t(6540);const s={},o=r.createContext(s);function i(n){const e=r.useContext(o);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function l(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:i(n.components),r.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/88547037.95b27f25.js b/assets/js/88547037.95b27f25.js new file mode 100644 index 0000000000..74b03491a3 --- /dev/null +++ b/assets/js/88547037.95b27f25.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3815],{2956:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var s=t(4848),o=t(8453);const i={sidebar_label:"files",title:"opendevin.observation.files"},r=void 0,a={id:"python/opendevin/observation/files",title:"opendevin.observation.files",description:"FileReadObservation Objects",source:"@site/modules/python/opendevin/observation/files.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/files",permalink:"/OpenDevin/modules/python/opendevin/observation/files",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"files",title:"opendevin.observation.files"},sidebar:"apiSidebar",previous:{title:"error",permalink:"/OpenDevin/modules/python/opendevin/observation/error"},next:{title:"message",permalink:"/OpenDevin/modules/python/opendevin/observation/message"}},l={},c=[{value:"FileReadObservation Objects",id:"filereadobservation-objects",level:2},{value:"FileWriteObservation Objects",id:"filewriteobservation-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"filereadobservation-objects",children:"FileReadObservation Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass FileReadObservation(Observation)\n"})}),"\n",(0,s.jsx)(n.p,{children:"This data class represents the content of a file."}),"\n",(0,s.jsx)(n.h2,{id:"filewriteobservation-objects",children:"FileWriteObservation Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass FileWriteObservation(Observation)\n"})}),"\n",(0,s.jsx)(n.p,{children:"This data class represents a file write operation"})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var s=t(6540);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8c67e2e5.bc3e70d1.js b/assets/js/8c67e2e5.bc3e70d1.js deleted file mode 100644 index 3f97344def..0000000000 --- a/assets/js/8c67e2e5.bc3e70d1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1346],{9250:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>i});var r=n(4848),o=n(8453);const s={sidebar_label:"agent_controller",title:"controller.agent_controller"},l=void 0,a={id:"python/controller/agent_controller",title:"controller.agent_controller",description:"AgentController Objects",source:"@site/docs/python/controller/agent_controller.md",sourceDirName:"python/controller",slug:"/python/controller/agent_controller",permalink:"/OpenDevin/docs/python/controller/agent_controller",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent_controller",title:"controller.agent_controller"}},c={},i=[{value:"AgentController Objects",id:"agentcontroller-objects",level:2},{value:"setup_task",id:"setup_task",level:4},{value:"start",id:"start",level:4},{value:"get_task_state",id:"get_task_state",level:4}];function d(e){const t={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h2,{id:"agentcontroller-objects",children:"AgentController Objects"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"class AgentController()\n"})}),"\n",(0,r.jsx)(t.h4,{id:"setup_task",children:"setup_task"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"async def setup_task(task: str, inputs: dict = {})\n"})}),"\n",(0,r.jsx)(t.p,{children:"Sets up the agent controller with a task."}),"\n",(0,r.jsx)(t.h4,{id:"start",children:"start"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"async def start(task: str)\n"})}),"\n",(0,r.jsx)(t.p,{children:"Starts the agent controller with a task.\nIf task already run before, it will continue from the last step."}),"\n",(0,r.jsx)(t.h4,{id:"get_task_state",children:"get_task_state"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-python",children:"def get_task_state()\n"})}),"\n",(0,r.jsx)(t.p,{children:"Returns the current state of the agent task."})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>l,x:()=>a});var r=n(6540);const o={},s=r.createContext(o);function l(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:l(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8cfef73e.84648bfa.js b/assets/js/8cfef73e.84648bfa.js new file mode 100644 index 0000000000..489e48f52c --- /dev/null +++ b/assets/js/8cfef73e.84648bfa.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9818],{421:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>l,frontMatter:()=>d,metadata:()=>a,toc:()=>c});var t=o(4848),s=o(8453);const d={sidebar_label:"sandbox",title:"opendevin.sandbox.e2b.sandbox"},r=void 0,a={id:"python/opendevin/sandbox/e2b/sandbox",title:"opendevin.sandbox.e2b.sandbox",description:"E2BBox Objects",source:"@site/modules/python/opendevin/sandbox/e2b/sandbox.md",sourceDirName:"python/opendevin/sandbox/e2b",slug:"/python/opendevin/sandbox/e2b/sandbox",permalink:"/OpenDevin/modules/python/opendevin/sandbox/e2b/sandbox",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"sandbox",title:"opendevin.sandbox.e2b.sandbox"},sidebar:"apiSidebar",previous:{title:"process",permalink:"/OpenDevin/modules/python/opendevin/sandbox/docker/process"},next:{title:"jupyter",permalink:"/OpenDevin/modules/python/opendevin/sandbox/plugins/jupyter/__init__"}},i={},c=[{value:"E2BBox Objects",id:"e2bbox-objects",level:2},{value:"copy_to",id:"copy_to",level:4}];function p(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"e2bbox-objects",children:"E2BBox Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class E2BBox(Sandbox)\n"})}),"\n",(0,t.jsx)(n.h4,{id:"copy_to",children:"copy_to"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def copy_to(host_src: str, sandbox_dest: str, recursive: bool = False)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Copies a local file or directory to the sandbox."})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>a});var t=o(6540);const s={},d=t.createContext(s);function r(e){const n=t.useContext(d);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),t.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8e39f6b9.f45262ea.js b/assets/js/8e39f6b9.f45262ea.js deleted file mode 100644 index a6b7be7231..0000000000 --- a/assets/js/8e39f6b9.f45262ea.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[117],{3679:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>c,default:()=>p,frontMatter:()=>t,metadata:()=>d,toc:()=>l});var r=s(4848),o=s(8453);const t={sidebar_label:"process",title:"sandbox.docker.process"},c=void 0,d={id:"python/sandbox/docker/process",title:"sandbox.docker.process",description:"DockerProcess Objects",source:"@site/docs/python/sandbox/docker/process.md",sourceDirName:"python/sandbox/docker",slug:"/python/sandbox/docker/process",permalink:"/OpenDevin/docs/python/sandbox/docker/process",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"process",title:"sandbox.docker.process"}},i={},l=[{value:"DockerProcess Objects",id:"dockerprocess-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"parse_docker_exec_output",id:"parse_docker_exec_output",level:4},{value:"read_logs",id:"read_logs",level:4}];function a(e){const n={code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"dockerprocess-objects",children:"DockerProcess Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class DockerProcess(Process)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Represents a background command execution"}),"\n",(0,r.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def __init__(id: int, command: str, result, pid: int)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Initialize a DockerProcess instance."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"id"})," ",(0,r.jsx)(n.em,{children:"int"})," - The identifier of the command."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"command"})," ",(0,r.jsx)(n.em,{children:"str"})," - The command to be executed."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"result"})," - The result of the command execution."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"pid"})," ",(0,r.jsx)(n.em,{children:"int"})," - The process ID (PID) of the command."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"parse_docker_exec_output",children:"parse_docker_exec_output"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def parse_docker_exec_output(logs: bytes) -> Tuple[bytes, bytes]\n"})}),"\n",(0,r.jsxs)(n.p,{children:["When you execute a command using ",(0,r.jsx)(n.code,{children:"exec"})," in a docker container, the output produced will be in bytes. this function parses the output of a Docker exec command."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,r.jsxs)(n.p,{children:["Considering you have a docker container named ",(0,r.jsx)(n.code,{children:"my_container"})," up and running\n$ docker exec my_container echo \"Hello OpenDevin!\"\n>> b'\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\x13Hello OpenDevin!'"]}),"\n",(0,r.jsx)(n.p,{children:"Such binary logs will be processed by this function."}),"\n",(0,r.jsx)(n.p,{children:"The function handles message types, padding, and byte order to create a usable result. The primary goal is to convert raw container logs into a more structured format for further analysis or display."}),"\n",(0,r.jsx)(n.p,{children:"The function also returns a tail of bytes to ensure that no information is lost. It is a way to handle edge cases and maintain data integrity."}),"\n",(0,r.jsx)(n.p,{children:">> output_bytes = b'\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\x13Hello OpenDevin!'\n>> parsed_output, remaining_bytes = parse_docker_exec_output(output_bytes)"}),"\n",(0,r.jsx)(n.p,{children:">> print(parsed_output)\nb'Hello OpenDevin!'"}),"\n",(0,r.jsx)(n.p,{children:">> print(remaining_bytes)\nb''"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"logs"})," ",(0,r.jsx)(n.em,{children:"bytes"})," - The raw output logs of the command."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"Tuple[bytes, bytes]: A tuple containing the parsed output and any remaining data."}),"\n",(0,r.jsx)(n.h4,{id:"read_logs",children:"read_logs"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def read_logs() -> str\n"})}),"\n",(0,r.jsx)(n.p,{children:"Read and decode the logs of the command."}),"\n",(0,r.jsx)(n.p,{children:"This function continuously reads the standard output of a subprocess and\nprocesses the output using the parse_docker_exec_output function to handle\nbinary log messages. It concatenates and decodes the output bytes into a\nstring, ensuring that no partial messages are lost during reading."}),"\n",(0,r.jsx)(n.p,{children:"Dummy Example:"}),"\n",(0,r.jsx)(n.p,{children:">> cmd = 'echo \"Hello OpenDevin!\"'\n>> result = subprocess.Popen(\ncmd, shell=True, stdout=subprocess.PIPE,\nstderr=subprocess.STDOUT, text=True, cwd='.'\n)\n>> bg_cmd = DockerProcess(id, cmd = cmd, result = result, pid)"}),"\n",(0,r.jsx)(n.p,{children:">> logs = bg_cmd.read_logs()\n>> print(logs)\nHello OpenDevin!"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"str"})," - The decoded logs(string) of the command."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>d});var r=s(6540);const o={},t=r.createContext(o);function c(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8e5db870.819a0b47.js b/assets/js/8e5db870.819a0b47.js new file mode 100644 index 0000000000..d4cb8c13ab --- /dev/null +++ b/assets/js/8e5db870.819a0b47.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4534],{8368:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>c,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var o=i(4848),t=i(8453);const s={},r="Azure OpenAI LLM",a={id:"usage/llms/azureLLMs",title:"Azure OpenAI LLM",description:"Completion",source:"@site/modules/usage/llms/azureLLMs.md",sourceDirName:"usage/llms",slug:"/usage/llms/azureLLMs",permalink:"/OpenDevin/modules/usage/llms/azureLLMs",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"\ud83e\udd16 LLM Backends",permalink:"/OpenDevin/modules/usage/llms/"},next:{title:"Google Gemini/Vertex LLM",permalink:"/OpenDevin/modules/usage/llms/googleLLMs"}},d={},l=[{value:"Completion",id:"completion",level:2},{value:"Azure openai configs",id:"azure-openai-configs",level:3},{value:"Embeddings",id:"embeddings",level:2},{value:"Azure openai configs",id:"azure-openai-configs-1",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"azure-openai-llm",children:"Azure OpenAI LLM"}),"\n",(0,o.jsx)(n.h2,{id:"completion",children:"Completion"}),"\n",(0,o.jsxs)(n.p,{children:["OpenDevin uses LiteLLM for completion calls. You can find their documentation on Azure ",(0,o.jsx)(n.a,{href:"https://docs.litellm.ai/docs/providers/azure",children:"here"})]}),"\n",(0,o.jsx)(n.h3,{id:"azure-openai-configs",children:"Azure openai configs"}),"\n",(0,o.jsxs)(n.p,{children:["When running the OpenDevin Docker image, you'll need to set the following environment variables using ",(0,o.jsx)(n.code,{children:"-e"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'LLM_BASE_URL="" # e.g. "https://openai-gpt-4-test-v-1.openai.azure.com/"\nLLM_API_KEY=""\nLLM_MODEL="azure/"\nLLM_API_VERSION = "" # e.g. "2024-02-15-preview"\n'})}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsx)(n.p,{children:"You can find your ChatGPT deployment name on the deployments page in Azure. It could be the same with the chat model name (e.g. 'GPT4-1106-preview'), by default or initially set, but it doesn't have to be the same. Run opendevin, and when you load it in the browser, go to Settings and set model as above: \"azure/\". If it's not in the list, enter your own text and save it."})}),"\n",(0,o.jsx)(n.h2,{id:"embeddings",children:"Embeddings"}),"\n",(0,o.jsxs)(n.p,{children:["OpenDevin uses llama-index for embeddings. You can find their documentation on Azure ",(0,o.jsx)(n.a,{href:"https://docs.llamaindex.ai/en/stable/api_reference/embeddings/azure_openai/",children:"here"})]}),"\n",(0,o.jsx)(n.h3,{id:"azure-openai-configs-1",children:"Azure openai configs"}),"\n",(0,o.jsx)(n.p,{children:'The model used for Azure OpenAI embeddings is "text-embedding-ada-002".\nYou need the correct deployment name for this model in your Azure account.'}),"\n",(0,o.jsxs)(n.p,{children:["When running OpenDevin in Docker, set the following environment variables using ",(0,o.jsx)(n.code,{children:"-e"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'LLM_EMBEDDING_MODEL="azureopenai"\nLLM_EMBEDDING_DEPLOYMENT_NAME = "" # e.g. "TextEmbedding..."\nLLM_API_VERSION = "" # e.g. "2024-02-15-preview"\n'})})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>a});var o=i(6540);const t={},s=o.createContext(t);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8f2aae93.4da80471.js b/assets/js/8f2aae93.4da80471.js new file mode 100644 index 0000000000..feaf360930 --- /dev/null +++ b/assets/js/8f2aae93.4da80471.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1976],{3202:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var o=t(4848),s=t(8453);const r={sidebar_label:"recall",title:"opendevin.observation.recall"},a=void 0,i={id:"python/opendevin/observation/recall",title:"opendevin.observation.recall",description:"AgentRecallObservation Objects",source:"@site/modules/python/opendevin/observation/recall.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/recall",permalink:"/OpenDevin/modules/python/opendevin/observation/recall",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"recall",title:"opendevin.observation.recall"},sidebar:"apiSidebar",previous:{title:"message",permalink:"/OpenDevin/modules/python/opendevin/observation/message"},next:{title:"run",permalink:"/OpenDevin/modules/python/opendevin/observation/run"}},l={},c=[{value:"AgentRecallObservation Objects",id:"agentrecallobservation-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"agentrecallobservation-objects",children:"AgentRecallObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass AgentRecallObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents a list of memories recalled by the agent."})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var o=t(6540);const s={},r=o.createContext(s);function a(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9062f025.e38ef1e8.js b/assets/js/9062f025.e38ef1e8.js deleted file mode 100644 index e45a867f78..0000000000 --- a/assets/js/9062f025.e38ef1e8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9261],{678:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var r=t(4848),s=t(8453);const o={sidebar_label:"parser",title:"SWE_agent.parser"},a=void 0,i={id:"python/SWE_agent/parser",title:"SWE_agent.parser",description:"get\\action\\from\\_string",source:"@site/docs/python/SWE_agent/parser.md",sourceDirName:"python/SWE_agent",slug:"/python/SWE_agent/parser",permalink:"/OpenDevin/docs/python/SWE_agent/parser",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"parser",title:"SWE_agent.parser"}},c={},d=[{value:"get_action_from_string",id:"get_action_from_string",level:4},{value:"parse_command",id:"parse_command",level:4}];function l(n){const e={code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h4,{id:"get_action_from_string",children:"get_action_from_string"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def get_action_from_string(command_string: str,\n path: str,\n line: int,\n thoughts: str = '') -> Action | None\n"})}),"\n",(0,r.jsx)(e.p,{children:"Parses the command string to find which command the agent wants to run\nConverts the command into a proper Action and returns"}),"\n",(0,r.jsx)(e.h4,{id:"parse_command",children:"parse_command"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def parse_command(input_str: str, path: str, line: int)\n"})}),"\n",(0,r.jsx)(e.p,{children:"Parses a given string and separates the command (enclosed in triple backticks) from any accompanying text."}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"input_str"})," ",(0,r.jsx)(e.em,{children:"str"})," - The input string to be parsed."]}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"tuple"})," - A tuple containing the command and the accompanying text (if any)."]}),"\n"]})]})}function p(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(l,{...n})}):l(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>a,x:()=>i});var r=t(6540);const s={},o=r.createContext(s);function a(n){const e=r.useContext(o);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function i(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:a(n.components),r.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.417b3822.js b/assets/js/935f2afb.417b3822.js deleted file mode 100644 index 864c4eb967..0000000000 --- a/assets/js/935f2afb.417b3822.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"\ud83d\udcbb OpenDevin","href":"/OpenDevin/docs/usage/intro","docId":"usage/intro","unlisted":false},{"type":"category","label":"\ud83e\udd16 LLM Backends","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Azure OpenAI LLM","href":"/OpenDevin/docs/usage/llms/azureLLMs","docId":"usage/llms/azureLLMs","unlisted":false},{"type":"link","label":"Google Gemini/Vertex LLM","href":"/OpenDevin/docs/usage/llms/googleLLMs","docId":"usage/llms/googleLLMs","unlisted":false},{"type":"link","label":"Local LLM with Ollama","href":"/OpenDevin/docs/usage/llms/localLLMs","docId":"usage/llms/localLLMs","unlisted":false}],"href":"/OpenDevin/docs/usage/llms/"},{"type":"link","label":"\ud83e\udde0 Agents and Capabilities","href":"/OpenDevin/docs/usage/agents","docId":"usage/agents","unlisted":false},{"type":"category","label":"\ud83d\udea7 Troubleshooting","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Notes for Windows and WSL Users","href":"/OpenDevin/docs/usage/troubleshooting/windows","docId":"usage/troubleshooting/windows","unlisted":false}],"href":"/OpenDevin/docs/usage/troubleshooting/"},{"type":"link","label":"\ud83d\udcda Misc","href":"/OpenDevin/docs/usage/about","docId":"usage/about","unlisted":false}],"apiSidebar":[{"items":[{"items":[{"items":[{"type":"link","label":"agent","href":"/OpenDevin/docs/python/agenthub/SWE_agent/agent","docId":"python/agenthub/SWE_agent/agent","unlisted":false},{"type":"link","label":"parser","href":"/OpenDevin/docs/python/agenthub/SWE_agent/parser","docId":"python/agenthub/SWE_agent/parser","unlisted":false}],"label":"agenthub.SWE_agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"codeact_agent","href":"/OpenDevin/docs/python/agenthub/codeact_agent/","docId":"python/agenthub/codeact_agent/codeact_agent","unlisted":false}],"label":"agenthub.codeact_agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"agent","href":"/OpenDevin/docs/python/agenthub/delegator_agent/agent","docId":"python/agenthub/delegator_agent/agent","unlisted":false}],"label":"agenthub.delegator_agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"agent","href":"/OpenDevin/docs/python/agenthub/micro/agent","docId":"python/agenthub/micro/agent","unlisted":false}],"label":"agenthub.micro","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"json","href":"/OpenDevin/docs/python/agenthub/monologue_agent/utils/json","docId":"python/agenthub/monologue_agent/utils/json","unlisted":false},{"type":"link","label":"memory","href":"/OpenDevin/docs/python/agenthub/monologue_agent/utils/memory","docId":"python/agenthub/monologue_agent/utils/memory","unlisted":false},{"type":"link","label":"monologue","href":"/OpenDevin/docs/python/agenthub/monologue_agent/utils/monologue","docId":"python/agenthub/monologue_agent/utils/monologue","unlisted":false},{"type":"link","label":"prompts","href":"/OpenDevin/docs/python/agenthub/monologue_agent/utils/prompts","docId":"python/agenthub/monologue_agent/utils/prompts","unlisted":false}],"label":"agenthub.monologue_agent.utils","type":"category","collapsed":true,"collapsible":true},{"type":"link","label":"agent","href":"/OpenDevin/docs/python/agenthub/monologue_agent/agent","docId":"python/agenthub/monologue_agent/agent","unlisted":false}],"label":"agenthub.monologue_agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"agent","href":"/OpenDevin/docs/python/agenthub/planner_agent/agent","docId":"python/agenthub/planner_agent/agent","unlisted":false},{"type":"link","label":"prompt","href":"/OpenDevin/docs/python/agenthub/planner_agent/prompt","docId":"python/agenthub/planner_agent/prompt","unlisted":false}],"label":"agenthub.planner_agent","type":"category","collapsed":true,"collapsible":true}],"label":"agenthub","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"action","href":"/OpenDevin/docs/python/opendevin/action/__init__","docId":"python/opendevin/action/__init__","unlisted":false},{"type":"link","label":"base","href":"/OpenDevin/docs/python/opendevin/action/base","docId":"python/opendevin/action/base","unlisted":false},{"type":"link","label":"fileop","href":"/OpenDevin/docs/python/opendevin/action/fileop","docId":"python/opendevin/action/fileop","unlisted":false},{"type":"link","label":"tasks","href":"/OpenDevin/docs/python/opendevin/action/tasks","docId":"python/opendevin/action/tasks","unlisted":false}],"label":"opendevin.action","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"agent_controller","href":"/OpenDevin/docs/python/opendevin/controller/agent_controller","docId":"python/opendevin/controller/agent_controller","unlisted":false}],"label":"opendevin.controller","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"llm","href":"/OpenDevin/docs/python/opendevin/llm/","docId":"python/opendevin/llm/llm","unlisted":false}],"label":"opendevin.llm","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"observation","href":"/OpenDevin/docs/python/opendevin/observation/__init__","docId":"python/opendevin/observation/__init__","unlisted":false},{"type":"link","label":"base","href":"/OpenDevin/docs/python/opendevin/observation/base","docId":"python/opendevin/observation/base","unlisted":false},{"type":"link","label":"browse","href":"/OpenDevin/docs/python/opendevin/observation/browse","docId":"python/opendevin/observation/browse","unlisted":false},{"type":"link","label":"delegate","href":"/OpenDevin/docs/python/opendevin/observation/delegate","docId":"python/opendevin/observation/delegate","unlisted":false},{"type":"link","label":"error","href":"/OpenDevin/docs/python/opendevin/observation/error","docId":"python/opendevin/observation/error","unlisted":false},{"type":"link","label":"files","href":"/OpenDevin/docs/python/opendevin/observation/files","docId":"python/opendevin/observation/files","unlisted":false},{"type":"link","label":"message","href":"/OpenDevin/docs/python/opendevin/observation/message","docId":"python/opendevin/observation/message","unlisted":false},{"type":"link","label":"recall","href":"/OpenDevin/docs/python/opendevin/observation/recall","docId":"python/opendevin/observation/recall","unlisted":false},{"type":"link","label":"run","href":"/OpenDevin/docs/python/opendevin/observation/run","docId":"python/opendevin/observation/run","unlisted":false}],"label":"opendevin.observation","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"process","href":"/OpenDevin/docs/python/opendevin/sandbox/docker/process","docId":"python/opendevin/sandbox/docker/process","unlisted":false}],"label":"opendevin.sandbox.docker","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"sandbox","href":"/OpenDevin/docs/python/opendevin/sandbox/e2b/sandbox","docId":"python/opendevin/sandbox/e2b/sandbox","unlisted":false}],"label":"opendevin.sandbox.e2b","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"jupyter","href":"/OpenDevin/docs/python/opendevin/sandbox/plugins/jupyter/__init__","docId":"python/opendevin/sandbox/plugins/jupyter/__init__","unlisted":false}],"label":"opendevin.sandbox.plugins.jupyter","type":"category","collapsed":true,"collapsible":true},{"type":"link","label":"mixin","href":"/OpenDevin/docs/python/opendevin/sandbox/plugins/mixin","docId":"python/opendevin/sandbox/plugins/mixin","unlisted":false},{"type":"link","label":"requirement","href":"/OpenDevin/docs/python/opendevin/sandbox/plugins/requirement","docId":"python/opendevin/sandbox/plugins/requirement","unlisted":false}],"label":"opendevin.sandbox.plugins","type":"category","collapsed":true,"collapsible":true}],"label":"opendevin.sandbox","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"action","href":"/OpenDevin/docs/python/opendevin/schema/action","docId":"python/opendevin/schema/action","unlisted":false},{"type":"link","label":"observation","href":"/OpenDevin/docs/python/opendevin/schema/observation","docId":"python/opendevin/schema/observation","unlisted":false},{"type":"link","label":"task","href":"/OpenDevin/docs/python/opendevin/schema/task","docId":"python/opendevin/schema/task","unlisted":false}],"label":"opendevin.schema","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"agent","href":"/OpenDevin/docs/python/opendevin/server/agent/","docId":"python/opendevin/server/agent/agent","unlisted":false},{"type":"link","label":"manager","href":"/OpenDevin/docs/python/opendevin/server/agent/manager","docId":"python/opendevin/server/agent/manager","unlisted":false}],"label":"opendevin.server.agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"auth","href":"/OpenDevin/docs/python/opendevin/server/auth/","docId":"python/opendevin/server/auth/auth","unlisted":false}],"label":"opendevin.server.auth","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"manager","href":"/OpenDevin/docs/python/opendevin/server/session/manager","docId":"python/opendevin/server/session/manager","unlisted":false},{"type":"link","label":"msg_stack","href":"/OpenDevin/docs/python/opendevin/server/session/msg_stack","docId":"python/opendevin/server/session/msg_stack","unlisted":false},{"type":"link","label":"session","href":"/OpenDevin/docs/python/opendevin/server/session/","docId":"python/opendevin/server/session/session","unlisted":false}],"label":"opendevin.server.session","type":"category","collapsed":true,"collapsible":true},{"type":"link","label":"listen","href":"/OpenDevin/docs/python/opendevin/server/listen","docId":"python/opendevin/server/listen","unlisted":false}],"label":"opendevin.server","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"system","href":"/OpenDevin/docs/python/opendevin/utils/system","docId":"python/opendevin/utils/system","unlisted":false}],"label":"opendevin.utils","type":"category","collapsed":true,"collapsible":true},{"type":"link","label":"agent","href":"/OpenDevin/docs/python/opendevin/agent","docId":"python/opendevin/agent","unlisted":false},{"type":"link","label":"config","href":"/OpenDevin/docs/python/opendevin/config","docId":"python/opendevin/config","unlisted":false},{"type":"link","label":"files","href":"/OpenDevin/docs/python/opendevin/files","docId":"python/opendevin/files","unlisted":false},{"type":"link","label":"logger","href":"/OpenDevin/docs/python/opendevin/logger","docId":"python/opendevin/logger","unlisted":false},{"type":"link","label":"main","href":"/OpenDevin/docs/python/opendevin/main","docId":"python/opendevin/main","unlisted":false},{"type":"link","label":"plan","href":"/OpenDevin/docs/python/opendevin/plan","docId":"python/opendevin/plan","unlisted":false}],"label":"opendevin","type":"category","collapsed":true,"collapsible":true}],"label":"Backend","type":"category","collapsed":true,"collapsible":true}]},"docs":{"python/action/__init__":{"id":"python/action/__init__","title":"action","description":"ACTION\\\\TYPE\\\\TO\\\\_CLASS"},"python/action/base":{"id":"python/action/base","title":"action.base","description":"NullAction Objects"},"python/action/fileop":{"id":"python/action/fileop","title":"action.fileop","description":"FileReadAction Objects"},"python/action/tasks":{"id":"python/action/tasks","title":"action.tasks","description":"TaskStateChangedAction Objects"},"python/agent":{"id":"python/agent","title":"agent","description":"Agent Objects"},"python/agenthub/codeact_agent/codeact_agent":{"id":"python/agenthub/codeact_agent/codeact_agent","title":"agenthub.codeact_agent.codeact_agent","description":"CodeActAgent Objects","sidebar":"apiSidebar"},"python/agenthub/delegator_agent/agent":{"id":"python/agenthub/delegator_agent/agent","title":"agenthub.delegator_agent.agent","description":"DelegatorAgent Objects","sidebar":"apiSidebar"},"python/agenthub/micro/agent":{"id":"python/agenthub/micro/agent","title":"agenthub.micro.agent","description":"my\\\\_encoder","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/agent":{"id":"python/agenthub/monologue_agent/agent","title":"agenthub.monologue_agent.agent","description":"MonologueAgent Objects","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/utils/json":{"id":"python/agenthub/monologue_agent/utils/json","title":"agenthub.monologue_agent.utils.json","description":"my\\\\_encoder","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/utils/memory":{"id":"python/agenthub/monologue_agent/utils/memory","title":"agenthub.monologue_agent.utils.memory","description":"LongTermMemory Objects","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/utils/monologue":{"id":"python/agenthub/monologue_agent/utils/monologue","title":"agenthub.monologue_agent.utils.monologue","description":"Monologue Objects","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/utils/prompts":{"id":"python/agenthub/monologue_agent/utils/prompts","title":"agenthub.monologue_agent.utils.prompts","description":"get\\\\summarize\\\\monologue\\\\_prompt","sidebar":"apiSidebar"},"python/agenthub/planner_agent/agent":{"id":"python/agenthub/planner_agent/agent","title":"agenthub.planner_agent.agent","description":"PlannerAgent Objects","sidebar":"apiSidebar"},"python/agenthub/planner_agent/prompt":{"id":"python/agenthub/planner_agent/prompt","title":"agenthub.planner_agent.prompt","description":"get\\\\_hint","sidebar":"apiSidebar"},"python/agenthub/SWE_agent/agent":{"id":"python/agenthub/SWE_agent/agent","title":"agenthub.SWE_agent.agent","description":"SWEAgent Objects","sidebar":"apiSidebar"},"python/agenthub/SWE_agent/parser":{"id":"python/agenthub/SWE_agent/parser","title":"agenthub.SWE_agent.parser","description":"get\\\\action\\\\from\\\\_string","sidebar":"apiSidebar"},"python/codeact_agent/codeact_agent":{"id":"python/codeact_agent/codeact_agent","title":"codeact_agent.codeact_agent","description":"CodeActAgent Objects"},"python/config":{"id":"python/config","title":"config","description":"get"},"python/controller/agent_controller":{"id":"python/controller/agent_controller","title":"controller.agent_controller","description":"AgentController Objects"},"python/delegator_agent/agent":{"id":"python/delegator_agent/agent","title":"delegator_agent.agent","description":"DelegatorAgent Objects"},"python/files":{"id":"python/files","title":"files","description":"WorkspaceFile Objects"},"python/logger":{"id":"python/logger","title":"logger","description":"get\\\\console\\\\handler"},"python/main":{"id":"python/main","title":"main","description":"read\\\\task\\\\from\\\\_file"},"python/monologue_agent/agent":{"id":"python/monologue_agent/agent","title":"monologue_agent.agent","description":"MonologueAgent Objects"},"python/monologue_agent/utils/json":{"id":"python/monologue_agent/utils/json","title":"monologue_agent.utils.json","description":"my\\\\_encoder"},"python/monologue_agent/utils/memory":{"id":"python/monologue_agent/utils/memory","title":"monologue_agent.utils.memory","description":"LongTermMemory Objects"},"python/monologue_agent/utils/monologue":{"id":"python/monologue_agent/utils/monologue","title":"monologue_agent.utils.monologue","description":"Monologue Objects"},"python/monologue_agent/utils/prompts":{"id":"python/monologue_agent/utils/prompts","title":"monologue_agent.utils.prompts","description":"get\\\\summarize\\\\monologue\\\\_prompt"},"python/observation/__init__":{"id":"python/observation/__init__","title":"observation","description":"OBSERVATION\\\\TYPE\\\\TO\\\\_CLASS"},"python/observation/base":{"id":"python/observation/base","title":"observation.base","description":"Observation Objects"},"python/observation/browse":{"id":"python/observation/browse","title":"observation.browse","description":"BrowserOutputObservation Objects"},"python/observation/delegate":{"id":"python/observation/delegate","title":"observation.delegate","description":"AgentDelegateObservation Objects"},"python/observation/error":{"id":"python/observation/error","title":"observation.error","description":"AgentErrorObservation Objects"},"python/observation/files":{"id":"python/observation/files","title":"observation.files","description":"FileReadObservation Objects"},"python/observation/message":{"id":"python/observation/message","title":"observation.message","description":"UserMessageObservation Objects"},"python/observation/recall":{"id":"python/observation/recall","title":"observation.recall","description":"AgentRecallObservation Objects"},"python/observation/run":{"id":"python/observation/run","title":"observation.run","description":"CmdOutputObservation Objects"},"python/opendevin/action/__init__":{"id":"python/opendevin/action/__init__","title":"opendevin.action","description":"ACTION\\\\TYPE\\\\TO\\\\_CLASS","sidebar":"apiSidebar"},"python/opendevin/action/base":{"id":"python/opendevin/action/base","title":"opendevin.action.base","description":"NullAction Objects","sidebar":"apiSidebar"},"python/opendevin/action/fileop":{"id":"python/opendevin/action/fileop","title":"opendevin.action.fileop","description":"FileReadAction Objects","sidebar":"apiSidebar"},"python/opendevin/action/tasks":{"id":"python/opendevin/action/tasks","title":"opendevin.action.tasks","description":"TaskStateChangedAction Objects","sidebar":"apiSidebar"},"python/opendevin/agent":{"id":"python/opendevin/agent","title":"opendevin.agent","description":"Agent Objects","sidebar":"apiSidebar"},"python/opendevin/config":{"id":"python/opendevin/config","title":"opendevin.config","description":"get","sidebar":"apiSidebar"},"python/opendevin/controller/agent_controller":{"id":"python/opendevin/controller/agent_controller","title":"opendevin.controller.agent_controller","description":"AgentController Objects","sidebar":"apiSidebar"},"python/opendevin/files":{"id":"python/opendevin/files","title":"opendevin.files","description":"WorkspaceFile Objects","sidebar":"apiSidebar"},"python/opendevin/llm/llm":{"id":"python/opendevin/llm/llm","title":"opendevin.llm.llm","description":"LLM Objects","sidebar":"apiSidebar"},"python/opendevin/logger":{"id":"python/opendevin/logger","title":"opendevin.logger","description":"get\\\\console\\\\handler","sidebar":"apiSidebar"},"python/opendevin/main":{"id":"python/opendevin/main","title":"opendevin.main","description":"read\\\\task\\\\from\\\\_file","sidebar":"apiSidebar"},"python/opendevin/observation/__init__":{"id":"python/opendevin/observation/__init__","title":"opendevin.observation","description":"OBSERVATION\\\\TYPE\\\\TO\\\\_CLASS","sidebar":"apiSidebar"},"python/opendevin/observation/base":{"id":"python/opendevin/observation/base","title":"opendevin.observation.base","description":"Observation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/browse":{"id":"python/opendevin/observation/browse","title":"opendevin.observation.browse","description":"BrowserOutputObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/delegate":{"id":"python/opendevin/observation/delegate","title":"opendevin.observation.delegate","description":"AgentDelegateObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/error":{"id":"python/opendevin/observation/error","title":"opendevin.observation.error","description":"AgentErrorObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/files":{"id":"python/opendevin/observation/files","title":"opendevin.observation.files","description":"FileReadObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/message":{"id":"python/opendevin/observation/message","title":"opendevin.observation.message","description":"UserMessageObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/recall":{"id":"python/opendevin/observation/recall","title":"opendevin.observation.recall","description":"AgentRecallObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/run":{"id":"python/opendevin/observation/run","title":"opendevin.observation.run","description":"CmdOutputObservation Objects","sidebar":"apiSidebar"},"python/opendevin/plan":{"id":"python/opendevin/plan","title":"opendevin.plan","description":"Task Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/docker/process":{"id":"python/opendevin/sandbox/docker/process","title":"opendevin.sandbox.docker.process","description":"DockerProcess Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/e2b/sandbox":{"id":"python/opendevin/sandbox/e2b/sandbox","title":"opendevin.sandbox.e2b.sandbox","description":"E2BBox Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/plugins/jupyter/__init__":{"id":"python/opendevin/sandbox/plugins/jupyter/__init__","title":"opendevin.sandbox.plugins.jupyter","description":"JupyterRequirement Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/plugins/mixin":{"id":"python/opendevin/sandbox/plugins/mixin","title":"opendevin.sandbox.plugins.mixin","description":"PluginMixin Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/plugins/requirement":{"id":"python/opendevin/sandbox/plugins/requirement","title":"opendevin.sandbox.plugins.requirement","description":"PluginRequirement Objects","sidebar":"apiSidebar"},"python/opendevin/schema/action":{"id":"python/opendevin/schema/action","title":"opendevin.schema.action","description":"ActionTypeSchema Objects","sidebar":"apiSidebar"},"python/opendevin/schema/observation":{"id":"python/opendevin/schema/observation","title":"opendevin.schema.observation","description":"ObservationTypeSchema Objects","sidebar":"apiSidebar"},"python/opendevin/schema/task":{"id":"python/opendevin/schema/task","title":"opendevin.schema.task","description":"TaskState Objects","sidebar":"apiSidebar"},"python/opendevin/server/agent/agent":{"id":"python/opendevin/server/agent/agent","title":"opendevin.server.agent.agent","description":"AgentUnit Objects","sidebar":"apiSidebar"},"python/opendevin/server/agent/manager":{"id":"python/opendevin/server/agent/manager","title":"opendevin.server.agent.manager","description":"AgentManager Objects","sidebar":"apiSidebar"},"python/opendevin/server/auth/auth":{"id":"python/opendevin/server/auth/auth","title":"opendevin.server.auth.auth","description":"get\\\\sid\\\\from\\\\_token","sidebar":"apiSidebar"},"python/opendevin/server/listen":{"id":"python/opendevin/server/listen","title":"opendevin.server.listen","description":"get\\\\litellm\\\\models","sidebar":"apiSidebar"},"python/opendevin/server/session/manager":{"id":"python/opendevin/server/session/manager","title":"opendevin.server.session.manager","description":"SessionManager Objects","sidebar":"apiSidebar"},"python/opendevin/server/session/msg_stack":{"id":"python/opendevin/server/session/msg_stack","title":"opendevin.server.session.msg_stack","description":"Message Objects","sidebar":"apiSidebar"},"python/opendevin/server/session/session":{"id":"python/opendevin/server/session/session","title":"opendevin.server.session.session","description":"Session Objects","sidebar":"apiSidebar"},"python/opendevin/utils/system":{"id":"python/opendevin/utils/system","title":"opendevin.utils.system","description":"find\\\\available\\\\tcp\\\\_port","sidebar":"apiSidebar"},"python/plan":{"id":"python/plan","title":"plan","description":"Task Objects"},"python/planner_agent/agent":{"id":"python/planner_agent/agent","title":"planner_agent.agent","description":"PlannerAgent Objects"},"python/planner_agent/prompt":{"id":"python/planner_agent/prompt","title":"planner_agent.prompt","description":"get\\\\_hint"},"python/sandbox/docker/process":{"id":"python/sandbox/docker/process","title":"sandbox.docker.process","description":"DockerProcess Objects"},"python/sandbox/e2b/sandbox":{"id":"python/sandbox/e2b/sandbox","title":"sandbox.e2b.sandbox","description":"E2BBox Objects"},"python/sandbox/plugins/jupyter/__init__":{"id":"python/sandbox/plugins/jupyter/__init__","title":"sandbox.plugins.jupyter","description":"JupyterRequirement Objects"},"python/sandbox/plugins/mixin":{"id":"python/sandbox/plugins/mixin","title":"sandbox.plugins.mixin","description":"PluginMixin Objects"},"python/sandbox/plugins/requirement":{"id":"python/sandbox/plugins/requirement","title":"sandbox.plugins.requirement","description":"PluginRequirement Objects"},"python/schema/action":{"id":"python/schema/action","title":"schema.action","description":"ActionTypeSchema Objects"},"python/schema/observation":{"id":"python/schema/observation","title":"schema.observation","description":"ObservationTypeSchema Objects"},"python/schema/task":{"id":"python/schema/task","title":"schema.task","description":"TaskState Objects"},"python/server/agent/agent":{"id":"python/server/agent/agent","title":"server.agent.agent","description":"AgentUnit Objects"},"python/server/agent/manager":{"id":"python/server/agent/manager","title":"server.agent.manager","description":"AgentManager Objects"},"python/server/auth/auth":{"id":"python/server/auth/auth","title":"server.auth.auth","description":"get\\\\sid\\\\from\\\\_token"},"python/server/listen":{"id":"python/server/listen","title":"server.listen","description":"get\\\\litellm\\\\models"},"python/server/session/manager":{"id":"python/server/session/manager","title":"server.session.manager","description":"SessionManager Objects"},"python/server/session/msg_stack":{"id":"python/server/session/msg_stack","title":"server.session.msg_stack","description":"Message Objects"},"python/server/session/session":{"id":"python/server/session/session","title":"server.session.session","description":"Session Objects"},"python/SWE_agent/agent":{"id":"python/SWE_agent/agent","title":"SWE_agent.agent","description":"SWEAgent Objects"},"python/SWE_agent/parser":{"id":"python/SWE_agent/parser","title":"SWE_agent.parser","description":"get\\\\action\\\\from\\\\_string"},"python/utils/system":{"id":"python/utils/system","title":"utils.system","description":"find\\\\available\\\\tcp\\\\_port"},"usage/about":{"id":"usage/about","title":"\ud83d\udcda Misc","description":"\u2b50\ufe0f Research Strategy","sidebar":"docsSidebar"},"usage/agents":{"id":"usage/agents","title":"\ud83e\udde0 Agents and Capabilities","description":"Monologue Agent","sidebar":"docsSidebar"},"usage/intro":{"id":"usage/intro","title":"\ud83d\udcbb OpenDevin","description":"OpenDevin is an autonomous AI software engineer capable of executing complex engineering tasks and collaborating actively with users on software development projects.","sidebar":"docsSidebar"},"usage/llms/azureLLMs":{"id":"usage/llms/azureLLMs","title":"Azure OpenAI LLM","description":"Completion","sidebar":"docsSidebar"},"usage/llms/googleLLMs":{"id":"usage/llms/googleLLMs","title":"Google Gemini/Vertex LLM","description":"Completion","sidebar":"docsSidebar"},"usage/llms/llms":{"id":"usage/llms/llms","title":"\ud83e\udd16 LLM Backends","description":"OpenDevin can work with any LLM backend.","sidebar":"docsSidebar"},"usage/llms/localLLMs":{"id":"usage/llms/localLLMs","title":"Local LLM with Ollama","description":"Ensure that you have the Ollama server up and running.","sidebar":"docsSidebar"},"usage/troubleshooting/troubleshooting":{"id":"usage/troubleshooting/troubleshooting","title":"\ud83d\udea7 Troubleshooting","description":"There are some error messages that get reported over and over by users.","sidebar":"docsSidebar"},"usage/troubleshooting/windows":{"id":"usage/troubleshooting/windows","title":"Notes for Windows and WSL Users","description":"OpenDevin only supports Windows via WSL.","sidebar":"docsSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/935f2afb.b62c63d9.js b/assets/js/935f2afb.b62c63d9.js new file mode 100644 index 0000000000..8dff0ff459 --- /dev/null +++ b/assets/js/935f2afb.b62c63d9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8581],{5610:e=>{e.exports=JSON.parse('{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docsSidebar":[{"type":"link","label":"\ud83d\udcbb OpenDevin","href":"/OpenDevin/modules/usage/intro","docId":"usage/intro","unlisted":false},{"type":"category","label":"\ud83e\udd16 LLM Backends","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Azure OpenAI LLM","href":"/OpenDevin/modules/usage/llms/azureLLMs","docId":"usage/llms/azureLLMs","unlisted":false},{"type":"link","label":"Google Gemini/Vertex LLM","href":"/OpenDevin/modules/usage/llms/googleLLMs","docId":"usage/llms/googleLLMs","unlisted":false},{"type":"link","label":"Local LLM with Ollama","href":"/OpenDevin/modules/usage/llms/localLLMs","docId":"usage/llms/localLLMs","unlisted":false}],"href":"/OpenDevin/modules/usage/llms/"},{"type":"link","label":"\ud83e\udde0 Agents and Capabilities","href":"/OpenDevin/modules/usage/agents","docId":"usage/agents","unlisted":false},{"type":"link","label":"\ud83c\udfdb\ufe0f System Architecture Overview","href":"/OpenDevin/modules/usage/architecture","docId":"usage/architecture","unlisted":false},{"type":"category","label":"\ud83d\udea7 Troubleshooting","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Notes for Windows and WSL Users","href":"/OpenDevin/modules/usage/troubleshooting/windows","docId":"usage/troubleshooting/windows","unlisted":false}],"href":"/OpenDevin/modules/usage/troubleshooting/"},{"type":"link","label":"\ud83d\udcda Misc","href":"/OpenDevin/modules/usage/about","docId":"usage/about","unlisted":false}],"apiSidebar":[{"items":[{"items":[{"items":[{"type":"link","label":"agent","href":"/OpenDevin/modules/python/agenthub/SWE_agent/agent","docId":"python/agenthub/SWE_agent/agent","unlisted":false},{"type":"link","label":"parser","href":"/OpenDevin/modules/python/agenthub/SWE_agent/parser","docId":"python/agenthub/SWE_agent/parser","unlisted":false}],"label":"agenthub.SWE_agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"codeact_agent","href":"/OpenDevin/modules/python/agenthub/codeact_agent/","docId":"python/agenthub/codeact_agent/codeact_agent","unlisted":false}],"label":"agenthub.codeact_agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"agent","href":"/OpenDevin/modules/python/agenthub/delegator_agent/agent","docId":"python/agenthub/delegator_agent/agent","unlisted":false}],"label":"agenthub.delegator_agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"agent","href":"/OpenDevin/modules/python/agenthub/dummy_agent/agent","docId":"python/agenthub/dummy_agent/agent","unlisted":false}],"label":"agenthub.dummy_agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"agent","href":"/OpenDevin/modules/python/agenthub/micro/agent","docId":"python/agenthub/micro/agent","unlisted":false}],"label":"agenthub.micro","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"json","href":"/OpenDevin/modules/python/agenthub/monologue_agent/utils/json","docId":"python/agenthub/monologue_agent/utils/json","unlisted":false},{"type":"link","label":"memory","href":"/OpenDevin/modules/python/agenthub/monologue_agent/utils/memory","docId":"python/agenthub/monologue_agent/utils/memory","unlisted":false},{"type":"link","label":"monologue","href":"/OpenDevin/modules/python/agenthub/monologue_agent/utils/monologue","docId":"python/agenthub/monologue_agent/utils/monologue","unlisted":false},{"type":"link","label":"prompts","href":"/OpenDevin/modules/python/agenthub/monologue_agent/utils/prompts","docId":"python/agenthub/monologue_agent/utils/prompts","unlisted":false}],"label":"agenthub.monologue_agent.utils","type":"category","collapsed":true,"collapsible":true},{"type":"link","label":"agent","href":"/OpenDevin/modules/python/agenthub/monologue_agent/agent","docId":"python/agenthub/monologue_agent/agent","unlisted":false}],"label":"agenthub.monologue_agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"agent","href":"/OpenDevin/modules/python/agenthub/planner_agent/agent","docId":"python/agenthub/planner_agent/agent","unlisted":false},{"type":"link","label":"prompt","href":"/OpenDevin/modules/python/agenthub/planner_agent/prompt","docId":"python/agenthub/planner_agent/prompt","unlisted":false}],"label":"agenthub.planner_agent","type":"category","collapsed":true,"collapsible":true}],"label":"agenthub","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"action","href":"/OpenDevin/modules/python/opendevin/action/__init__","docId":"python/opendevin/action/__init__","unlisted":false},{"type":"link","label":"base","href":"/OpenDevin/modules/python/opendevin/action/base","docId":"python/opendevin/action/base","unlisted":false},{"type":"link","label":"fileop","href":"/OpenDevin/modules/python/opendevin/action/fileop","docId":"python/opendevin/action/fileop","unlisted":false},{"type":"link","label":"github","href":"/OpenDevin/modules/python/opendevin/action/github","docId":"python/opendevin/action/github","unlisted":false},{"type":"link","label":"tasks","href":"/OpenDevin/modules/python/opendevin/action/tasks","docId":"python/opendevin/action/tasks","unlisted":false}],"label":"opendevin.action","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"agent_controller","href":"/OpenDevin/modules/python/opendevin/controller/agent_controller","docId":"python/opendevin/controller/agent_controller","unlisted":false}],"label":"opendevin.controller","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"llm","href":"/OpenDevin/modules/python/opendevin/llm/","docId":"python/opendevin/llm/llm","unlisted":false}],"label":"opendevin.llm","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"observation","href":"/OpenDevin/modules/python/opendevin/observation/__init__","docId":"python/opendevin/observation/__init__","unlisted":false},{"type":"link","label":"base","href":"/OpenDevin/modules/python/opendevin/observation/base","docId":"python/opendevin/observation/base","unlisted":false},{"type":"link","label":"browse","href":"/OpenDevin/modules/python/opendevin/observation/browse","docId":"python/opendevin/observation/browse","unlisted":false},{"type":"link","label":"delegate","href":"/OpenDevin/modules/python/opendevin/observation/delegate","docId":"python/opendevin/observation/delegate","unlisted":false},{"type":"link","label":"error","href":"/OpenDevin/modules/python/opendevin/observation/error","docId":"python/opendevin/observation/error","unlisted":false},{"type":"link","label":"files","href":"/OpenDevin/modules/python/opendevin/observation/files","docId":"python/opendevin/observation/files","unlisted":false},{"type":"link","label":"message","href":"/OpenDevin/modules/python/opendevin/observation/message","docId":"python/opendevin/observation/message","unlisted":false},{"type":"link","label":"recall","href":"/OpenDevin/modules/python/opendevin/observation/recall","docId":"python/opendevin/observation/recall","unlisted":false},{"type":"link","label":"run","href":"/OpenDevin/modules/python/opendevin/observation/run","docId":"python/opendevin/observation/run","unlisted":false}],"label":"opendevin.observation","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"process","href":"/OpenDevin/modules/python/opendevin/sandbox/docker/process","docId":"python/opendevin/sandbox/docker/process","unlisted":false}],"label":"opendevin.sandbox.docker","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"sandbox","href":"/OpenDevin/modules/python/opendevin/sandbox/e2b/sandbox","docId":"python/opendevin/sandbox/e2b/sandbox","unlisted":false}],"label":"opendevin.sandbox.e2b","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"jupyter","href":"/OpenDevin/modules/python/opendevin/sandbox/plugins/jupyter/__init__","docId":"python/opendevin/sandbox/plugins/jupyter/__init__","unlisted":false}],"label":"opendevin.sandbox.plugins.jupyter","type":"category","collapsed":true,"collapsible":true},{"type":"link","label":"mixin","href":"/OpenDevin/modules/python/opendevin/sandbox/plugins/mixin","docId":"python/opendevin/sandbox/plugins/mixin","unlisted":false},{"type":"link","label":"requirement","href":"/OpenDevin/modules/python/opendevin/sandbox/plugins/requirement","docId":"python/opendevin/sandbox/plugins/requirement","unlisted":false}],"label":"opendevin.sandbox.plugins","type":"category","collapsed":true,"collapsible":true}],"label":"opendevin.sandbox","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"action","href":"/OpenDevin/modules/python/opendevin/schema/action","docId":"python/opendevin/schema/action","unlisted":false},{"type":"link","label":"observation","href":"/OpenDevin/modules/python/opendevin/schema/observation","docId":"python/opendevin/schema/observation","unlisted":false},{"type":"link","label":"task","href":"/OpenDevin/modules/python/opendevin/schema/task","docId":"python/opendevin/schema/task","unlisted":false}],"label":"opendevin.schema","type":"category","collapsed":true,"collapsible":true},{"items":[{"items":[{"type":"link","label":"agent","href":"/OpenDevin/modules/python/opendevin/server/agent/","docId":"python/opendevin/server/agent/agent","unlisted":false},{"type":"link","label":"manager","href":"/OpenDevin/modules/python/opendevin/server/agent/manager","docId":"python/opendevin/server/agent/manager","unlisted":false}],"label":"opendevin.server.agent","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"auth","href":"/OpenDevin/modules/python/opendevin/server/auth/","docId":"python/opendevin/server/auth/auth","unlisted":false}],"label":"opendevin.server.auth","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"manager","href":"/OpenDevin/modules/python/opendevin/server/session/manager","docId":"python/opendevin/server/session/manager","unlisted":false},{"type":"link","label":"msg_stack","href":"/OpenDevin/modules/python/opendevin/server/session/msg_stack","docId":"python/opendevin/server/session/msg_stack","unlisted":false},{"type":"link","label":"session","href":"/OpenDevin/modules/python/opendevin/server/session/","docId":"python/opendevin/server/session/session","unlisted":false}],"label":"opendevin.server.session","type":"category","collapsed":true,"collapsible":true},{"type":"link","label":"listen","href":"/OpenDevin/modules/python/opendevin/server/listen","docId":"python/opendevin/server/listen","unlisted":false}],"label":"opendevin.server","type":"category","collapsed":true,"collapsible":true},{"items":[{"type":"link","label":"system","href":"/OpenDevin/modules/python/opendevin/utils/system","docId":"python/opendevin/utils/system","unlisted":false}],"label":"opendevin.utils","type":"category","collapsed":true,"collapsible":true},{"type":"link","label":"agent","href":"/OpenDevin/modules/python/opendevin/agent","docId":"python/opendevin/agent","unlisted":false},{"type":"link","label":"config","href":"/OpenDevin/modules/python/opendevin/config","docId":"python/opendevin/config","unlisted":false},{"type":"link","label":"files","href":"/OpenDevin/modules/python/opendevin/files","docId":"python/opendevin/files","unlisted":false},{"type":"link","label":"logger","href":"/OpenDevin/modules/python/opendevin/logger","docId":"python/opendevin/logger","unlisted":false},{"type":"link","label":"main","href":"/OpenDevin/modules/python/opendevin/main","docId":"python/opendevin/main","unlisted":false},{"type":"link","label":"plan","href":"/OpenDevin/modules/python/opendevin/plan","docId":"python/opendevin/plan","unlisted":false}],"label":"opendevin","type":"category","collapsed":true,"collapsible":true}],"label":"Backend","type":"category","collapsed":true,"collapsible":true}]},"docs":{"python/agenthub/codeact_agent/codeact_agent":{"id":"python/agenthub/codeact_agent/codeact_agent","title":"agenthub.codeact_agent.codeact_agent","description":"CodeActAgent Objects","sidebar":"apiSidebar"},"python/agenthub/delegator_agent/agent":{"id":"python/agenthub/delegator_agent/agent","title":"agenthub.delegator_agent.agent","description":"DelegatorAgent Objects","sidebar":"apiSidebar"},"python/agenthub/dummy_agent/agent":{"id":"python/agenthub/dummy_agent/agent","title":"agenthub.dummy_agent.agent","description":"Module for a Dummy agent.","sidebar":"apiSidebar"},"python/agenthub/micro/agent":{"id":"python/agenthub/micro/agent","title":"agenthub.micro.agent","description":"my\\\\_encoder","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/agent":{"id":"python/agenthub/monologue_agent/agent","title":"agenthub.monologue_agent.agent","description":"MonologueAgent Objects","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/utils/json":{"id":"python/agenthub/monologue_agent/utils/json","title":"agenthub.monologue_agent.utils.json","description":"my\\\\_encoder","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/utils/memory":{"id":"python/agenthub/monologue_agent/utils/memory","title":"agenthub.monologue_agent.utils.memory","description":"LongTermMemory Objects","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/utils/monologue":{"id":"python/agenthub/monologue_agent/utils/monologue","title":"agenthub.monologue_agent.utils.monologue","description":"Monologue Objects","sidebar":"apiSidebar"},"python/agenthub/monologue_agent/utils/prompts":{"id":"python/agenthub/monologue_agent/utils/prompts","title":"agenthub.monologue_agent.utils.prompts","description":"get\\\\summarize\\\\monologue\\\\_prompt","sidebar":"apiSidebar"},"python/agenthub/planner_agent/agent":{"id":"python/agenthub/planner_agent/agent","title":"agenthub.planner_agent.agent","description":"PlannerAgent Objects","sidebar":"apiSidebar"},"python/agenthub/planner_agent/prompt":{"id":"python/agenthub/planner_agent/prompt","title":"agenthub.planner_agent.prompt","description":"get\\\\_hint","sidebar":"apiSidebar"},"python/agenthub/SWE_agent/agent":{"id":"python/agenthub/SWE_agent/agent","title":"agenthub.SWE_agent.agent","description":"SWEAgent Objects","sidebar":"apiSidebar"},"python/agenthub/SWE_agent/parser":{"id":"python/agenthub/SWE_agent/parser","title":"agenthub.SWE_agent.parser","description":"get\\\\action\\\\from\\\\_string","sidebar":"apiSidebar"},"python/opendevin/action/__init__":{"id":"python/opendevin/action/__init__","title":"opendevin.action","description":"ACTION\\\\TYPE\\\\TO\\\\_CLASS","sidebar":"apiSidebar"},"python/opendevin/action/base":{"id":"python/opendevin/action/base","title":"opendevin.action.base","description":"NullAction Objects","sidebar":"apiSidebar"},"python/opendevin/action/fileop":{"id":"python/opendevin/action/fileop","title":"opendevin.action.fileop","description":"FileReadAction Objects","sidebar":"apiSidebar"},"python/opendevin/action/github":{"id":"python/opendevin/action/github","title":"opendevin.action.github","description":"GitHubPushAction Objects","sidebar":"apiSidebar"},"python/opendevin/action/tasks":{"id":"python/opendevin/action/tasks","title":"opendevin.action.tasks","description":"TaskStateChangedAction Objects","sidebar":"apiSidebar"},"python/opendevin/agent":{"id":"python/opendevin/agent","title":"opendevin.agent","description":"Agent Objects","sidebar":"apiSidebar"},"python/opendevin/config":{"id":"python/opendevin/config","title":"opendevin.config","description":"get","sidebar":"apiSidebar"},"python/opendevin/controller/agent_controller":{"id":"python/opendevin/controller/agent_controller","title":"opendevin.controller.agent_controller","description":"AgentController Objects","sidebar":"apiSidebar"},"python/opendevin/files":{"id":"python/opendevin/files","title":"opendevin.files","description":"WorkspaceFile Objects","sidebar":"apiSidebar"},"python/opendevin/llm/llm":{"id":"python/opendevin/llm/llm","title":"opendevin.llm.llm","description":"LLM Objects","sidebar":"apiSidebar"},"python/opendevin/logger":{"id":"python/opendevin/logger","title":"opendevin.logger","description":"get\\\\console\\\\handler","sidebar":"apiSidebar"},"python/opendevin/main":{"id":"python/opendevin/main","title":"opendevin.main","description":"read\\\\task\\\\from\\\\_file","sidebar":"apiSidebar"},"python/opendevin/observation/__init__":{"id":"python/opendevin/observation/__init__","title":"opendevin.observation","description":"OBSERVATION\\\\TYPE\\\\TO\\\\_CLASS","sidebar":"apiSidebar"},"python/opendevin/observation/base":{"id":"python/opendevin/observation/base","title":"opendevin.observation.base","description":"Observation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/browse":{"id":"python/opendevin/observation/browse","title":"opendevin.observation.browse","description":"BrowserOutputObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/delegate":{"id":"python/opendevin/observation/delegate","title":"opendevin.observation.delegate","description":"AgentDelegateObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/error":{"id":"python/opendevin/observation/error","title":"opendevin.observation.error","description":"AgentErrorObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/files":{"id":"python/opendevin/observation/files","title":"opendevin.observation.files","description":"FileReadObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/message":{"id":"python/opendevin/observation/message","title":"opendevin.observation.message","description":"UserMessageObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/recall":{"id":"python/opendevin/observation/recall","title":"opendevin.observation.recall","description":"AgentRecallObservation Objects","sidebar":"apiSidebar"},"python/opendevin/observation/run":{"id":"python/opendevin/observation/run","title":"opendevin.observation.run","description":"CmdOutputObservation Objects","sidebar":"apiSidebar"},"python/opendevin/plan":{"id":"python/opendevin/plan","title":"opendevin.plan","description":"Task Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/docker/process":{"id":"python/opendevin/sandbox/docker/process","title":"opendevin.sandbox.docker.process","description":"DockerProcess Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/e2b/sandbox":{"id":"python/opendevin/sandbox/e2b/sandbox","title":"opendevin.sandbox.e2b.sandbox","description":"E2BBox Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/plugins/jupyter/__init__":{"id":"python/opendevin/sandbox/plugins/jupyter/__init__","title":"opendevin.sandbox.plugins.jupyter","description":"JupyterRequirement Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/plugins/mixin":{"id":"python/opendevin/sandbox/plugins/mixin","title":"opendevin.sandbox.plugins.mixin","description":"PluginMixin Objects","sidebar":"apiSidebar"},"python/opendevin/sandbox/plugins/requirement":{"id":"python/opendevin/sandbox/plugins/requirement","title":"opendevin.sandbox.plugins.requirement","description":"PluginRequirement Objects","sidebar":"apiSidebar"},"python/opendevin/schema/action":{"id":"python/opendevin/schema/action","title":"opendevin.schema.action","description":"ActionTypeSchema Objects","sidebar":"apiSidebar"},"python/opendevin/schema/observation":{"id":"python/opendevin/schema/observation","title":"opendevin.schema.observation","description":"ObservationTypeSchema Objects","sidebar":"apiSidebar"},"python/opendevin/schema/task":{"id":"python/opendevin/schema/task","title":"opendevin.schema.task","description":"TaskState Objects","sidebar":"apiSidebar"},"python/opendevin/server/agent/agent":{"id":"python/opendevin/server/agent/agent","title":"opendevin.server.agent.agent","description":"AgentUnit Objects","sidebar":"apiSidebar"},"python/opendevin/server/agent/manager":{"id":"python/opendevin/server/agent/manager","title":"opendevin.server.agent.manager","description":"AgentManager Objects","sidebar":"apiSidebar"},"python/opendevin/server/auth/auth":{"id":"python/opendevin/server/auth/auth","title":"opendevin.server.auth.auth","description":"get\\\\sid\\\\from\\\\_token","sidebar":"apiSidebar"},"python/opendevin/server/listen":{"id":"python/opendevin/server/listen","title":"opendevin.server.listen","description":"get\\\\litellm\\\\models","sidebar":"apiSidebar"},"python/opendevin/server/session/manager":{"id":"python/opendevin/server/session/manager","title":"opendevin.server.session.manager","description":"SessionManager Objects","sidebar":"apiSidebar"},"python/opendevin/server/session/msg_stack":{"id":"python/opendevin/server/session/msg_stack","title":"opendevin.server.session.msg_stack","description":"Message Objects","sidebar":"apiSidebar"},"python/opendevin/server/session/session":{"id":"python/opendevin/server/session/session","title":"opendevin.server.session.session","description":"Session Objects","sidebar":"apiSidebar"},"python/opendevin/utils/system":{"id":"python/opendevin/utils/system","title":"opendevin.utils.system","description":"find\\\\available\\\\tcp\\\\_port","sidebar":"apiSidebar"},"usage/about":{"id":"usage/about","title":"\ud83d\udcda Misc","description":"\u2b50\ufe0f Research Strategy","sidebar":"docsSidebar"},"usage/agents":{"id":"usage/agents","title":"\ud83e\udde0 Agents and Capabilities","description":"Monologue Agent","sidebar":"docsSidebar"},"usage/architecture":{"id":"usage/architecture","title":"\ud83c\udfdb\ufe0f System Architecture Overview","description":"This is a high-level overview of the system architecture. The system is divided into two main components: the frontend and the backend. The frontend is responsible for handling user interactions and displaying the results. The backend is responsible for handling the business logic and executing the agents.","sidebar":"docsSidebar"},"usage/intro":{"id":"usage/intro","title":"\ud83d\udcbb OpenDevin","description":"OpenDevin is an autonomous AI software engineer capable of executing complex engineering tasks and collaborating actively with users on software development projects.","sidebar":"docsSidebar"},"usage/llms/azureLLMs":{"id":"usage/llms/azureLLMs","title":"Azure OpenAI LLM","description":"Completion","sidebar":"docsSidebar"},"usage/llms/googleLLMs":{"id":"usage/llms/googleLLMs","title":"Google Gemini/Vertex LLM","description":"Completion","sidebar":"docsSidebar"},"usage/llms/llms":{"id":"usage/llms/llms","title":"\ud83e\udd16 LLM Backends","description":"OpenDevin can work with any LLM backend.","sidebar":"docsSidebar"},"usage/llms/localLLMs":{"id":"usage/llms/localLLMs","title":"Local LLM with Ollama","description":"Ensure that you have the Ollama server up and running.","sidebar":"docsSidebar"},"usage/troubleshooting/troubleshooting":{"id":"usage/troubleshooting/troubleshooting","title":"\ud83d\udea7 Troubleshooting","description":"There are some error messages that get reported over and over by users.","sidebar":"docsSidebar"},"usage/troubleshooting/windows":{"id":"usage/troubleshooting/windows","title":"Notes for Windows and WSL Users","description":"OpenDevin only supports Windows via WSL.","sidebar":"docsSidebar"}}}')}}]); \ No newline at end of file diff --git a/assets/js/93fbbd20.2857ee5d.js b/assets/js/93fbbd20.2857ee5d.js deleted file mode 100644 index 5df42c582f..0000000000 --- a/assets/js/93fbbd20.2857ee5d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2455],{1412:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>a,frontMatter:()=>o,metadata:()=>u,toc:()=>p});var s=n(4848),r=n(8453);const o={sidebar_label:"jupyter",title:"sandbox.plugins.jupyter"},i=void 0,u={id:"python/sandbox/plugins/jupyter/__init__",title:"sandbox.plugins.jupyter",description:"JupyterRequirement Objects",source:"@site/docs/python/sandbox/plugins/jupyter/__init__.md",sourceDirName:"python/sandbox/plugins/jupyter",slug:"/python/sandbox/plugins/jupyter/__init__",permalink:"/OpenDevin/docs/python/sandbox/plugins/jupyter/__init__",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"jupyter",title:"sandbox.plugins.jupyter"}},c={},p=[{value:"JupyterRequirement Objects",id:"jupyterrequirement-objects",level:2},{value:"host_src",id:"host_src",level:4}];function l(e){const t={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"jupyterrequirement-objects",children:"JupyterRequirement Objects"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass JupyterRequirement(PluginRequirement)\n"})}),"\n",(0,s.jsx)(t.h4,{id:"host_src",children:"host_src"}),"\n",(0,s.jsx)(t.p,{children:"The directory of this file (sandbox/plugins/jupyter)"})]})}function a(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>u});var s=n(6540);const r={},o=s.createContext(r);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function u(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/955c06e6.26e541d8.js b/assets/js/955c06e6.26e541d8.js deleted file mode 100644 index e5a06abed8..0000000000 --- a/assets/js/955c06e6.26e541d8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[958],{8315:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>t,default:()=>u,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var i=s(4848),r=s(8453);const o={sidebar_position:2},t="\ud83e\udd16 LLM Backends",l={id:"usage/llms/llms",title:"\ud83e\udd16 LLM Backends",description:"OpenDevin can work with any LLM backend.",source:"@site/docs/usage/llms/llms.md",sourceDirName:"usage/llms",slug:"/usage/llms/",permalink:"/OpenDevin/docs/usage/llms/",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"\ud83d\udcbb OpenDevin",permalink:"/OpenDevin/docs/usage/intro"},next:{title:"Azure OpenAI LLM",permalink:"/OpenDevin/docs/usage/llms/azureLLMs"}},a={},d=[{value:"Note on Alternative Models",id:"note-on-alternative-models",level:2},{value:"API retries and rate limits",id:"api-retries-and-rate-limits",level:2}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"-llm-backends",children:"\ud83e\udd16 LLM Backends"}),"\n",(0,i.jsxs)(n.p,{children:["OpenDevin can work with any LLM backend.\nFor a full list of the LM providers and models available, please consult the\n",(0,i.jsx)(n.a,{href:"https://docs.litellm.ai/docs/providers",children:"litellm documentation"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"warning",children:(0,i.jsx)(n.p,{children:"OpenDevin will issue many prompts to the LLM you configure. Most of these LLMs cost money--be sure to set spending limits and monitor usage."})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"LLM_MODEL"})," environment variable controls which model is used in programmatic interactions.\nBut when using the OpenDevin UI, you'll need to choose your model in the settings window (the gear\nwheel on the bottom left)."]}),"\n",(0,i.jsx)(n.p,{children:"The following environment variables might be necessary for some LLMs:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_API_KEY"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_BASE_URL"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_EMBEDDING_MODEL"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_EMBEDDING_DEPLOYMENT_NAME"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.code,{children:"LLM_API_VERSION"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"We have a few guides for running OpenDevin with specific model providers:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"llms/localLLMs",children:"ollama"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"llms/azureLLMs",children:"Azure"})}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"If you're using another provider, we encourage you to open a PR to share your setup!"}),"\n",(0,i.jsx)(n.h2,{id:"note-on-alternative-models",children:"Note on Alternative Models"}),"\n",(0,i.jsx)(n.p,{children:"The best models are GPT-4 and Claude 3. Current local and open source models are\nnot nearly as powerful. When using an alternative model,\nyou may see long wait times between messages,\npoor responses, or errors about malformed JSON. OpenDevin\ncan only be as powerful as the models driving it--fortunately folks on our team\nare actively working on building better open source models!"}),"\n",(0,i.jsx)(n.h2,{id:"api-retries-and-rate-limits",children:"API retries and rate limits"}),"\n",(0,i.jsxs)(n.p,{children:["Some LLMs have rate limits and may require retries. OpenDevin will automatically retry requests if it receives a 429 error or API connection error.\nYou can set ",(0,i.jsx)(n.code,{children:"LLM_NUM_RETRIES"}),", ",(0,i.jsx)(n.code,{children:"LLM_RETRY_MIN_WAIT"}),", ",(0,i.jsx)(n.code,{children:"LLM_RETRY_MAX_WAIT"})," environment variables to control the number of retries and the time between retries.\nBy default, ",(0,i.jsx)(n.code,{children:"LLM_NUM_RETRIES"})," is 5 and ",(0,i.jsx)(n.code,{children:"LLM_RETRY_MIN_WAIT"}),", ",(0,i.jsx)(n.code,{children:"LLM_RETRY_MAX_WAIT"})," are 3 seconds and respectively 60 seconds."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>l});var i=s(6540);const r={},o=i.createContext(r);function t(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/998453ed.500ebbd9.js b/assets/js/998453ed.500ebbd9.js deleted file mode 100644 index d22b0e2dab..0000000000 --- a/assets/js/998453ed.500ebbd9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4046],{569:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>l,toc:()=>c});var s=t(4848),r=t(8453);const a={sidebar_label:"agent",title:"planner_agent.agent"},i=void 0,l={id:"python/planner_agent/agent",title:"planner_agent.agent",description:"PlannerAgent Objects",source:"@site/docs/python/planner_agent/agent.md",sourceDirName:"python/planner_agent",slug:"/python/planner_agent/agent",permalink:"/OpenDevin/docs/python/planner_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"planner_agent.agent"}},o={},c=[{value:"PlannerAgent Objects",id:"planneragent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"planneragent-objects",children:"PlannerAgent Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class PlannerAgent(Agent)\n"})}),"\n",(0,s.jsx)(n.p,{children:"The planner agent utilizes a special prompting strategy to create long term plans for solving problems.\nThe agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step."}),"\n",(0,s.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,s.jsx)(n.p,{children:"Initialize the Planner Agent with an LLM"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Checks to see if current step is completed, returns AgentFinishAction if True.\nOtherwise, creates a plan prompt and sends to model for inference, returning the result as the next action."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"state (State): The current state given the previous actions and observations"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"AgentFinishAction: If the last state was 'completed', 'verified', or 'abandoned'"}),"\n",(0,s.jsx)(n.li,{children:"Action: The next action to take based on llm response"}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var s=t(6540);const r={},a=s.createContext(r);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/99bc8fdd.727c00ab.js b/assets/js/99bc8fdd.727c00ab.js deleted file mode 100644 index b62825d11e..0000000000 --- a/assets/js/99bc8fdd.727c00ab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8930],{863:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>r,contentTitle:()=>c,default:()=>l,frontMatter:()=>s,metadata:()=>i,toc:()=>d});var o=n(4848),a=n(8453);const s={sidebar_label:"tasks",title:"opendevin.action.tasks"},c=void 0,i={id:"python/opendevin/action/tasks",title:"opendevin.action.tasks",description:"TaskStateChangedAction Objects",source:"@site/docs/python/opendevin/action/tasks.md",sourceDirName:"python/opendevin/action",slug:"/python/opendevin/action/tasks",permalink:"/OpenDevin/docs/python/opendevin/action/tasks",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"tasks",title:"opendevin.action.tasks"},sidebar:"apiSidebar",previous:{title:"fileop",permalink:"/OpenDevin/docs/python/opendevin/action/fileop"},next:{title:"agent_controller",permalink:"/OpenDevin/docs/python/opendevin/controller/agent_controller"}},r={},d=[{value:"TaskStateChangedAction Objects",id:"taskstatechangedaction-objects",level:2}];function p(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"taskstatechangedaction-objects",children:"TaskStateChangedAction Objects"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass TaskStateChangedAction(NotExecutableAction)\n"})}),"\n",(0,o.jsx)(t.p,{children:"Fake action, just to notify the client that a task state has changed."})]})}function l(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>c,x:()=>i});var o=n(6540);const a={},s=o.createContext(a);function c(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9c03797e.5b1427dc.js b/assets/js/9c03797e.5b1427dc.js deleted file mode 100644 index 3f90ff631f..0000000000 --- a/assets/js/9c03797e.5b1427dc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7120],{3294:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>i});var t=s(4848),r=s(8453);const a={sidebar_label:"agent",title:"server.agent.agent"},l=void 0,c={id:"python/server/agent/agent",title:"server.agent.agent",description:"AgentUnit Objects",source:"@site/docs/python/server/agent/agent.md",sourceDirName:"python/server/agent",slug:"/python/server/agent/",permalink:"/OpenDevin/docs/python/server/agent/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"server.agent.agent"}},d={},i=[{value:"AgentUnit Objects",id:"agentunit-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"send_error",id:"send_error",level:4},{value:"send_message",id:"send_message",level:4},{value:"send",id:"send",level:4},{value:"dispatch",id:"dispatch",level:4},{value:"get_arg_or_default",id:"get_arg_or_default",level:4},{value:"create_controller",id:"create_controller",level:4},{value:"start_task",id:"start_task",level:4},{value:"set_task_state",id:"set_task_state",level:4},{value:"on_agent_event",id:"on_agent_event",level:4}];function o(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"agentunit-objects",children:"AgentUnit Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class AgentUnit()\n"})}),"\n",(0,t.jsx)(n.p,{children:"Represents a session with an agent."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Attributes"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"controller"})," - The AgentController instance for controlling the agent."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"agent_task"})," - The task representing the agent's execution."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def __init__(sid)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Initializes a new instance of the Session class."}),"\n",(0,t.jsx)(n.h4,{id:"send_error",children:"send_error"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def send_error(message)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sends an error message to the client."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"message"})," - The error message to send."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"send_message",children:"send_message"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def send_message(message)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sends a message to the client."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"message"})," - The message to send."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"send",children:"send"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def send(data)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sends data to the client."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"data"})," - The data to send."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"dispatch",children:"dispatch"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def dispatch(action: str | None, data: dict)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Dispatches actions to the agent from the client."}),"\n",(0,t.jsx)(n.h4,{id:"get_arg_or_default",children:"get_arg_or_default"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def get_arg_or_default(_args: dict, key: ConfigType) -> str\n"})}),"\n",(0,t.jsx)(n.p,{children:"Gets an argument from the args dictionary or the default value."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"_args"})," - The args dictionary."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"key"})," - The key to get."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(n.p,{children:"The value of the key or the default value."}),"\n",(0,t.jsx)(n.h4,{id:"create_controller",children:"create_controller"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def create_controller(start_event: dict)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Creates an AgentController instance."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"start_event"})," - The start event data (optional)."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"start_task",children:"start_task"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def start_task(start_event)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Starts a task for the agent."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"start_event"})," - The start event data."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"set_task_state",children:"set_task_state"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def set_task_state(new_state_action: TaskStateAction)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Sets the state of the agent task."}),"\n",(0,t.jsx)(n.h4,{id:"on_agent_event",children:"on_agent_event"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def on_agent_event(event: Observation | Action)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Callback function for agent events."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"event"})," - The agent event (Observation or Action)."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>c});var t=s(6540);const r={},a=t.createContext(r);function l(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9c43fd88.8c0c78d8.js b/assets/js/9c43fd88.8c0c78d8.js new file mode 100644 index 0000000000..7663de4964 --- /dev/null +++ b/assets/js/9c43fd88.8c0c78d8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7526],{9209:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>a,toc:()=>p});var r=t(4848),s=t(8453);const o={sidebar_label:"prompt",title:"agenthub.planner_agent.prompt"},i=void 0,a={id:"python/agenthub/planner_agent/prompt",title:"agenthub.planner_agent.prompt",description:"get\\_hint",source:"@site/modules/python/agenthub/planner_agent/prompt.md",sourceDirName:"python/agenthub/planner_agent",slug:"/python/agenthub/planner_agent/prompt",permalink:"/OpenDevin/modules/python/agenthub/planner_agent/prompt",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"prompt",title:"agenthub.planner_agent.prompt"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/planner_agent/agent"},next:{title:"action",permalink:"/OpenDevin/modules/python/opendevin/action/__init__"}},l={},p=[{value:"get_hint",id:"get_hint",level:4},{value:"get_prompt",id:"get_prompt",level:4},{value:"parse_response",id:"parse_response",level:4}];function c(n){const e={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h4,{id:"get_hint",children:"get_hint"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def get_hint(latest_action_id: str) -> str\n"})}),"\n",(0,r.jsx)(e.p,{children:"Returns action type hint based on given action_id"}),"\n",(0,r.jsx)(e.h4,{id:"get_prompt",children:"get_prompt"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def get_prompt(plan: Plan, history: List[Tuple[Action, Observation]]) -> str\n"})}),"\n",(0,r.jsx)(e.p,{children:"Gets the prompt for the planner agent.\nFormatted with the most recent action-observation pairs, current task, and hint based on last action"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"plan (Plan): The original plan outlined by the user with LLM defined tasks"}),"\n",(0,r.jsx)(e.li,{children:"history (List[Tuple[Action, Observation]]): List of corresponding action-observation pairs"}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"str: The formatted string prompt with historical values"}),"\n"]}),"\n",(0,r.jsx)(e.h4,{id:"parse_response",children:"parse_response"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def parse_response(response: str) -> Action\n"})}),"\n",(0,r.jsx)(e.p,{children:"Parses the model output to find a valid action to take"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"response (str): A response from the model that potentially contains an Action."}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Action: A valid next action to perform from model output"}),"\n"]})]})}function d(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(c,{...n})}):c(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>i,x:()=>a});var r=t(6540);const s={},o=r.createContext(s);function i(n){const e=r.useContext(o);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function a(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:i(n.components),r.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/9c9a25fe.ef95b20f.js b/assets/js/9c9a25fe.ef95b20f.js deleted file mode 100644 index be5acec70e..0000000000 --- a/assets/js/9c9a25fe.ef95b20f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1533],{5266:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var n=t(4848),o=t(8453);const s={sidebar_label:"error",title:"observation.error"},a=void 0,c={id:"python/observation/error",title:"observation.error",description:"AgentErrorObservation Objects",source:"@site/docs/python/observation/error.md",sourceDirName:"python/observation",slug:"/python/observation/error",permalink:"/OpenDevin/docs/python/observation/error",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"error",title:"observation.error"}},i={},d=[{value:"AgentErrorObservation Objects",id:"agenterrorobservation-objects",level:2}];function l(e){const r={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.h2,{id:"agenterrorobservation-objects",children:"AgentErrorObservation Objects"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-python",children:"@dataclass\nclass AgentErrorObservation(Observation)\n"})}),"\n",(0,n.jsx)(r.p,{children:"This data class represents an error encountered by the agent."})]})}function p(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},8453:(e,r,t)=>{t.d(r,{R:()=>a,x:()=>c});var n=t(6540);const o={},s=n.createContext(o);function a(e){const r=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),n.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9d6e2b71.21709205.js b/assets/js/9d6e2b71.21709205.js deleted file mode 100644 index ca96bb941e..0000000000 --- a/assets/js/9d6e2b71.21709205.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7647],{6724:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>c,contentTitle:()=>t,default:()=>u,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var i=n(4848),l=n(8453);const s={},t="Google Gemini/Vertex LLM",r={id:"usage/llms/googleLLMs",title:"Google Gemini/Vertex LLM",description:"Completion",source:"@site/docs/usage/llms/googleLLMs.md",sourceDirName:"usage/llms",slug:"/usage/llms/googleLLMs",permalink:"/OpenDevin/docs/usage/llms/googleLLMs",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Azure OpenAI LLM",permalink:"/OpenDevin/docs/usage/llms/azureLLMs"},next:{title:"Local LLM with Ollama",permalink:"/OpenDevin/docs/usage/llms/localLLMs"}},c={},d=[{value:"Completion",id:"completion",level:2},{value:"Gemini - Google AI Studio Configs",id:"gemini---google-ai-studio-configs",level:3},{value:"Vertex AI - Google Cloud Platform Configs",id:"vertex-ai---google-cloud-platform-configs",level:3}];function g(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.h1,{id:"google-geminivertex-llm",children:"Google Gemini/Vertex LLM"}),"\n",(0,i.jsx)(o.h2,{id:"completion",children:"Completion"}),"\n",(0,i.jsx)(o.p,{children:"OpenDevin uses LiteLLM for completion calls. The following resources are relevant for using OpenDevin with Google's LLMs"}),"\n",(0,i.jsxs)(o.ul,{children:["\n",(0,i.jsx)(o.li,{children:(0,i.jsx)(o.a,{href:"https://docs.litellm.ai/docs/providers/gemini",children:"Gemini - Google AI Studio"})}),"\n",(0,i.jsx)(o.li,{children:(0,i.jsx)(o.a,{href:"https://docs.litellm.ai/docs/providers/vertex",children:"VertexAI - Google Cloud Platform"})}),"\n"]}),"\n",(0,i.jsx)(o.h3,{id:"gemini---google-ai-studio-configs",children:"Gemini - Google AI Studio Configs"}),"\n",(0,i.jsxs)(o.p,{children:["To use Gemini through Google AI Studio when running the OpenDevin Docker image, you'll need to set the following environment variables using ",(0,i.jsx)(o.code,{children:"-e"}),":"]}),"\n",(0,i.jsx)(o.pre,{children:(0,i.jsx)(o.code,{children:'GEMINI_API_KEY=""\nLLM_MODEL="gemini/gemini-1.5-pro"\n'})}),"\n",(0,i.jsx)(o.h3,{id:"vertex-ai---google-cloud-platform-configs",children:"Vertex AI - Google Cloud Platform Configs"}),"\n",(0,i.jsxs)(o.p,{children:["To use Vertex AI through Google Cloud Platform when running the OpenDevin Docker image, you'll need to set the following environment variables using ",(0,i.jsx)(o.code,{children:"-e"}),":"]}),"\n",(0,i.jsx)(o.pre,{children:(0,i.jsx)(o.code,{children:'GOOGLE_APPLICATION_CREDENTIALS=""\nVERTEXAI_PROJECT=""\nVERTEXAI_LOCATION=""\nLLM_MODEL="vertex_ai/"\n'})})]})}function u(e={}){const{wrapper:o}={...(0,l.R)(),...e.components};return o?(0,i.jsx)(o,{...e,children:(0,i.jsx)(g,{...e})}):g(e)}},8453:(e,o,n)=>{n.d(o,{R:()=>t,x:()=>r});var i=n(6540);const l={},s=i.createContext(l);function t(e){const o=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),i.createElement(s.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a0da559b.609ffb9b.js b/assets/js/a0da559b.609ffb9b.js deleted file mode 100644 index c4e345b8ef..0000000000 --- a/assets/js/a0da559b.609ffb9b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4358],{1662:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>l,frontMatter:()=>r,metadata:()=>s,toc:()=>p});var o=t(4848),i=t(8453);const r={sidebar_label:"config",title:"opendevin.config"},c=void 0,s={id:"python/opendevin/config",title:"opendevin.config",description:"get",source:"@site/docs/python/opendevin/config.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/config",permalink:"/OpenDevin/docs/python/opendevin/config",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"config",title:"opendevin.config"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/docs/python/opendevin/agent"},next:{title:"files",permalink:"/OpenDevin/docs/python/opendevin/files"}},d={},p=[{value:"get",id:"get",level:4}];function a(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"get",children:"get"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def get(key: ConfigType, required: bool = False)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Get a key from the environment variables or config.toml or default configs."})]})}function l(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>s});var o=t(6540);const i={},r=o.createContext(i);function c(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a1778e00.4a0a1bfd.js b/assets/js/a1778e00.4a0a1bfd.js deleted file mode 100644 index 03086987e0..0000000000 --- a/assets/js/a1778e00.4a0a1bfd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5138],{1506:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>i,default:()=>a,frontMatter:()=>l,metadata:()=>r,toc:()=>c});var o=t(4848),s=t(8453);const l={sidebar_label:"monologue",title:"monologue_agent.utils.monologue"},i=void 0,r={id:"python/monologue_agent/utils/monologue",title:"monologue_agent.utils.monologue",description:"Monologue Objects",source:"@site/docs/python/monologue_agent/utils/monologue.md",sourceDirName:"python/monologue_agent/utils",slug:"/python/monologue_agent/utils/monologue",permalink:"/OpenDevin/docs/python/monologue_agent/utils/monologue",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"monologue",title:"monologue_agent.utils.monologue"}},h={},c=[{value:"Monologue Objects",id:"monologue-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"add_event",id:"add_event",level:4},{value:"get_thoughts",id:"get_thoughts",level:4},{value:"get_total_length",id:"get_total_length",level:4},{value:"condense",id:"condense",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"monologue-objects",children:"Monologue Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class Monologue()\n"})}),"\n",(0,o.jsx)(n.p,{children:"The monologue is a representation for the agent's internal monologue where it can think.\nThe agent has the capability of using this monologue for whatever it wants."}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initialize the empty list of thoughts"}),"\n",(0,o.jsx)(n.h4,{id:"add_event",children:"add_event"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def add_event(t: dict)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Adds an event to memory if it is a valid event."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"t (dict): The thought that we want to add to memory"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"AgentEventTypeError: If t is not a dict"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"get_thoughts",children:"get_thoughts"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def get_thoughts()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Get the current thoughts of the agent."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"List: The list of thoughts that the agent has."}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"get_total_length",children:"get_total_length"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def get_total_length()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Gives the total number of characters in all thoughts"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Int: Total number of chars in thoughts."}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"condense",children:"condense"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def condense(llm: LLM)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Attempts to condense the monologue by using the llm"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"llm (LLM): llm to be used for summarization"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Exception: the same exception as it got from the llm or processing the response"}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>r});var o=t(6540);const s={},l=o.createContext(s);function i(e){const n=o.useContext(l);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a218167a.2723b6b7.js b/assets/js/a218167a.2723b6b7.js new file mode 100644 index 0000000000..6019cf6b75 --- /dev/null +++ b/assets/js/a218167a.2723b6b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6732],{8601:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var o=r(4848),t=r(8453);const s={sidebar_label:"error",title:"opendevin.observation.error"},i=void 0,a={id:"python/opendevin/observation/error",title:"opendevin.observation.error",description:"AgentErrorObservation Objects",source:"@site/modules/python/opendevin/observation/error.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/error",permalink:"/OpenDevin/modules/python/opendevin/observation/error",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"error",title:"opendevin.observation.error"},sidebar:"apiSidebar",previous:{title:"delegate",permalink:"/OpenDevin/modules/python/opendevin/observation/delegate"},next:{title:"files",permalink:"/OpenDevin/modules/python/opendevin/observation/files"}},c={},d=[{value:"AgentErrorObservation Objects",id:"agenterrorobservation-objects",level:2}];function p(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"agenterrorobservation-objects",children:"AgentErrorObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass AgentErrorObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents an error encountered by the agent."})]})}function l(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>a});var o=r(6540);const t={},s=o.createContext(t);function i(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a303a078.ffa16e87.js b/assets/js/a303a078.ffa16e87.js deleted file mode 100644 index 147696ba5e..0000000000 --- a/assets/js/a303a078.ffa16e87.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[942],{1473:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>p,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var r=t(4848),s=t(8453);const o={sidebar_label:"prompt",title:"agenthub.planner_agent.prompt"},i=void 0,a={id:"python/agenthub/planner_agent/prompt",title:"agenthub.planner_agent.prompt",description:"get\\_hint",source:"@site/docs/python/agenthub/planner_agent/prompt.md",sourceDirName:"python/agenthub/planner_agent",slug:"/python/agenthub/planner_agent/prompt",permalink:"/OpenDevin/docs/python/agenthub/planner_agent/prompt",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"prompt",title:"agenthub.planner_agent.prompt"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/docs/python/agenthub/planner_agent/agent"},next:{title:"action",permalink:"/OpenDevin/docs/python/opendevin/action/__init__"}},p={},l=[{value:"get_hint",id:"get_hint",level:4},{value:"get_prompt",id:"get_prompt",level:4},{value:"parse_response",id:"parse_response",level:4}];function c(n){const e={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h4,{id:"get_hint",children:"get_hint"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def get_hint(latest_action_id: str) -> str\n"})}),"\n",(0,r.jsx)(e.p,{children:"Returns action type hint based on given action_id"}),"\n",(0,r.jsx)(e.h4,{id:"get_prompt",children:"get_prompt"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def get_prompt(plan: Plan, history: List[Tuple[Action, Observation]]) -> str\n"})}),"\n",(0,r.jsx)(e.p,{children:"Gets the prompt for the planner agent.\nFormatted with the most recent action-observation pairs, current task, and hint based on last action"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"plan (Plan): The original plan outlined by the user with LLM defined tasks"}),"\n",(0,r.jsx)(e.li,{children:"history (List[Tuple[Action, Observation]]): List of corresponding action-observation pairs"}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"str: The formatted string prompt with historical values"}),"\n"]}),"\n",(0,r.jsx)(e.h4,{id:"parse_response",children:"parse_response"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def parse_response(response: str) -> Action\n"})}),"\n",(0,r.jsx)(e.p,{children:"Parses the model output to find a valid action to take"}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"response (str): A response from the model that potentially contains an Action."}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:"Action: A valid next action to perform from model output"}),"\n"]})]})}function d(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(c,{...n})}):c(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>i,x:()=>a});var r=t(6540);const s={},o=r.createContext(s);function i(n){const e=r.useContext(o);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function a(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:i(n.components),r.createElement(o.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/a51d373a.2ec07d1b.js b/assets/js/a51d373a.2ec07d1b.js new file mode 100644 index 0000000000..6a87877daf --- /dev/null +++ b/assets/js/a51d373a.2ec07d1b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6872],{7791:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>l,default:()=>c,frontMatter:()=>o,metadata:()=>a,toc:()=>p});var i=t(4848),s=t(8453);const o={sidebar_label:"system",title:"opendevin.utils.system"},l=void 0,a={id:"python/opendevin/utils/system",title:"opendevin.utils.system",description:"find\\available\\tcp\\_port",source:"@site/modules/python/opendevin/utils/system.md",sourceDirName:"python/opendevin/utils",slug:"/python/opendevin/utils/system",permalink:"/OpenDevin/modules/python/opendevin/utils/system",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"system",title:"opendevin.utils.system"},sidebar:"apiSidebar",previous:{title:"listen",permalink:"/OpenDevin/modules/python/opendevin/server/listen"},next:{title:"agent",permalink:"/OpenDevin/modules/python/opendevin/agent"}},r={},p=[{value:"find_available_tcp_port",id:"find_available_tcp_port",level:4}];function d(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h4,{id:"find_available_tcp_port",children:"find_available_tcp_port"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def find_available_tcp_port() -> int\n"})}),"\n",(0,i.jsx)(n.p,{children:"Find an available TCP port, return -1 if none available."})]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>a});var i=t(6540);const s={},o=i.createContext(s);function l(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a5673c89.fe9d4745.js b/assets/js/a5673c89.fe9d4745.js deleted file mode 100644 index 0ca3e32e91..0000000000 --- a/assets/js/a5673c89.fe9d4745.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4547],{2734:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var s=t(4848),a=t(8453);const r={sidebar_label:"agent",title:"agenthub.planner_agent.agent"},i=void 0,l={id:"python/agenthub/planner_agent/agent",title:"agenthub.planner_agent.agent",description:"PlannerAgent Objects",source:"@site/docs/python/agenthub/planner_agent/agent.md",sourceDirName:"python/agenthub/planner_agent",slug:"/python/agenthub/planner_agent/agent",permalink:"/OpenDevin/docs/python/agenthub/planner_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.planner_agent.agent"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/agent"},next:{title:"prompt",permalink:"/OpenDevin/docs/python/agenthub/planner_agent/prompt"}},o={},c=[{value:"PlannerAgent Objects",id:"planneragent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4}];function p(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"planneragent-objects",children:"PlannerAgent Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class PlannerAgent(Agent)\n"})}),"\n",(0,s.jsx)(n.p,{children:"The planner agent utilizes a special prompting strategy to create long term plans for solving problems.\nThe agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step."}),"\n",(0,s.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,s.jsx)(n.p,{children:"Initialize the Planner Agent with an LLM"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Checks to see if current step is completed, returns AgentFinishAction if True.\nOtherwise, creates a plan prompt and sends to model for inference, returning the result as the next action."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"state (State): The current state given the previous actions and observations"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"AgentFinishAction: If the last state was 'completed', 'verified', or 'abandoned'"}),"\n",(0,s.jsx)(n.li,{children:"Action: The next action to take based on llm response"}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var s=t(6540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a5b6ae45.77b05601.js b/assets/js/a5b6ae45.77b05601.js deleted file mode 100644 index 37f68426d2..0000000000 --- a/assets/js/a5b6ae45.77b05601.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7526],{1133:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>r});var s=t(4848),c=t(8453);const o={sidebar_label:"codeact_agent",title:"agenthub.codeact_agent.codeact_agent"},a=void 0,i={id:"python/agenthub/codeact_agent/codeact_agent",title:"agenthub.codeact_agent.codeact_agent",description:"CodeActAgent Objects",source:"@site/docs/python/agenthub/codeact_agent/codeact_agent.md",sourceDirName:"python/agenthub/codeact_agent",slug:"/python/agenthub/codeact_agent/",permalink:"/OpenDevin/docs/python/agenthub/codeact_agent/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"codeact_agent",title:"agenthub.codeact_agent.codeact_agent"},sidebar:"apiSidebar",previous:{title:"parser",permalink:"/OpenDevin/docs/python/agenthub/SWE_agent/parser"},next:{title:"agent",permalink:"/OpenDevin/docs/python/agenthub/delegator_agent/agent"}},d={},r=[{value:"CodeActAgent Objects",id:"codeactagent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"codeactagent-objects",children:"CodeActAgent Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class CodeActAgent(Agent)\n"})}),"\n",(0,s.jsx)(n.p,{children:"The Code Act Agent is a minimalist agent.\nThe agent works by passing the model a list of action-observation pairs and prompting the model to take the next step."}),"\n",(0,s.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Initializes a new instance of the CodeActAgent class."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Performs one step using the Code Act Agent.\nThis includes gathering info on previous steps and prompting the model to make a command to execute."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"state (State): used to get updated info and background commands"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"CmdRunAction(command) - command action to run"}),"\n",(0,s.jsx)(n.li,{children:"AgentEchoAction(content=INVALID_INPUT_MESSAGE) - invalid command output"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"NotImplementedError - for actions other than CmdOutputObservation or AgentMessageObservation"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var s=t(6540);const c={},o=s.createContext(c);function a(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:a(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a5e0da4d.5b0c871a.js b/assets/js/a5e0da4d.5b0c871a.js deleted file mode 100644 index c0c5fc9cbd..0000000000 --- a/assets/js/a5e0da4d.5b0c871a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5527],{3409:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>t,metadata:()=>l,toc:()=>d});var s=o(4848),r=o(8453);const t={sidebar_position:4},i="\ud83d\udea7 Troubleshooting",l={id:"usage/troubleshooting/troubleshooting",title:"\ud83d\udea7 Troubleshooting",description:"There are some error messages that get reported over and over by users.",source:"@site/docs/usage/troubleshooting/troubleshooting.md",sourceDirName:"usage/troubleshooting",slug:"/usage/troubleshooting/",permalink:"/OpenDevin/docs/usage/troubleshooting/",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"docsSidebar",previous:{title:"\ud83e\udde0 Agents and Capabilities",permalink:"/OpenDevin/docs/usage/agents"},next:{title:"Notes for Windows and WSL Users",permalink:"/OpenDevin/docs/usage/troubleshooting/windows"}},c={},d=[{value:"Unable to connect to docker",id:"unable-to-connect-to-docker",level:2},{value:"Symptoms",id:"symptoms",level:3},{value:"Details",id:"details",level:3},{value:"Workarounds",id:"workarounds",level:3},{value:"Unable to connect to SSH box",id:"unable-to-connect-to-ssh-box",level:2},{value:"Symptoms",id:"symptoms-1",level:3},{value:"Details",id:"details-1",level:3},{value:"Workarounds",id:"workarounds-1",level:3},{value:"Unable to connect to LLM",id:"unable-to-connect-to-llm",level:2},{value:"Symptoms",id:"symptoms-2",level:3},{value:"Details",id:"details-2",level:3},{value:"Workarounds",id:"workarounds-2",level:3}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"-troubleshooting",children:"\ud83d\udea7 Troubleshooting"}),"\n",(0,s.jsx)(n.p,{children:"There are some error messages that get reported over and over by users.\nWe'll try and make the install process easier, and to make these error messages\nbetter in the future. But for now, you can look for your error message below,\nand see if there are any workaround."}),"\n",(0,s.jsxs)(n.p,{children:["For each of these error messages ",(0,s.jsx)(n.strong,{children:"there is an existing issue"}),". Please do not\nopen an new issue--just comment there."]}),"\n",(0,s.jsx)(n.p,{children:"If you find more information or a workaround for one of these issues, please\nopen a PR to add details to this file."}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["If you're running on Windows and having trouble, check out our ",(0,s.jsx)(n.a,{href:"troubleshooting/windows",children:"guide for Windows users"})]})}),"\n",(0,s.jsx)(n.h2,{id:"unable-to-connect-to-docker",children:(0,s.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/issues/1226",children:"Unable to connect to docker"})}),"\n",(0,s.jsx)(n.h3,{id:"symptoms",children:"Symptoms"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Error creating controller. Please check Docker is running using docker ps\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))\n"})}),"\n",(0,s.jsx)(n.h3,{id:"details",children:"Details"}),"\n",(0,s.jsx)(n.p,{children:"OpenDevin uses a docker container to do its work safely, without potentially breaking your machine."}),"\n",(0,s.jsx)(n.h3,{id:"workarounds",children:"Workarounds"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Run ",(0,s.jsx)(n.code,{children:"docker ps"})," to ensure that docker is running"]}),"\n",(0,s.jsxs)(n.li,{children:["Make sure you don't need ",(0,s.jsx)(n.code,{children:"sudo"})," to run docker ",(0,s.jsx)(n.a,{href:"https://www.baeldung.com/linux/docker-run-without-sudo",children:"see here"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"unable-to-connect-to-ssh-box",children:(0,s.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/issues/1156",children:"Unable to connect to SSH box"})}),"\n",(0,s.jsx)(n.h3,{id:"symptoms-1",children:"Symptoms"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"self.shell = DockerSSHBox(\n...\npexpect.pxssh.ExceptionPxssh: Could not establish connection to host\n"})}),"\n",(0,s.jsx)(n.h3,{id:"details-1",children:"Details"}),"\n",(0,s.jsx)(n.p,{children:"By default, OpenDevin connects to a running container using SSH. On some machines,\nespecially Windows, this seems to fail."}),"\n",(0,s.jsx)(n.h3,{id:"workarounds-1",children:"Workarounds"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Restart your computer (sometimes works?)"}),"\n",(0,s.jsx)(n.li,{children:"Be sure to have the latest versions of WSL and Docker"}),"\n",(0,s.jsxs)(n.li,{children:["Try ",(0,s.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/issues/1156#issuecomment-2064549427",children:"this reinstallation guide"})]}),"\n",(0,s.jsxs)(n.li,{children:["Set ",(0,s.jsx)(n.code,{children:"-e SANDBOX_TYPE=exec"})," to switch to the ExecBox docker container"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"unable-to-connect-to-llm",children:(0,s.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/issues/1208",children:"Unable to connect to LLM"})}),"\n",(0,s.jsx)(n.h3,{id:"symptoms-2",children:"Symptoms"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:" File \"/app/.venv/lib/python3.12/site-packages/openai/_exceptions.py\", line 81, in __init__\n super().__init__(message, response.request, body=body)\n ^^^^^^^^^^^^^^^^\nAttributeError: 'NoneType' object has no attribute 'request'\n"})}),"\n",(0,s.jsx)(n.h3,{id:"details-2",children:"Details"}),"\n",(0,s.jsxs)(n.p,{children:["This usually happens with local LLM setups, when OpenDevin can't connect to the LLM server.\nSee our guide for ",(0,s.jsx)(n.a,{href:"llms/localLLMs",children:"local LLMs"})," for more information."]}),"\n",(0,s.jsx)(n.h3,{id:"workarounds-2",children:"Workarounds"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Check your ",(0,s.jsx)(n.code,{children:"LLM_BASE_URL"})]}),"\n",(0,s.jsx)(n.li,{children:"Check that ollama is running OK"}),"\n",(0,s.jsxs)(n.li,{children:["Make sure you're using ",(0,s.jsx)(n.code,{children:"--add-host host.docker.internal=host-gateway"})," when running in docker"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>l});var s=o(6540);const r={},t=s.createContext(r);function i(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a6721bfe.c533b9b4.js b/assets/js/a6721bfe.c533b9b4.js deleted file mode 100644 index 692ddee543..0000000000 --- a/assets/js/a6721bfe.c533b9b4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2395],{3805:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>c,toc:()=>i});var t=o(4848),s=o(8453);const r={sidebar_label:"json",title:"monologue_agent.utils.json"},l=void 0,c={id:"python/monologue_agent/utils/json",title:"monologue_agent.utils.json",description:"my\\_encoder",source:"@site/docs/python/monologue_agent/utils/json.md",sourceDirName:"python/monologue_agent/utils",slug:"/python/monologue_agent/utils/json",permalink:"/OpenDevin/docs/python/monologue_agent/utils/json",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"json",title:"monologue_agent.utils.json"}},d={},i=[{value:"my_encoder",id:"my_encoder",level:4},{value:"dumps",id:"dumps",level:4},{value:"loads",id:"loads",level:4}];function a(e){const n={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h4,{id:"my_encoder",children:"my_encoder"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def my_encoder(obj)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Encodes objects as dictionaries"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"obj (Object): An object that will be converted"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"dict: If the object can be converted it is returned in dict format"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"dumps",children:"dumps"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def dumps(obj, **kwargs)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Serialize an object to str format"}),"\n",(0,t.jsx)(n.h4,{id:"loads",children:"loads"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def loads(s, **kwargs)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Create a JSON object from str"})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>l,x:()=>c});var t=o(6540);const s={},r=t.createContext(s);function l(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a859ffc5.a09f2ce7.js b/assets/js/a859ffc5.a09f2ce7.js new file mode 100644 index 0000000000..7d89d9e074 --- /dev/null +++ b/assets/js/a859ffc5.a09f2ce7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7462],{6730:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>o,default:()=>a,frontMatter:()=>d,metadata:()=>c,toc:()=>l});var i=t(4848),s=t(8453);const d={sidebar_position:3},o="\ud83e\udde0 Agents and Capabilities",c={id:"usage/agents",title:"\ud83e\udde0 Agents and Capabilities",description:"Monologue Agent",source:"@site/modules/usage/agents.md",sourceDirName:"usage",slug:"/usage/agents",permalink:"/OpenDevin/modules/usage/agents",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:3,frontMatter:{sidebar_position:3},sidebar:"docsSidebar",previous:{title:"Local LLM with Ollama",permalink:"/OpenDevin/modules/usage/llms/localLLMs"},next:{title:"\ud83c\udfdb\ufe0f System Architecture Overview",permalink:"/OpenDevin/modules/usage/architecture"}},r={},l=[{value:"Monologue Agent",id:"monologue-agent",level:2},{value:"Description",id:"description",level:3},{value:"Actions",id:"actions",level:3},{value:"Observations",id:"observations",level:3},{value:"Methods",id:"methods",level:3},{value:"Planner Agent",id:"planner-agent",level:2},{value:"Description",id:"description-1",level:3},{value:"Actions",id:"actions-1",level:3},{value:"Observations",id:"observations-1",level:3},{value:"Methods",id:"methods-1",level:3},{value:"CodeAct Agent",id:"codeact-agent",level:2},{value:"Description",id:"description-2",level:3},{value:"Actions",id:"actions-2",level:3},{value:"Observations",id:"observations-2",level:3},{value:"Methods",id:"methods-2",level:3}];function h(e){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"-agents-and-capabilities",children:"\ud83e\udde0 Agents and Capabilities"}),"\n",(0,i.jsx)(n.h2,{id:"monologue-agent",children:"Monologue Agent"}),"\n",(0,i.jsx)(n.h3,{id:"description",children:"Description"}),"\n",(0,i.jsx)(n.p,{children:"The Monologue Agent utilizes long and short term memory to complete tasks.\nLong term memory is stored as a LongTermMemory object and the model uses it to search for examples from the past.\nShort term memory is stored as a Monologue object and the model can condense it as necessary."}),"\n",(0,i.jsx)(n.h3,{id:"actions",children:"Actions"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Action"}),",\n",(0,i.jsx)(n.code,{children:"NullAction"}),",\n",(0,i.jsx)(n.code,{children:"CmdRunAction"}),",\n",(0,i.jsx)(n.code,{children:"FileWriteAction"}),",\n",(0,i.jsx)(n.code,{children:"FileReadAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentRecallAction"}),",\n",(0,i.jsx)(n.code,{children:"BrowseURLAction"}),",\n",(0,i.jsx)(n.code,{children:"GithubPushAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentThinkAction"})]}),"\n",(0,i.jsx)(n.h3,{id:"observations",children:"Observations"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Observation"}),",\n",(0,i.jsx)(n.code,{children:"NullObservation"}),",\n",(0,i.jsx)(n.code,{children:"CmdOutputObservation"}),",\n",(0,i.jsx)(n.code,{children:"FileReadObservation"}),",\n",(0,i.jsx)(n.code,{children:"AgentRecallObservation"}),",\n",(0,i.jsx)(n.code,{children:"BrowserOutputObservation"})]}),"\n",(0,i.jsx)(n.h3,{id:"methods",children:"Methods"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Method"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"__init__"})}),(0,i.jsx)(n.td,{children:"Initializes the agent with a long term memory, and an internal monologue"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"_add_event"})}),(0,i.jsx)(n.td,{children:"Appends events to the monologue of the agent and condenses with summary automatically if the monologue is too long"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"_initialize"})}),(0,i.jsxs)(n.td,{children:["Utilizes the ",(0,i.jsx)(n.code,{children:"INITIAL_THOUGHTS"})," list to give the agent a context for its capabilities and how to navigate the ",(0,i.jsx)(n.code,{children:"/workspace"})]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"step"})}),(0,i.jsx)(n.td,{children:"Modifies the current state by adding the most recent actions and observations, then prompts the model to think about its next action to take."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"search_memory"})}),(0,i.jsxs)(n.td,{children:["Uses ",(0,i.jsx)(n.code,{children:"VectorIndexRetriever"})," to find related memories within the long term memory."]})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"planner-agent",children:"Planner Agent"}),"\n",(0,i.jsx)(n.h3,{id:"description-1",children:"Description"}),"\n",(0,i.jsx)(n.p,{children:"The planner agent utilizes a special prompting strategy to create long term plans for solving problems.\nThe agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step."}),"\n",(0,i.jsx)(n.h3,{id:"actions-1",children:"Actions"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"NullAction"}),",\n",(0,i.jsx)(n.code,{children:"CmdRunAction"}),",\n",(0,i.jsx)(n.code,{children:"CmdKillAction"}),",\n",(0,i.jsx)(n.code,{children:"BrowseURLAction"}),",\n",(0,i.jsx)(n.code,{children:"GithubPushAction"}),",\n",(0,i.jsx)(n.code,{children:"FileReadAction"}),",\n",(0,i.jsx)(n.code,{children:"FileWriteAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentRecallAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentThinkAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentFinishAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentSummarizeAction"}),",\n",(0,i.jsx)(n.code,{children:"AddTaskAction"}),",\n",(0,i.jsx)(n.code,{children:"ModifyTaskAction"}),","]}),"\n",(0,i.jsx)(n.h3,{id:"observations-1",children:"Observations"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Observation"}),",\n",(0,i.jsx)(n.code,{children:"NullObservation"}),",\n",(0,i.jsx)(n.code,{children:"CmdOutputObservation"}),",\n",(0,i.jsx)(n.code,{children:"FileReadObservation"}),",\n",(0,i.jsx)(n.code,{children:"AgentRecallObservation"}),",\n",(0,i.jsx)(n.code,{children:"BrowserOutputObservation"})]}),"\n",(0,i.jsx)(n.h3,{id:"methods-1",children:"Methods"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Method"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"__init__"})}),(0,i.jsxs)(n.td,{children:["Initializes an agent with ",(0,i.jsx)(n.code,{children:"llm"})]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"step"})}),(0,i.jsxs)(n.td,{children:["Checks to see if current step is completed, returns ",(0,i.jsx)(n.code,{children:"AgentFinishAction"})," if True. Otherwise, creates a plan prompt and sends to model for inference, adding the result as the next action."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"search_memory"})}),(0,i.jsx)(n.td,{children:"Not yet implemented"})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"codeact-agent",children:"CodeAct Agent"}),"\n",(0,i.jsx)(n.h3,{id:"description-2",children:"Description"}),"\n",(0,i.jsx)(n.p,{children:"The Code Act Agent is a minimalist agent. The agent works by passing the model a list of action-observation pairs and prompting the model to take the next step."}),"\n",(0,i.jsx)(n.h3,{id:"actions-2",children:"Actions"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"Action"}),",\n",(0,i.jsx)(n.code,{children:"CmdRunAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentEchoAction"}),",\n",(0,i.jsx)(n.code,{children:"AgentFinishAction"}),","]}),"\n",(0,i.jsx)(n.h3,{id:"observations-2",children:"Observations"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"CmdOutputObservation"}),",\n",(0,i.jsx)(n.code,{children:"AgentMessageObservation"}),","]}),"\n",(0,i.jsx)(n.h3,{id:"methods-2",children:"Methods"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Method"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"__init__"})}),(0,i.jsxs)(n.td,{children:["Initializes an agent with ",(0,i.jsx)(n.code,{children:"llm"})," and a list of messages ",(0,i.jsx)(n.code,{children:"List[Mapping[str, str]]"})]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"step"})}),(0,i.jsxs)(n.td,{children:["First, gets messages from state and then compiles them into a list for context. Next, pass the context list with the prompt to get the next command to execute. Finally, Execute command if valid, else return ",(0,i.jsx)(n.code,{children:"AgentEchoAction(INVALID_INPUT_MESSAGE)"})]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"search_memory"})}),(0,i.jsx)(n.td,{children:"Not yet implemented"})]})]})]})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>c});var i=t(6540);const s={},d=i.createContext(s);function o(e){const n=i.useContext(d);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a86dacba.0e9f680e.js b/assets/js/a86dacba.0e9f680e.js deleted file mode 100644 index 1bcb1a516b..0000000000 --- a/assets/js/a86dacba.0e9f680e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8785],{5845:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>u,toc:()=>l});var r=t(4848),s=t(8453);const i={sidebar_label:"requirement",title:"sandbox.plugins.requirement"},o=void 0,u={id:"python/sandbox/plugins/requirement",title:"sandbox.plugins.requirement",description:"PluginRequirement Objects",source:"@site/docs/python/sandbox/plugins/requirement.md",sourceDirName:"python/sandbox/plugins",slug:"/python/sandbox/plugins/requirement",permalink:"/OpenDevin/docs/python/sandbox/plugins/requirement",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"requirement",title:"sandbox.plugins.requirement"}},c={},l=[{value:"PluginRequirement Objects",id:"pluginrequirement-objects",level:2}];function a(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"pluginrequirement-objects",children:"PluginRequirement Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass PluginRequirement()\n"})}),"\n",(0,r.jsx)(n.p,{children:"Requirement for a plugin."})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>u});var r=t(6540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function u(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a94bae3d.ec3c4c3c.js b/assets/js/a94bae3d.ec3c4c3c.js deleted file mode 100644 index 61973df62a..0000000000 --- a/assets/js/a94bae3d.ec3c4c3c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5e3],{6309:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>b,frontMatter:()=>r,metadata:()=>a,toc:()=>p});var o=t(4848),s=t(8453);const r={sidebar_label:"browse",title:"opendevin.observation.browse"},i=void 0,a={id:"python/opendevin/observation/browse",title:"opendevin.observation.browse",description:"BrowserOutputObservation Objects",source:"@site/docs/python/opendevin/observation/browse.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/browse",permalink:"/OpenDevin/docs/python/opendevin/observation/browse",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"browse",title:"opendevin.observation.browse"},sidebar:"apiSidebar",previous:{title:"base",permalink:"/OpenDevin/docs/python/opendevin/observation/base"},next:{title:"delegate",permalink:"/OpenDevin/docs/python/opendevin/observation/delegate"}},c={},p=[{value:"BrowserOutputObservation Objects",id:"browseroutputobservation-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"browseroutputobservation-objects",children:"BrowserOutputObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass BrowserOutputObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents the output of a browser."})]})}function b(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var o=t(6540);const s={},r=o.createContext(s);function i(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a969024b.14182a81.js b/assets/js/a969024b.14182a81.js new file mode 100644 index 0000000000..6254d61abc --- /dev/null +++ b/assets/js/a969024b.14182a81.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4910],{9140:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var o=t(4848),s=t(8453);const a={sidebar_label:"delegate",title:"opendevin.observation.delegate"},r=void 0,i={id:"python/opendevin/observation/delegate",title:"opendevin.observation.delegate",description:"AgentDelegateObservation Objects",source:"@site/modules/python/opendevin/observation/delegate.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/delegate",permalink:"/OpenDevin/modules/python/opendevin/observation/delegate",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"delegate",title:"opendevin.observation.delegate"},sidebar:"apiSidebar",previous:{title:"browse",permalink:"/OpenDevin/modules/python/opendevin/observation/browse"},next:{title:"error",permalink:"/OpenDevin/modules/python/opendevin/observation/error"}},d={},l=[{value:"AgentDelegateObservation Objects",id:"agentdelegateobservation-objects",level:2}];function c(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"agentdelegateobservation-objects",children:"AgentDelegateObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass AgentDelegateObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents a delegate observation.\nThis is used when the produced action is NOT executable."})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>i});var o=t(6540);const s={},a=o.createContext(s);function r(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/aab75608.25b8b8a9.js b/assets/js/aab75608.25b8b8a9.js deleted file mode 100644 index 590b88109f..0000000000 --- a/assets/js/aab75608.25b8b8a9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1913],{4197:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>i,contentTitle:()=>a,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>u});var o=n(4848),s=n(8453);const r={sidebar_label:"run",title:"observation.run"},a=void 0,c={id:"python/observation/run",title:"observation.run",description:"CmdOutputObservation Objects",source:"@site/docs/python/observation/run.md",sourceDirName:"python/observation",slug:"/python/observation/run",permalink:"/OpenDevin/docs/python/observation/run",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"run",title:"observation.run"}},i={},u=[{value:"CmdOutputObservation Objects",id:"cmdoutputobservation-objects",level:2}];function d(t){const e={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"cmdoutputobservation-objects",children:"CmdOutputObservation Objects"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-python",children:"@dataclass\nclass CmdOutputObservation(Observation)\n"})}),"\n",(0,o.jsx)(e.p,{children:"This data class represents the output of a command."})]})}function p(t={}){const{wrapper:e}={...(0,s.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(d,{...t})}):d(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>a,x:()=>c});var o=n(6540);const s={},r=o.createContext(s);function a(t){const e=o.useContext(r);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function c(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:a(t.components),o.createElement(r.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/ab526b7f.611b3414.js b/assets/js/ab526b7f.611b3414.js deleted file mode 100644 index 366d1d3817..0000000000 --- a/assets/js/ab526b7f.611b3414.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1052],{2859:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>g,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var s=t(4848),a=t(8453);const r={sidebar_label:"agent",title:"agenthub.delegator_agent.agent"},i=void 0,o={id:"python/agenthub/delegator_agent/agent",title:"agenthub.delegator_agent.agent",description:"DelegatorAgent Objects",source:"@site/docs/python/agenthub/delegator_agent/agent.md",sourceDirName:"python/agenthub/delegator_agent",slug:"/python/agenthub/delegator_agent/agent",permalink:"/OpenDevin/docs/python/agenthub/delegator_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.delegator_agent.agent"},sidebar:"apiSidebar",previous:{title:"codeact_agent",permalink:"/OpenDevin/docs/python/agenthub/codeact_agent/"},next:{title:"agent",permalink:"/OpenDevin/docs/python/agenthub/micro/agent"}},l={},c=[{value:"DelegatorAgent Objects",id:"delegatoragent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"delegatoragent-objects",children:"DelegatorAgent Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class DelegatorAgent(Agent)\n"})}),"\n",(0,s.jsx)(n.p,{children:"The planner agent utilizes a special prompting strategy to create long term plans for solving problems.\nThe agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step."}),"\n",(0,s.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,s.jsx)(n.p,{children:"Initialize the Delegator Agent with an LLM"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Checks to see if current step is completed, returns AgentFinishAction if True.\nOtherwise, creates a plan prompt and sends to model for inference, returning the result as the next action."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"state (State): The current state given the previous actions and observations"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"AgentFinishAction: If the last state was 'completed', 'verified', or 'abandoned'"}),"\n",(0,s.jsx)(n.li,{children:"Action: The next action to take based on llm response"}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(6540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/abe37dfc.f3cca407.js b/assets/js/abe37dfc.f3cca407.js deleted file mode 100644 index 494be24ace..0000000000 --- a/assets/js/abe37dfc.f3cca407.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8254],{6668:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var r=t(4848),a=t(8453);const s={sidebar_label:"main",title:"main"},i=void 0,o={id:"python/main",title:"main",description:"read\\task\\from\\_file",source:"@site/docs/python/main.md",sourceDirName:"python",slug:"/python/main",permalink:"/OpenDevin/docs/python/main",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"main",title:"main"}},d={},c=[{value:"read_task_from_file",id:"read_task_from_file",level:4},{value:"read_task_from_stdin",id:"read_task_from_stdin",level:4},{value:"main",id:"main",level:4}];function l(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h4,{id:"read_task_from_file",children:"read_task_from_file"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def read_task_from_file(file_path: str) -> str\n"})}),"\n",(0,r.jsx)(n.p,{children:"Read task from the specified file."}),"\n",(0,r.jsx)(n.h4,{id:"read_task_from_stdin",children:"read_task_from_stdin"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def read_task_from_stdin() -> str\n"})}),"\n",(0,r.jsx)(n.p,{children:"Read task from stdin."}),"\n",(0,r.jsx)(n.h4,{id:"main",children:"main"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def main(task_str: str = '')\n"})}),"\n",(0,r.jsx)(n.p,{children:"Main coroutine to run the agent controller with task input flexibility."})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var r=t(6540);const a={},s=r.createContext(a);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b092af1b.6f30c5ec.js b/assets/js/b092af1b.6f30c5ec.js deleted file mode 100644 index 83cdbcfc1e..0000000000 --- a/assets/js/b092af1b.6f30c5ec.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3016],{2235:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>c,contentTitle:()=>o,default:()=>l,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var r=t(4848),s=t(8453);const a={sidebar_label:"parser",title:"agenthub.SWE_agent.parser"},o=void 0,i={id:"python/agenthub/SWE_agent/parser",title:"agenthub.SWE_agent.parser",description:"get\\action\\from\\_string",source:"@site/docs/python/agenthub/SWE_agent/parser.md",sourceDirName:"python/agenthub/SWE_agent",slug:"/python/agenthub/SWE_agent/parser",permalink:"/OpenDevin/docs/python/agenthub/SWE_agent/parser",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"parser",title:"agenthub.SWE_agent.parser"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/docs/python/agenthub/SWE_agent/agent"},next:{title:"codeact_agent",permalink:"/OpenDevin/docs/python/agenthub/codeact_agent/"}},c={},d=[{value:"get_action_from_string",id:"get_action_from_string",level:4},{value:"parse_command",id:"parse_command",level:4}];function p(n){const e={code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...n.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.h4,{id:"get_action_from_string",children:"get_action_from_string"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def get_action_from_string(command_string: str,\n path: str,\n line: int,\n thoughts: str = '') -> Action | None\n"})}),"\n",(0,r.jsx)(e.p,{children:"Parses the command string to find which command the agent wants to run\nConverts the command into a proper Action and returns"}),"\n",(0,r.jsx)(e.h4,{id:"parse_command",children:"parse_command"}),"\n",(0,r.jsx)(e.pre,{children:(0,r.jsx)(e.code,{className:"language-python",children:"def parse_command(input_str: str, path: str, line: int)\n"})}),"\n",(0,r.jsx)(e.p,{children:"Parses a given string and separates the command (enclosed in triple backticks) from any accompanying text."}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"input_str"})," ",(0,r.jsx)(e.em,{children:"str"})," - The input string to be parsed."]}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"tuple"})," - A tuple containing the command and the accompanying text (if any)."]}),"\n"]})]})}function l(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,r.jsx)(e,{...n,children:(0,r.jsx)(p,{...n})}):p(n)}},8453:(n,e,t)=>{t.d(e,{R:()=>o,x:()=>i});var r=t(6540);const s={},a=r.createContext(s);function o(n){const e=r.useContext(a);return r.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function i(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:o(n.components),r.createElement(a.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/b1235c84.217f1a46.js b/assets/js/b1235c84.217f1a46.js deleted file mode 100644 index fd25f59a64..0000000000 --- a/assets/js/b1235c84.217f1a46.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6629],{2722:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var s=n(4848),o=n(8453);const i={sidebar_label:"system",title:"utils.system"},a=void 0,r={id:"python/utils/system",title:"utils.system",description:"find\\available\\tcp\\_port",source:"@site/docs/python/utils/system.md",sourceDirName:"python/utils",slug:"/python/utils/system",permalink:"/OpenDevin/docs/python/utils/system",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"system",title:"utils.system"}},l={},c=[{value:"find_available_tcp_port",id:"find_available_tcp_port",level:4}];function p(t){const e={code:"code",h4:"h4",p:"p",pre:"pre",...(0,o.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.h4,{id:"find_available_tcp_port",children:"find_available_tcp_port"}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-python",children:"def find_available_tcp_port() -> int\n"})}),"\n",(0,s.jsx)(e.p,{children:"Find an available TCP port, return -1 if none available."})]})}function d(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(p,{...t})}):p(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>a,x:()=>r});var s=n(6540);const o={},i=s.createContext(o);function a(t){const e=s.useContext(i);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function r(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:a(t.components),s.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/b7c256d4.7cdd9231.js b/assets/js/b7c256d4.7cdd9231.js new file mode 100644 index 0000000000..272fbcbedf --- /dev/null +++ b/assets/js/b7c256d4.7cdd9231.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[200],{3111:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var i=t(4848),s=t(8453);const o={sidebar_position:6},r="\ud83d\udcda Misc",a={id:"usage/about",title:"\ud83d\udcda Misc",description:"\u2b50\ufe0f Research Strategy",source:"@site/modules/usage/about.md",sourceDirName:"usage",slug:"/usage/about",permalink:"/OpenDevin/modules/usage/about",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"docsSidebar",previous:{title:"Notes for Windows and WSL Users",permalink:"/OpenDevin/modules/usage/troubleshooting/windows"}},l={},c=[{value:"\u2b50\ufe0f Research Strategy",id:"\ufe0f-research-strategy",level:2},{value:"\ud83d\udea7 Default Agent",id:"-default-agent",level:2},{value:"\ud83e\udd1d How to Contribute",id:"-how-to-contribute",level:2},{value:"\ud83e\udd16 Join Our Community",id:"-join-our-community",level:2},{value:"\ud83d\udee0\ufe0f Built With",id:"\ufe0f-built-with",level:2},{value:"\ud83d\udcdc License",id:"-license",level:2}];function d(e){const n={a:"a",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"-misc",children:"\ud83d\udcda Misc"}),"\n",(0,i.jsx)(n.h2,{id:"\ufe0f-research-strategy",children:"\u2b50\ufe0f Research Strategy"}),"\n",(0,i.jsx)(n.p,{children:"Achieving full replication of production-grade applications with LLMs is a complex endeavor. Our strategy involves:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Core Technical Research:"})," Focusing on foundational research to understand and improve the technical aspects of code generation and handling."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Specialist Abilities:"})," Enhancing the effectiveness of core components through data curation, training methods, and more."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Task Planning:"})," Developing capabilities for bug detection, codebase management, and optimization."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Evaluation:"})," Establishing comprehensive evaluation metrics to better understand and improve our models."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"-default-agent",children:"\ud83d\udea7 Default Agent"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Our default Agent is currently the MonologueAgent, which has limited capabilities, but is fairly stable. We're working on other Agent implementations, including ",(0,i.jsx)(n.a,{href:"https://swe-agent.com/",children:"SWE Agent"}),". You can ",(0,i.jsx)(n.a,{href:"./agents",children:"read about our current set of agents here"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"-how-to-contribute",children:"\ud83e\udd1d How to Contribute"}),"\n",(0,i.jsx)(n.p,{children:"OpenDevin 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:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Code Contributions:"})," Help us develop the core functionalities, frontend interface, or sandboxing solutions."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Research and Evaluation:"})," Contribute to our understanding of LLMs in software engineering, participate in evaluating the models, or suggest improvements."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Feedback and Testing:"})," Use the OpenDevin toolset, report bugs, suggest features, or provide feedback on usability."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For details, please check ",(0,i.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/blob/main/CONTRIBUTING.md",children:"this document"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"-join-our-community",children:"\ud83e\udd16 Join Our Community"}),"\n",(0,i.jsx)(n.p,{children:"Now we have both Slack workspace for the collaboration on building OpenDevin and Discord server for discussion about anything related, e.g., this project, LLM, agent, etc."}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://join.slack.com/t/opendevin/shared_invite/zt-2etftj1dd-X1fDL2PYIVpsmJZkqEYANw",children:"Slack workspace"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://discord.gg/mBuDGRzzES",children:"Discord server"})}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["If you would love to contribute, feel free to join our community (note that now there is no need to fill in the ",(0,i.jsx)(n.a,{href:"https://forms.gle/758d5p6Ve8r2nxxq6",children:"form"}),"). Let's simplify software engineering together!"]}),"\n",(0,i.jsxs)(n.p,{children:["\ud83d\udc1a ",(0,i.jsx)(n.strong,{children:"Code less, make more with OpenDevin."})]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://star-history.com/#OpenDevin/OpenDevin&Date",children:(0,i.jsx)(n.img,{src:"https://api.star-history.com/svg?repos=OpenDevin/OpenDevin&type=Date",alt:"Star History Chart"})})}),"\n",(0,i.jsx)(n.h2,{id:"\ufe0f-built-with",children:"\ud83d\udee0\ufe0f Built With"}),"\n",(0,i.jsx)(n.p,{children:"OpenDevin 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:"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/FastAPI-black?style=for-the-badge",alt:"FastAPI"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/uvicorn-black?style=for-the-badge",alt:"uvicorn"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/LiteLLM-black?style=for-the-badge",alt:"LiteLLM"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/Docker-black?style=for-the-badge",alt:"Docker"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/Ruff-black?style=for-the-badge",alt:"Ruff"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/MyPy-black?style=for-the-badge",alt:"MyPy"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/LlamaIndex-black?style=for-the-badge",alt:"LlamaIndex"})," ",(0,i.jsx)(n.img,{src:"https://img.shields.io/badge/React-black?style=for-the-badge",alt:"React"})]}),"\n",(0,i.jsx)(n.p,{children:"Please 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 OpenDevin."}),"\n",(0,i.jsx)(n.h2,{id:"-license",children:"\ud83d\udcdc License"}),"\n",(0,i.jsxs)(n.p,{children:["Distributed under the MIT License. See ",(0,i.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/blob/main/LICENSE",children:"our license"})," for more information."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(6540);const s={},o=i.createContext(s);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ba86bea2.62054048.js b/assets/js/ba86bea2.62054048.js deleted file mode 100644 index 7d9120aa34..0000000000 --- a/assets/js/ba86bea2.62054048.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5412],{9502:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>r,toc:()=>d});var s=t(4848),i=t(8453);const o={sidebar_label:"listen",title:"opendevin.server.listen"},l=void 0,r={id:"python/opendevin/server/listen",title:"opendevin.server.listen",description:"get\\litellm\\models",source:"@site/docs/python/opendevin/server/listen.md",sourceDirName:"python/opendevin/server",slug:"/python/opendevin/server/listen",permalink:"/OpenDevin/docs/python/opendevin/server/listen",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"listen",title:"opendevin.server.listen"},sidebar:"apiSidebar",previous:{title:"session",permalink:"/OpenDevin/docs/python/opendevin/server/session/"},next:{title:"system",permalink:"/OpenDevin/docs/python/opendevin/utils/system"}},a={},d=[{value:"get_litellm_models",id:"get_litellm_models",level:4},{value:"get_agents",id:"get_agents",level:4},{value:"get_token",id:"get_token",level:4}];function c(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h4,{id:"get_litellm_models",children:"get_litellm_models"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@app.get('/api/litellm-models')\nasync def get_litellm_models()\n"})}),"\n",(0,s.jsx)(n.p,{children:"Get all models supported by LiteLLM."}),"\n",(0,s.jsx)(n.h4,{id:"get_agents",children:"get_agents"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@app.get('/api/agents')\nasync def get_agents()\n"})}),"\n",(0,s.jsx)(n.p,{children:"Get all agents supported by LiteLLM."}),"\n",(0,s.jsx)(n.h4,{id:"get_token",children:"get_token"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@app.get('/api/auth')\nasync def get_token(\n credentials: HTTPAuthorizationCredentials = Depends(security_scheme))\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate a JWT for authentication when starting a WebSocket connection. This endpoint checks if valid credentials\nare provided and uses them to get a session ID. If no valid credentials are provided, it generates a new session ID."})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>r});var s=t(6540);const i={},o=s.createContext(i);function l(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bb03d9af.96a7ba60.js b/assets/js/bb03d9af.96a7ba60.js deleted file mode 100644 index fd4eeace11..0000000000 --- a/assets/js/bb03d9af.96a7ba60.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9832],{8820:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>i,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>c});var o=l(4848),t=l(8453);const s={},a="Local LLM with Ollama",r={id:"usage/llms/localLLMs",title:"Local LLM with Ollama",description:"Ensure that you have the Ollama server up and running.",source:"@site/docs/usage/llms/localLLMs.md",sourceDirName:"usage/llms",slug:"/usage/llms/localLLMs",permalink:"/OpenDevin/docs/usage/llms/localLLMs",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Google Gemini/Vertex LLM",permalink:"/OpenDevin/docs/usage/llms/googleLLMs"},next:{title:"\ud83e\udde0 Agents and Capabilities",permalink:"/OpenDevin/docs/usage/agents"}},i={},c=[{value:"Pull Models",id:"pull-models",level:2},{value:"Start OpenDevin",id:"start-opendevin",level:2},{value:"Docker",id:"docker",level:3},{value:"Build from Source",id:"build-from-source",level:3},{value:"Select your Model",id:"select-your-model",level:2},{value:"Configuring the ollama service (WSL)",id:"configuring-the-ollama-service-wsl",level:2},{value:"Fixing it",id:"fixing-it",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"local-llm-with-ollama",children:"Local LLM with Ollama"}),"\n",(0,o.jsxs)(n.p,{children:["Ensure that you have the Ollama server up and running.\nFor detailed startup instructions, refer to the ",(0,o.jsx)(n.a,{href:"https://github.com/ollama/ollama",children:"here"})]}),"\n",(0,o.jsxs)(n.p,{children:["This guide assumes you've started ollama with ",(0,o.jsx)(n.code,{children:"ollama serve"}),". If you're running ollama differently (e.g. inside docker), the instructions might need to be modified. Please note that if you're running wsl the default ollama configuration blocks requests from docker containers. See ",(0,o.jsx)(n.a,{href:"#4-configuring-the-ollama-service-wsl",children:"here"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"pull-models",children:"Pull Models"}),"\n",(0,o.jsxs)(n.p,{children:["Ollama model names can be found ",(0,o.jsx)(n.a,{href:"https://ollama.com/library",children:"here"}),". For a small example, you can use\nthe ",(0,o.jsx)(n.code,{children:"codellama:7b"})," model. Bigger models will generally perform better."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"ollama pull codellama:7b\n"})}),"\n",(0,o.jsx)(n.p,{children:"you can check which models you have downloaded like this:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"~$ ollama list\nNAME ID SIZE MODIFIED\ncodellama:7b 8fdf8f752f6e 3.8 GB 6 weeks ago\nmistral:7b-instruct-v0.2-q4_K_M eb14864c7427 4.4 GB 2 weeks ago\nstarcoder2:latest f67ae0f64584 1.7 GB 19 hours ago\n"})}),"\n",(0,o.jsx)(n.h2,{id:"start-opendevin",children:"Start OpenDevin"}),"\n",(0,o.jsx)(n.h3,{id:"docker",children:"Docker"}),"\n",(0,o.jsxs)(n.p,{children:["Use the instructions ",(0,o.jsx)(n.a,{href:"../intro",children:"here"})," to start OpenDevin using Docker.\nBut when running ",(0,o.jsx)(n.code,{children:"docker run"}),", you'll need to add a few more arguments:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'--add-host host.docker.internal=host-gateway \\\n-e LLM_API_KEY="ollama" \\\n-e LLM_BASE_URL="http://host.docker.internal:11434" \\\n'})}),"\n",(0,o.jsx)(n.p,{children:"For example:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'# The directory you want OpenDevin to modify. MUST be an absolute path!\nexport WORKSPACE_BASE=$(pwd)/workspace\n\ndocker run \\\n --add-host host.docker.internal=host-gateway \\\n -e LLM_API_KEY="ollama" \\\n -e LLM_BASE_URL="http://host.docker.internal:11434" \\\n -e WORKSPACE_MOUNT_PATH=$WORKSPACE_BASE \\\n -v $WORKSPACE_BASE:/opt/workspace_base \\\n -v /var/run/docker.sock:/var/run/docker.sock \\\n -p 3000:3000 \\\n ghcr.io/opendevin/opendevin:main\n'})}),"\n",(0,o.jsxs)(n.p,{children:["You should now be able to connect to ",(0,o.jsx)(n.code,{children:"http://localhost:3000/"})]}),"\n",(0,o.jsx)(n.h3,{id:"build-from-source",children:"Build from Source"}),"\n",(0,o.jsxs)(n.p,{children:["Use the instructions in ",(0,o.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/blob/main/Development.md",children:"Development.md"})," to build OpenDevin.\nMake sure ",(0,o.jsx)(n.code,{children:"config.toml"})," is there by running ",(0,o.jsx)(n.code,{children:"make setup-config"})," which will create one for you. In ",(0,o.jsx)(n.code,{children:"config.toml"}),", enter the followings:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'LLM_MODEL="ollama/codellama:7b"\nLLM_API_KEY="ollama"\nLLM_EMBEDDING_MODEL="local"\nLLM_BASE_URL="http://localhost:11434"\nWORKSPACE_BASE="./workspace"\nWORKSPACE_DIR="$(pwd)/workspace"\n'})}),"\n",(0,o.jsxs)(n.p,{children:["Replace ",(0,o.jsx)(n.code,{children:"LLM_MODEL"})," of your choice if you need to."]}),"\n",(0,o.jsxs)(n.p,{children:["Done! Now you can start Devin by: ",(0,o.jsx)(n.code,{children:"make run"})," without Docker. You now should be able to connect to ",(0,o.jsx)(n.code,{children:"http://localhost:3000/"})]}),"\n",(0,o.jsx)(n.h2,{id:"select-your-model",children:"Select your Model"}),"\n",(0,o.jsxs)(n.p,{children:["In the OpenDevin UI, click on the Settings wheel in the bottom-left corner.\nThen in the ",(0,o.jsx)(n.code,{children:"Model"})," input, enter ",(0,o.jsx)(n.code,{children:"ollama/codellama:7b"}),", or the name of the model you pulled earlier.\nIf it doesn\u2019t show up in a dropdown, that\u2019s fine, just type it in. Click Save when you\u2019re done."]}),"\n",(0,o.jsx)(n.p,{children:"And now you're ready to go!"}),"\n",(0,o.jsx)(n.h2,{id:"configuring-the-ollama-service-wsl",children:"Configuring the ollama service (WSL)"}),"\n",(0,o.jsx)(n.p,{children:"The default configuration for ollama in wsl only serves localhost. This means you can't reach it from a docker container. eg. it wont work with OpenDevin. First let's test that ollama is running correctly."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'ollama list # get list of installed models\ncurl http://localhost:11434/api/generate -d \'{"model":"[NAME]","prompt":"hi"}\'\n#ex. curl http://localhost:11434/api/generate -d \'{"model":"codellama:7b","prompt":"hi"}\'\n#ex. curl http://localhost:11434/api/generate -d \'{"model":"codellama","prompt":"hi"}\' #the tag is optional if there is only one\n'})}),"\n",(0,o.jsx)(n.p,{children:'Once that is done test that it allows "outside" requests, like those from inside a docker container.'}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'docker ps # get list of running docker containers, for most accurate test choose the open devin sandbox container.\ndocker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d \'{"model":"[NAME]","prompt":"hi"}\'\n#ex. docker exec cd9cc82f7a11 curl http://host.docker.internal:11434/api/generate -d \'{"model":"codellama","prompt":"hi"}\'\n'})}),"\n",(0,o.jsx)(n.h2,{id:"fixing-it",children:"Fixing it"}),"\n",(0,o.jsx)(n.p,{children:"Now let's make it work, edit /etc/systemd/system/ollama.service with sudo priviledges. (Path may vary depending on linux flavor)"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sudo vi /etc/systemd/system/ollama.service\n"})}),"\n",(0,o.jsx)(n.p,{children:"or"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sudo nano /etc/systemd/system/ollama.service\n"})}),"\n",(0,o.jsx)(n.p,{children:"In the [Service] bracket add these lines"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'Environment="OLLAMA_HOST=0.0.0.0:11434"\nEnvironment="OLLAMA_ORIGINS=*"\n'})}),"\n",(0,o.jsx)(n.p,{children:"Then save, reload the configuration and restart the service."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:"sudo systemctl daemon-reload\nsudo systemctl restart ollama\n"})}),"\n",(0,o.jsx)(n.p,{children:"Finally test that ollama is accessible from within the container"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",children:'ollama list # get list of installed models\ndocker ps # get list of running docker containers, for most accurate test choose the open devin sandbox container.\ndocker exec [CONTAINER ID] curl http://host.docker.internal:11434/api/generate -d \'{"model":"[NAME]","prompt":"hi"}\'\n'})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,l)=>{l.d(n,{R:()=>a,x:()=>r});var o=l(6540);const t={},s=o.createContext(t);function a(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c0bb861a.b4d42153.js b/assets/js/c0bb861a.b4d42153.js new file mode 100644 index 0000000000..a95308fa4a --- /dev/null +++ b/assets/js/c0bb861a.b4d42153.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1730],{2060:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>c,contentTitle:()=>t,default:()=>g,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var i=n(4848),l=n(8453);const s={},t="Google Gemini/Vertex LLM",r={id:"usage/llms/googleLLMs",title:"Google Gemini/Vertex LLM",description:"Completion",source:"@site/modules/usage/llms/googleLLMs.md",sourceDirName:"usage/llms",slug:"/usage/llms/googleLLMs",permalink:"/OpenDevin/modules/usage/llms/googleLLMs",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Azure OpenAI LLM",permalink:"/OpenDevin/modules/usage/llms/azureLLMs"},next:{title:"Local LLM with Ollama",permalink:"/OpenDevin/modules/usage/llms/localLLMs"}},c={},d=[{value:"Completion",id:"completion",level:2},{value:"Gemini - Google AI Studio Configs",id:"gemini---google-ai-studio-configs",level:3},{value:"Vertex AI - Google Cloud Platform Configs",id:"vertex-ai---google-cloud-platform-configs",level:3}];function u(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.h1,{id:"google-geminivertex-llm",children:"Google Gemini/Vertex LLM"}),"\n",(0,i.jsx)(o.h2,{id:"completion",children:"Completion"}),"\n",(0,i.jsx)(o.p,{children:"OpenDevin uses LiteLLM for completion calls. The following resources are relevant for using OpenDevin with Google's LLMs"}),"\n",(0,i.jsxs)(o.ul,{children:["\n",(0,i.jsx)(o.li,{children:(0,i.jsx)(o.a,{href:"https://docs.litellm.ai/docs/providers/gemini",children:"Gemini - Google AI Studio"})}),"\n",(0,i.jsx)(o.li,{children:(0,i.jsx)(o.a,{href:"https://docs.litellm.ai/docs/providers/vertex",children:"VertexAI - Google Cloud Platform"})}),"\n"]}),"\n",(0,i.jsx)(o.h3,{id:"gemini---google-ai-studio-configs",children:"Gemini - Google AI Studio Configs"}),"\n",(0,i.jsxs)(o.p,{children:["To use Gemini through Google AI Studio when running the OpenDevin Docker image, you'll need to set the following environment variables using ",(0,i.jsx)(o.code,{children:"-e"}),":"]}),"\n",(0,i.jsx)(o.pre,{children:(0,i.jsx)(o.code,{children:'GEMINI_API_KEY=""\nLLM_MODEL="gemini/gemini-1.5-pro"\n'})}),"\n",(0,i.jsx)(o.h3,{id:"vertex-ai---google-cloud-platform-configs",children:"Vertex AI - Google Cloud Platform Configs"}),"\n",(0,i.jsxs)(o.p,{children:["To use Vertex AI through Google Cloud Platform when running the OpenDevin Docker image, you'll need to set the following environment variables using ",(0,i.jsx)(o.code,{children:"-e"}),":"]}),"\n",(0,i.jsx)(o.pre,{children:(0,i.jsx)(o.code,{children:'GOOGLE_APPLICATION_CREDENTIALS=""\nVERTEXAI_PROJECT=""\nVERTEXAI_LOCATION=""\nLLM_MODEL="vertex_ai/"\n'})})]})}function g(e={}){const{wrapper:o}={...(0,l.R)(),...e.components};return o?(0,i.jsx)(o,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},8453:(e,o,n)=>{n.d(o,{R:()=>t,x:()=>r});var i=n(6540);const l={},s=i.createContext(l);function t(e){const o=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),i.createElement(s.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c23d89ad.fec65910.js b/assets/js/c23d89ad.fec65910.js new file mode 100644 index 0000000000..dfd4e28273 --- /dev/null +++ b/assets/js/c23d89ad.fec65910.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1707],{1788:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>o,toc:()=>c});var i=t(4848),s=t(8453);const l={sidebar_label:"action",title:"opendevin.schema.action"},a=void 0,o={id:"python/opendevin/schema/action",title:"opendevin.schema.action",description:"ActionTypeSchema Objects",source:"@site/modules/python/opendevin/schema/action.md",sourceDirName:"python/opendevin/schema",slug:"/python/opendevin/schema/action",permalink:"/OpenDevin/modules/python/opendevin/schema/action",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"action",title:"opendevin.schema.action"},sidebar:"apiSidebar",previous:{title:"requirement",permalink:"/OpenDevin/modules/python/opendevin/sandbox/plugins/requirement"},next:{title:"observation",permalink:"/OpenDevin/modules/python/opendevin/schema/observation"}},d={},c=[{value:"ActionTypeSchema Objects",id:"actiontypeschema-objects",level:2},{value:"INIT",id:"init",level:4},{value:"START",id:"start",level:4},{value:"READ",id:"read",level:4},{value:"WRITE",id:"write",level:4},{value:"RUN",id:"run",level:4},{value:"KILL",id:"kill",level:4},{value:"BROWSE",id:"browse",level:4},{value:"RECALL",id:"recall",level:4},{value:"THINK",id:"think",level:4},{value:"DELEGATE",id:"delegate",level:4},{value:"FINISH",id:"finish",level:4},{value:"PAUSE",id:"pause",level:4},{value:"RESUME",id:"resume",level:4},{value:"STOP",id:"stop",level:4},{value:"PUSH",id:"push",level:4},{value:"SEND_PR",id:"send_pr",level:4}];function r(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"actiontypeschema-objects",children:"ActionTypeSchema Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class ActionTypeSchema(BaseModel)\n"})}),"\n",(0,i.jsx)(n.h4,{id:"init",children:"INIT"}),"\n",(0,i.jsx)(n.p,{children:"Initializes the agent. Only sent by client."}),"\n",(0,i.jsx)(n.h4,{id:"start",children:"START"}),"\n",(0,i.jsx)(n.p,{children:"Starts a new development task. Only sent by the client."}),"\n",(0,i.jsx)(n.h4,{id:"read",children:"READ"}),"\n",(0,i.jsx)(n.p,{children:"Reads the content of a file."}),"\n",(0,i.jsx)(n.h4,{id:"write",children:"WRITE"}),"\n",(0,i.jsx)(n.p,{children:"Writes the content to a file."}),"\n",(0,i.jsx)(n.h4,{id:"run",children:"RUN"}),"\n",(0,i.jsx)(n.p,{children:"Runs a command."}),"\n",(0,i.jsx)(n.h4,{id:"kill",children:"KILL"}),"\n",(0,i.jsx)(n.p,{children:"Kills a background command."}),"\n",(0,i.jsx)(n.h4,{id:"browse",children:"BROWSE"}),"\n",(0,i.jsx)(n.p,{children:"Opens a web page."}),"\n",(0,i.jsx)(n.h4,{id:"recall",children:"RECALL"}),"\n",(0,i.jsx)(n.p,{children:"Searches long-term memory"}),"\n",(0,i.jsx)(n.h4,{id:"think",children:"THINK"}),"\n",(0,i.jsx)(n.p,{children:"Allows the agent to make a plan, set a goal, or record thoughts"}),"\n",(0,i.jsx)(n.h4,{id:"delegate",children:"DELEGATE"}),"\n",(0,i.jsx)(n.p,{children:"Delegates a task to another agent."}),"\n",(0,i.jsx)(n.h4,{id:"finish",children:"FINISH"}),"\n",(0,i.jsx)(n.p,{children:"If you're absolutely certain that you've completed your task and have tested your work,\nuse the finish action to stop working."}),"\n",(0,i.jsx)(n.h4,{id:"pause",children:"PAUSE"}),"\n",(0,i.jsx)(n.p,{children:"Pauses the task."}),"\n",(0,i.jsx)(n.h4,{id:"resume",children:"RESUME"}),"\n",(0,i.jsx)(n.p,{children:"Resumes the task."}),"\n",(0,i.jsx)(n.h4,{id:"stop",children:"STOP"}),"\n",(0,i.jsx)(n.p,{children:"Stops the task. Must send a start action to restart a new task."}),"\n",(0,i.jsx)(n.h4,{id:"push",children:"PUSH"}),"\n",(0,i.jsx)(n.p,{children:"Push a branch to github."}),"\n",(0,i.jsx)(n.h4,{id:"send_pr",children:"SEND_PR"}),"\n",(0,i.jsx)(n.p,{children:"Send a PR to github."})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(r,{...e})}):r(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var i=t(6540);const s={},l=i.createContext(s);function a(e){const n=i.useContext(l);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c49b4ca3.fe8a353f.js b/assets/js/c49b4ca3.fe8a353f.js deleted file mode 100644 index 09ac18ff27..0000000000 --- a/assets/js/c49b4ca3.fe8a353f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6100],{6904:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>o,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var n=s(4848),a=s(8453);const i={sidebar_label:"task",title:"schema.task"},c=void 0,r={id:"python/schema/task",title:"schema.task",description:"TaskState Objects",source:"@site/docs/python/schema/task.md",sourceDirName:"python/schema",slug:"/python/schema/task",permalink:"/OpenDevin/docs/python/schema/task",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"task",title:"schema.task"}},l={},d=[{value:"TaskState Objects",id:"taskstate-objects",level:2},{value:"INIT",id:"init",level:4},{value:"RUNNING",id:"running",level:4},{value:"PAUSED",id:"paused",level:4},{value:"STOPPED",id:"stopped",level:4},{value:"FINISHED",id:"finished",level:4},{value:"ERROR",id:"error",level:4},{value:"TaskStateAction Objects",id:"taskstateaction-objects",level:2},{value:"START",id:"start",level:4},{value:"PAUSE",id:"pause",level:4},{value:"RESUME",id:"resume",level:4},{value:"STOP",id:"stop",level:4}];function h(e){const t={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"taskstate-objects",children:"TaskState Objects"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-python",children:"class TaskState(str, Enum)\n"})}),"\n",(0,n.jsx)(t.h4,{id:"init",children:"INIT"}),"\n",(0,n.jsx)(t.p,{children:"Initial state of the task."}),"\n",(0,n.jsx)(t.h4,{id:"running",children:"RUNNING"}),"\n",(0,n.jsx)(t.p,{children:"The task is running."}),"\n",(0,n.jsx)(t.h4,{id:"paused",children:"PAUSED"}),"\n",(0,n.jsx)(t.p,{children:"The task is paused."}),"\n",(0,n.jsx)(t.h4,{id:"stopped",children:"STOPPED"}),"\n",(0,n.jsx)(t.p,{children:"The task is stopped."}),"\n",(0,n.jsx)(t.h4,{id:"finished",children:"FINISHED"}),"\n",(0,n.jsx)(t.p,{children:"The task is finished."}),"\n",(0,n.jsx)(t.h4,{id:"error",children:"ERROR"}),"\n",(0,n.jsx)(t.p,{children:"An error occurred during the task."}),"\n",(0,n.jsx)(t.h2,{id:"taskstateaction-objects",children:"TaskStateAction Objects"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-python",children:"class TaskStateAction(str, Enum)\n"})}),"\n",(0,n.jsx)(t.h4,{id:"start",children:"START"}),"\n",(0,n.jsx)(t.p,{children:"Starts the task."}),"\n",(0,n.jsx)(t.h4,{id:"pause",children:"PAUSE"}),"\n",(0,n.jsx)(t.p,{children:"Pauses the task."}),"\n",(0,n.jsx)(t.h4,{id:"resume",children:"RESUME"}),"\n",(0,n.jsx)(t.p,{children:"Resumes the task."}),"\n",(0,n.jsx)(t.h4,{id:"stop",children:"STOP"}),"\n",(0,n.jsx)(t.p,{children:"Stops the task."})]})}function o(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>c,x:()=>r});var n=s(6540);const a={},i=n.createContext(a);function c(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c4b1be84.01802cc7.js b/assets/js/c4b1be84.01802cc7.js new file mode 100644 index 0000000000..f081f40278 --- /dev/null +++ b/assets/js/c4b1be84.01802cc7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5530],{9097:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>t,metadata:()=>l,toc:()=>d});var s=o(4848),r=o(8453);const t={sidebar_position:5},i="\ud83d\udea7 Troubleshooting",l={id:"usage/troubleshooting/troubleshooting",title:"\ud83d\udea7 Troubleshooting",description:"There are some error messages that get reported over and over by users.",source:"@site/modules/usage/troubleshooting/troubleshooting.md",sourceDirName:"usage/troubleshooting",slug:"/usage/troubleshooting/",permalink:"/OpenDevin/modules/usage/troubleshooting/",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"docsSidebar",previous:{title:"\ud83c\udfdb\ufe0f System Architecture Overview",permalink:"/OpenDevin/modules/usage/architecture"},next:{title:"Notes for Windows and WSL Users",permalink:"/OpenDevin/modules/usage/troubleshooting/windows"}},c={},d=[{value:"Unable to connect to docker",id:"unable-to-connect-to-docker",level:2},{value:"Symptoms",id:"symptoms",level:3},{value:"Details",id:"details",level:3},{value:"Workarounds",id:"workarounds",level:3},{value:"Unable to connect to SSH box",id:"unable-to-connect-to-ssh-box",level:2},{value:"Symptoms",id:"symptoms-1",level:3},{value:"Details",id:"details-1",level:3},{value:"Workarounds",id:"workarounds-1",level:3},{value:"Unable to connect to LLM",id:"unable-to-connect-to-llm",level:2},{value:"Symptoms",id:"symptoms-2",level:3},{value:"Details",id:"details-2",level:3},{value:"Workarounds",id:"workarounds-2",level:3}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h1,{id:"-troubleshooting",children:"\ud83d\udea7 Troubleshooting"}),"\n",(0,s.jsx)(n.p,{children:"There are some error messages that get reported over and over by users.\nWe'll try and make the install process easier, and to make these error messages\nbetter in the future. But for now, you can look for your error message below,\nand see if there are any workaround."}),"\n",(0,s.jsxs)(n.p,{children:["For each of these error messages ",(0,s.jsx)(n.strong,{children:"there is an existing issue"}),". Please do not\nopen an new issue--just comment there."]}),"\n",(0,s.jsx)(n.p,{children:"If you find more information or a workaround for one of these issues, please\nopen a PR to add details to this file."}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["If you're running on Windows and having trouble, check out our ",(0,s.jsx)(n.a,{href:"troubleshooting/windows",children:"guide for Windows users"})]})}),"\n",(0,s.jsx)(n.h2,{id:"unable-to-connect-to-docker",children:(0,s.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/issues/1226",children:"Unable to connect to docker"})}),"\n",(0,s.jsx)(n.h3,{id:"symptoms",children:"Symptoms"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"Error creating controller. Please check Docker is running using docker ps\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))\n"})}),"\n",(0,s.jsx)(n.h3,{id:"details",children:"Details"}),"\n",(0,s.jsx)(n.p,{children:"OpenDevin uses a docker container to do its work safely, without potentially breaking your machine."}),"\n",(0,s.jsx)(n.h3,{id:"workarounds",children:"Workarounds"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Run ",(0,s.jsx)(n.code,{children:"docker ps"})," to ensure that docker is running"]}),"\n",(0,s.jsxs)(n.li,{children:["Make sure you don't need ",(0,s.jsx)(n.code,{children:"sudo"})," to run docker ",(0,s.jsx)(n.a,{href:"https://www.baeldung.com/linux/docker-run-without-sudo",children:"see here"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"unable-to-connect-to-ssh-box",children:(0,s.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/issues/1156",children:"Unable to connect to SSH box"})}),"\n",(0,s.jsx)(n.h3,{id:"symptoms-1",children:"Symptoms"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"self.shell = DockerSSHBox(\n...\npexpect.pxssh.ExceptionPxssh: Could not establish connection to host\n"})}),"\n",(0,s.jsx)(n.h3,{id:"details-1",children:"Details"}),"\n",(0,s.jsx)(n.p,{children:"By default, OpenDevin connects to a running container using SSH. On some machines,\nespecially Windows, this seems to fail."}),"\n",(0,s.jsx)(n.h3,{id:"workarounds-1",children:"Workarounds"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Restart your computer (sometimes works?)"}),"\n",(0,s.jsx)(n.li,{children:"Be sure to have the latest versions of WSL and Docker"}),"\n",(0,s.jsxs)(n.li,{children:["Try ",(0,s.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/issues/1156#issuecomment-2064549427",children:"this reinstallation guide"})]}),"\n",(0,s.jsxs)(n.li,{children:["Set ",(0,s.jsx)(n.code,{children:"-e SANDBOX_TYPE=exec"})," to switch to the ExecBox docker container"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"unable-to-connect-to-llm",children:(0,s.jsx)(n.a,{href:"https://github.com/OpenDevin/OpenDevin/issues/1208",children:"Unable to connect to LLM"})}),"\n",(0,s.jsx)(n.h3,{id:"symptoms-2",children:"Symptoms"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:" File \"/app/.venv/lib/python3.12/site-packages/openai/_exceptions.py\", line 81, in __init__\n super().__init__(message, response.request, body=body)\n ^^^^^^^^^^^^^^^^\nAttributeError: 'NoneType' object has no attribute 'request'\n"})}),"\n",(0,s.jsx)(n.h3,{id:"details-2",children:"Details"}),"\n",(0,s.jsxs)(n.p,{children:["This usually happens with local LLM setups, when OpenDevin can't connect to the LLM server.\nSee our guide for ",(0,s.jsx)(n.a,{href:"llms/localLLMs",children:"local LLMs"})," for more information."]}),"\n",(0,s.jsx)(n.h3,{id:"workarounds-2",children:"Workarounds"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Check your ",(0,s.jsx)(n.code,{children:"LLM_BASE_URL"})]}),"\n",(0,s.jsx)(n.li,{children:"Check that ollama is running OK"}),"\n",(0,s.jsxs)(n.li,{children:["Make sure you're using ",(0,s.jsx)(n.code,{children:"--add-host host.docker.internal=host-gateway"})," when running in docker"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>l});var s=o(6540);const r={},t=s.createContext(r);function i(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c5a70b49.d49471ce.js b/assets/js/c5a70b49.d49471ce.js deleted file mode 100644 index e7a84082d8..0000000000 --- a/assets/js/c5a70b49.d49471ce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2940],{9332:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>i,contentTitle:()=>a,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>u});var s=o(4848),n=o(8453);const r={sidebar_label:"browse",title:"observation.browse"},a=void 0,c={id:"python/observation/browse",title:"observation.browse",description:"BrowserOutputObservation Objects",source:"@site/docs/python/observation/browse.md",sourceDirName:"python/observation",slug:"/python/observation/browse",permalink:"/OpenDevin/docs/python/observation/browse",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"browse",title:"observation.browse"}},i={},u=[{value:"BrowserOutputObservation Objects",id:"browseroutputobservation-objects",level:2}];function b(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"browseroutputobservation-objects",children:"BrowserOutputObservation Objects"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass BrowserOutputObservation(Observation)\n"})}),"\n",(0,s.jsx)(t.p,{children:"This data class represents the output of a browser."})]})}function p(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(b,{...e})}):b(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>a,x:()=>c});var s=o(6540);const n={},r=s.createContext(n);function a(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c5bd584a.443c0430.js b/assets/js/c5bd584a.443c0430.js deleted file mode 100644 index 39d0868d62..0000000000 --- a/assets/js/c5bd584a.443c0430.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[711],{6148:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>r});var i=t(4848),s=t(8453);const a={sidebar_label:"action",title:"opendevin.schema.action"},l=void 0,o={id:"python/opendevin/schema/action",title:"opendevin.schema.action",description:"ActionTypeSchema Objects",source:"@site/docs/python/opendevin/schema/action.md",sourceDirName:"python/opendevin/schema",slug:"/python/opendevin/schema/action",permalink:"/OpenDevin/docs/python/opendevin/schema/action",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"action",title:"opendevin.schema.action"},sidebar:"apiSidebar",previous:{title:"requirement",permalink:"/OpenDevin/docs/python/opendevin/sandbox/plugins/requirement"},next:{title:"observation",permalink:"/OpenDevin/docs/python/opendevin/schema/observation"}},c={},r=[{value:"ActionTypeSchema Objects",id:"actiontypeschema-objects",level:2},{value:"INIT",id:"init",level:4},{value:"START",id:"start",level:4},{value:"READ",id:"read",level:4},{value:"WRITE",id:"write",level:4},{value:"RUN",id:"run",level:4},{value:"KILL",id:"kill",level:4},{value:"BROWSE",id:"browse",level:4},{value:"RECALL",id:"recall",level:4},{value:"THINK",id:"think",level:4},{value:"DELEGATE",id:"delegate",level:4},{value:"FINISH",id:"finish",level:4},{value:"PAUSE",id:"pause",level:4},{value:"RESUME",id:"resume",level:4},{value:"STOP",id:"stop",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"actiontypeschema-objects",children:"ActionTypeSchema Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class ActionTypeSchema(BaseModel)\n"})}),"\n",(0,i.jsx)(n.h4,{id:"init",children:"INIT"}),"\n",(0,i.jsx)(n.p,{children:"Initializes the agent. Only sent by client."}),"\n",(0,i.jsx)(n.h4,{id:"start",children:"START"}),"\n",(0,i.jsx)(n.p,{children:"Starts a new development task. Only sent by the client."}),"\n",(0,i.jsx)(n.h4,{id:"read",children:"READ"}),"\n",(0,i.jsx)(n.p,{children:"Reads the content of a file."}),"\n",(0,i.jsx)(n.h4,{id:"write",children:"WRITE"}),"\n",(0,i.jsx)(n.p,{children:"Writes the content to a file."}),"\n",(0,i.jsx)(n.h4,{id:"run",children:"RUN"}),"\n",(0,i.jsx)(n.p,{children:"Runs a command."}),"\n",(0,i.jsx)(n.h4,{id:"kill",children:"KILL"}),"\n",(0,i.jsx)(n.p,{children:"Kills a background command."}),"\n",(0,i.jsx)(n.h4,{id:"browse",children:"BROWSE"}),"\n",(0,i.jsx)(n.p,{children:"Opens a web page."}),"\n",(0,i.jsx)(n.h4,{id:"recall",children:"RECALL"}),"\n",(0,i.jsx)(n.p,{children:"Searches long-term memory"}),"\n",(0,i.jsx)(n.h4,{id:"think",children:"THINK"}),"\n",(0,i.jsx)(n.p,{children:"Allows the agent to make a plan, set a goal, or record thoughts"}),"\n",(0,i.jsx)(n.h4,{id:"delegate",children:"DELEGATE"}),"\n",(0,i.jsx)(n.p,{children:"Delegates a task to another agent."}),"\n",(0,i.jsx)(n.h4,{id:"finish",children:"FINISH"}),"\n",(0,i.jsx)(n.p,{children:"If you're absolutely certain that you've completed your task and have tested your work,\nuse the finish action to stop working."}),"\n",(0,i.jsx)(n.h4,{id:"pause",children:"PAUSE"}),"\n",(0,i.jsx)(n.p,{children:"Pauses the task."}),"\n",(0,i.jsx)(n.h4,{id:"resume",children:"RESUME"}),"\n",(0,i.jsx)(n.p,{children:"Resumes the task."}),"\n",(0,i.jsx)(n.h4,{id:"stop",children:"STOP"}),"\n",(0,i.jsx)(n.p,{children:"Stops the task. Must send a start action to restart a new task."})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>o});var i=t(6540);const s={},a=i.createContext(s);function l(e){const n=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c6ecd103.b52e72fc.js b/assets/js/c6ecd103.b52e72fc.js new file mode 100644 index 0000000000..a7ce7ec5f0 --- /dev/null +++ b/assets/js/c6ecd103.b52e72fc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8750],{2464:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>c,metadata:()=>a,toc:()=>r});var o=t(4848),i=t(8453);const c={sidebar_label:"base",title:"opendevin.action.base"},s=void 0,a={id:"python/opendevin/action/base",title:"opendevin.action.base",description:"NullAction Objects",source:"@site/modules/python/opendevin/action/base.md",sourceDirName:"python/opendevin/action",slug:"/python/opendevin/action/base",permalink:"/OpenDevin/modules/python/opendevin/action/base",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"base",title:"opendevin.action.base"},sidebar:"apiSidebar",previous:{title:"action",permalink:"/OpenDevin/modules/python/opendevin/action/__init__"},next:{title:"fileop",permalink:"/OpenDevin/modules/python/opendevin/action/fileop"}},l={},r=[{value:"NullAction Objects",id:"nullaction-objects",level:2}];function p(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"nullaction-objects",children:"NullAction Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass NullAction(NotExecutableAction)\n"})}),"\n",(0,o.jsx)(n.p,{children:"An action that does nothing."})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>a});var o=t(6540);const i={},c=o.createContext(i);function s(e){const n=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c78811ab.e7c1c0cc.js b/assets/js/c78811ab.e7c1c0cc.js deleted file mode 100644 index 3c9f24aaab..0000000000 --- a/assets/js/c78811ab.e7c1c0cc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[170],{6244:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>g,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var r=t(4848),s=t(8453);const a={sidebar_label:"manager",title:"server.agent.manager"},c=void 0,i={id:"python/server/agent/manager",title:"server.agent.manager",description:"AgentManager Objects",source:"@site/docs/python/server/agent/manager.md",sourceDirName:"python/server/agent",slug:"/python/server/agent/manager",permalink:"/OpenDevin/docs/python/server/agent/manager",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"manager",title:"server.agent.manager"}},o={},d=[{value:"AgentManager Objects",id:"agentmanager-objects",level:2},{value:"register_agent",id:"register_agent",level:4},{value:"dispatch",id:"dispatch",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"agentmanager-objects",children:"AgentManager Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class AgentManager()\n"})}),"\n",(0,r.jsx)(n.h4,{id:"register_agent",children:"register_agent"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def register_agent(sid: str)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Registers a new agent."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"sid"})," - The session ID of the agent."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"dispatch",children:"dispatch"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def dispatch(sid: str, action: str | None, data: dict)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Dispatches actions to the agent from the client."})]})}function g(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var r=t(6540);const s={},a=r.createContext(s);function c(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ccdb0683.4ea44ee6.js b/assets/js/ccdb0683.4ea44ee6.js new file mode 100644 index 0000000000..d1ad46f27a --- /dev/null +++ b/assets/js/ccdb0683.4ea44ee6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2042],{1865:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>c,frontMatter:()=>l,metadata:()=>r,toc:()=>d});var s=t(4848),i=t(8453);const l={sidebar_label:"listen",title:"opendevin.server.listen"},o=void 0,r={id:"python/opendevin/server/listen",title:"opendevin.server.listen",description:"get\\litellm\\models",source:"@site/modules/python/opendevin/server/listen.md",sourceDirName:"python/opendevin/server",slug:"/python/opendevin/server/listen",permalink:"/OpenDevin/modules/python/opendevin/server/listen",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"listen",title:"opendevin.server.listen"},sidebar:"apiSidebar",previous:{title:"session",permalink:"/OpenDevin/modules/python/opendevin/server/session/"},next:{title:"system",permalink:"/OpenDevin/modules/python/opendevin/utils/system"}},a={},d=[{value:"get_litellm_models",id:"get_litellm_models",level:4},{value:"get_agents",id:"get_agents",level:4},{value:"get_token",id:"get_token",level:4}];function p(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h4,{id:"get_litellm_models",children:"get_litellm_models"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@app.get('/api/litellm-models')\nasync def get_litellm_models()\n"})}),"\n",(0,s.jsx)(n.p,{children:"Get all models supported by LiteLLM."}),"\n",(0,s.jsx)(n.h4,{id:"get_agents",children:"get_agents"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@app.get('/api/agents')\nasync def get_agents()\n"})}),"\n",(0,s.jsx)(n.p,{children:"Get all agents supported by LiteLLM."}),"\n",(0,s.jsx)(n.h4,{id:"get_token",children:"get_token"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"@app.get('/api/auth')\nasync def get_token(\n credentials: HTTPAuthorizationCredentials = Depends(security_scheme))\n"})}),"\n",(0,s.jsx)(n.p,{children:"Generate a JWT for authentication when starting a WebSocket connection. This endpoint checks if valid credentials\nare provided and uses them to get a session ID. If no valid credentials are provided, it generates a new session ID."})]})}function c(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var s=t(6540);const i={},l=s.createContext(i);function o(e){const n=s.useContext(l);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ce99aea4.788106d2.js b/assets/js/ce99aea4.788106d2.js deleted file mode 100644 index 0da4d4289e..0000000000 --- a/assets/js/ce99aea4.788106d2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3928],{6723:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>i});var o=n(4848),r=n(8453);const s={sidebar_label:"recall",title:"observation.recall"},a=void 0,c={id:"python/observation/recall",title:"observation.recall",description:"AgentRecallObservation Objects",source:"@site/docs/python/observation/recall.md",sourceDirName:"python/observation",slug:"/python/observation/recall",permalink:"/OpenDevin/docs/python/observation/recall",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"recall",title:"observation.recall"}},l={},i=[{value:"AgentRecallObservation Objects",id:"agentrecallobservation-objects",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"agentrecallobservation-objects",children:"AgentRecallObservation Objects"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass AgentRecallObservation(Observation)\n"})}),"\n",(0,o.jsx)(t.p,{children:"This data class represents a list of memories recalled by the agent."})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var o=n(6540);const r={},s=o.createContext(r);function a(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cf093600.83f31282.js b/assets/js/cf093600.83f31282.js new file mode 100644 index 0000000000..25cace1424 --- /dev/null +++ b/assets/js/cf093600.83f31282.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8474],{7976:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var o=t(4848),s=t(8453);const r={sidebar_label:"json",title:"agenthub.monologue_agent.utils.json"},l=void 0,i={id:"python/agenthub/monologue_agent/utils/json",title:"agenthub.monologue_agent.utils.json",description:"my\\_encoder",source:"@site/modules/python/agenthub/monologue_agent/utils/json.md",sourceDirName:"python/agenthub/monologue_agent/utils",slug:"/python/agenthub/monologue_agent/utils/json",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/json",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"json",title:"agenthub.monologue_agent.utils.json"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/micro/agent"},next:{title:"memory",permalink:"/OpenDevin/modules/python/agenthub/monologue_agent/utils/memory"}},a={},c=[{value:"my_encoder",id:"my_encoder",level:4},{value:"dumps",id:"dumps",level:4},{value:"loads",id:"loads",level:4}];function d(e){const n={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"my_encoder",children:"my_encoder"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def my_encoder(obj)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Encodes objects as dictionaries"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"obj (Object): An object that will be converted"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"dict: If the object can be converted it is returned in dict format"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"dumps",children:"dumps"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def dumps(obj, **kwargs)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Serialize an object to str format"}),"\n",(0,o.jsx)(n.h4,{id:"loads",children:"loads"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def loads(s, **kwargs)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Create a JSON object from str"})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>i});var o=t(6540);const s={},r=o.createContext(s);function l(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d021f14c.3fcf346e.js b/assets/js/d021f14c.3fcf346e.js deleted file mode 100644 index cdef149524..0000000000 --- a/assets/js/d021f14c.3fcf346e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6388],{2497:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>s,metadata:()=>a,toc:()=>d});var o=r(4848),t=r(8453);const s={sidebar_label:"error",title:"opendevin.observation.error"},i=void 0,a={id:"python/opendevin/observation/error",title:"opendevin.observation.error",description:"AgentErrorObservation Objects",source:"@site/docs/python/opendevin/observation/error.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/error",permalink:"/OpenDevin/docs/python/opendevin/observation/error",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"error",title:"opendevin.observation.error"},sidebar:"apiSidebar",previous:{title:"delegate",permalink:"/OpenDevin/docs/python/opendevin/observation/delegate"},next:{title:"files",permalink:"/OpenDevin/docs/python/opendevin/observation/files"}},c={},d=[{value:"AgentErrorObservation Objects",id:"agenterrorobservation-objects",level:2}];function p(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"agenterrorobservation-objects",children:"AgentErrorObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass AgentErrorObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents an error encountered by the agent."})]})}function l(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>a});var o=r(6540);const t={},s=o.createContext(t);function i(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d07b6061.d4c1407a.js b/assets/js/d07b6061.d4c1407a.js new file mode 100644 index 0000000000..2368f0b64c --- /dev/null +++ b/assets/js/d07b6061.d4c1407a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2609],{6817:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var t=n(4848),o=n(8453);const r={sidebar_label:"msg_stack",title:"opendevin.server.session.msg_stack"},i=void 0,a={id:"python/opendevin/server/session/msg_stack",title:"opendevin.server.session.msg_stack",description:"Message Objects",source:"@site/modules/python/opendevin/server/session/msg_stack.md",sourceDirName:"python/opendevin/server/session",slug:"/python/opendevin/server/session/msg_stack",permalink:"/OpenDevin/modules/python/opendevin/server/session/msg_stack",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"msg_stack",title:"opendevin.server.session.msg_stack"},sidebar:"apiSidebar",previous:{title:"manager",permalink:"/OpenDevin/modules/python/opendevin/server/session/manager"},next:{title:"session",permalink:"/OpenDevin/modules/python/opendevin/server/session/"}},c={},d=[{value:"Message Objects",id:"message-objects",level:2},{value:"role",id:"role",level:4}];function l(e){const s={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h2,{id:"message-objects",children:"Message Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"class Message()\n"})}),"\n",(0,t.jsx)(s.h4,{id:"role",children:"role"}),"\n",(0,t.jsx)(s.p,{children:'"user"| "assistant"'})]})}function p(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>a});var t=n(6540);const o={},r=t.createContext(o);function i(e){const s=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d383e512.b470ba34.js b/assets/js/d383e512.b470ba34.js new file mode 100644 index 0000000000..29d01679cf --- /dev/null +++ b/assets/js/d383e512.b470ba34.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[300],{4761:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>a,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var r=t(4848),s=t(8453);const o={sidebar_label:"files",title:"opendevin.files"},i=void 0,l={id:"python/opendevin/files",title:"opendevin.files",description:"WorkspaceFile Objects",source:"@site/modules/python/opendevin/files.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/files",permalink:"/OpenDevin/modules/python/opendevin/files",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"files",title:"opendevin.files"},sidebar:"apiSidebar",previous:{title:"config",permalink:"/OpenDevin/modules/python/opendevin/config"},next:{title:"logger",permalink:"/OpenDevin/modules/python/opendevin/logger"}},c={},d=[{value:"WorkspaceFile Objects",id:"workspacefile-objects",level:2},{value:"to_dict",id:"to_dict",level:4},{value:"get_folder_structure",id:"get_folder_structure",level:4}];function p(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"workspacefile-objects",children:"WorkspaceFile Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class WorkspaceFile()\n"})}),"\n",(0,r.jsx)(n.h4,{id:"to_dict",children:"to_dict"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def to_dict() -> Dict[str, Any]\n"})}),"\n",(0,r.jsx)(n.p,{children:"Converts the File object to a dictionary."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"The dictionary representation of the File object."}),"\n",(0,r.jsx)(n.h4,{id:"get_folder_structure",children:"get_folder_structure"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def get_folder_structure(workdir: Path) -> WorkspaceFile\n"})}),"\n",(0,r.jsx)(n.p,{children:"Gets the folder structure of a directory."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"workdir"})," - The directory path."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,r.jsx)(n.p,{children:"The folder structure."})]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var r=t(6540);const s={},o=r.createContext(s);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d888a952.4f619596.js b/assets/js/d888a952.4f619596.js new file mode 100644 index 0000000000..e24de18e3b --- /dev/null +++ b/assets/js/d888a952.4f619596.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8176],{6677:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>r});var s=t(4848),o=t(8453);const a={sidebar_label:"codeact_agent",title:"agenthub.codeact_agent.codeact_agent"},c=void 0,i={id:"python/agenthub/codeact_agent/codeact_agent",title:"agenthub.codeact_agent.codeact_agent",description:"CodeActAgent Objects",source:"@site/modules/python/agenthub/codeact_agent/codeact_agent.md",sourceDirName:"python/agenthub/codeact_agent",slug:"/python/agenthub/codeact_agent/",permalink:"/OpenDevin/modules/python/agenthub/codeact_agent/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"codeact_agent",title:"agenthub.codeact_agent.codeact_agent"},sidebar:"apiSidebar",previous:{title:"parser",permalink:"/OpenDevin/modules/python/agenthub/SWE_agent/parser"},next:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/delegator_agent/agent"}},d={},r=[{value:"CodeActAgent Objects",id:"codeactagent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"codeactagent-objects",children:"CodeActAgent Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class CodeActAgent(Agent)\n"})}),"\n",(0,s.jsx)(n.p,{children:"The Code Act Agent is a minimalist agent.\nThe agent works by passing the model a list of action-observation pairs and prompting the model to take the next step."}),"\n",(0,s.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM) -> None\n"})}),"\n",(0,s.jsx)(n.p,{children:"Initializes a new instance of the CodeActAgent class."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Performs one step using the Code Act Agent.\nThis includes gathering info on previous steps and prompting the model to make a command to execute."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"state (State): used to get updated info and background commands"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"CmdRunAction(command) - command action to run"}),"\n",(0,s.jsx)(n.li,{children:"AgentEchoAction(content=INVALID_INPUT_MESSAGE) - invalid command output"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"NotImplementedError - for actions other than CmdOutputObservation or AgentMessageObservation"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var s=t(6540);const o={},a=s.createContext(o);function c(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dc51f6cf.38a66145.js b/assets/js/dc51f6cf.38a66145.js new file mode 100644 index 0000000000..ae6e226085 --- /dev/null +++ b/assets/js/dc51f6cf.38a66145.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3969],{4323:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>a});var t=s(4848),r=s(8453);const i={sidebar_label:"agent",title:"opendevin.agent"},l=void 0,c={id:"python/opendevin/agent",title:"opendevin.agent",description:"Agent Objects",source:"@site/modules/python/opendevin/agent.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/agent",permalink:"/OpenDevin/modules/python/opendevin/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"opendevin.agent"},sidebar:"apiSidebar",previous:{title:"system",permalink:"/OpenDevin/modules/python/opendevin/utils/system"},next:{title:"config",permalink:"/OpenDevin/modules/python/opendevin/config"}},o={},a=[{value:"Agent Objects",id:"agent-objects",level:2},{value:"complete",id:"complete",level:4},{value:"step",id:"step",level:4},{value:"search_memory",id:"search_memory",level:4},{value:"reset",id:"reset",level:4},{value:"register",id:"register",level:4},{value:"get_cls",id:"get_cls",level:4},{value:"list_agents",id:"list_agents",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"agent-objects",children:"Agent Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class Agent(ABC)\n"})}),"\n",(0,t.jsx)(n.p,{children:"This abstract base class is an general interface for an agent dedicated to\nexecuting a specific instruction and allowing human interaction with the\nagent during execution.\nIt tracks the execution status and maintains a history of interactions."}),"\n",(0,t.jsx)(n.h4,{id:"complete",children:"complete"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@property\ndef complete() -> bool\n"})}),"\n",(0,t.jsx)(n.p,{children:"Indicates whether the current instruction execution is complete."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"complete (bool): True if execution is complete; False otherwise."}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@abstractmethod\ndef step(state: 'State') -> 'Action'\n"})}),"\n",(0,t.jsx)(n.p,{children:"Starts the execution of the assigned instruction. This method should\nbe implemented by subclasses to define the specific execution logic."}),"\n",(0,t.jsx)(n.h4,{id:"search_memory",children:"search_memory"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@abstractmethod\ndef search_memory(query: str) -> List[str]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Searches the agent's memory for information relevant to the given query."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"query (str): The query to search for in the agent's memory."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"response (str): The response to the query."}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"reset",children:"reset"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def reset() -> None\n"})}),"\n",(0,t.jsx)(n.p,{children:"Resets the agent's execution status and clears the history. This method can be used\nto prepare the agent for restarting the instruction or cleaning up before destruction."}),"\n",(0,t.jsx)(n.h4,{id:"register",children:"register"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@classmethod\ndef register(cls, name: str, agent_cls: Type['Agent'])\n"})}),"\n",(0,t.jsx)(n.p,{children:"Registers an agent class in the registry."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"name (str): The name to register the class under."}),"\n",(0,t.jsx)(n.li,{children:"agent_cls (Type['Agent']): The class to register."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AgentAlreadyRegisteredError: If name already registered"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"get_cls",children:"get_cls"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@classmethod\ndef get_cls(cls, name: str) -> Type['Agent']\n"})}),"\n",(0,t.jsx)(n.p,{children:"Retrieves an agent class from the registry."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"name (str): The name of the class to retrieve"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"agent_cls (Type['Agent']): The class registered under the specified name."}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AgentNotRegisteredError: If name not registered"}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"list_agents",children:"list_agents"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@classmethod\ndef list_agents(cls) -> list[str]\n"})}),"\n",(0,t.jsx)(n.p,{children:"Retrieves the list of all agent names from the registry."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"AgentNotRegisteredError: If no agent is registered"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>c});var t=s(6540);const r={},i=t.createContext(r);function l(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dda3f5b2.296609fe.js b/assets/js/dda3f5b2.296609fe.js deleted file mode 100644 index 359b117211..0000000000 --- a/assets/js/dda3f5b2.296609fe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7464],{5224:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var t=n(4848),o=n(8453);const a={sidebar_label:"message",title:"opendevin.observation.message"},r=void 0,i={id:"python/opendevin/observation/message",title:"opendevin.observation.message",description:"UserMessageObservation Objects",source:"@site/docs/python/opendevin/observation/message.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/message",permalink:"/OpenDevin/docs/python/opendevin/observation/message",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"message",title:"opendevin.observation.message"},sidebar:"apiSidebar",previous:{title:"files",permalink:"/OpenDevin/docs/python/opendevin/observation/files"},next:{title:"recall",permalink:"/OpenDevin/docs/python/opendevin/observation/recall"}},c={},d=[{value:"UserMessageObservation Objects",id:"usermessageobservation-objects",level:2},{value:"AgentMessageObservation Objects",id:"agentmessageobservation-objects",level:2}];function l(e){const s={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h2,{id:"usermessageobservation-objects",children:"UserMessageObservation Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"@dataclass\nclass UserMessageObservation(Observation)\n"})}),"\n",(0,t.jsx)(s.p,{children:"This data class represents a message sent by the user."}),"\n",(0,t.jsx)(s.h2,{id:"agentmessageobservation-objects",children:"AgentMessageObservation Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"@dataclass\nclass AgentMessageObservation(Observation)\n"})}),"\n",(0,t.jsx)(s.p,{children:"This data class represents a message sent by the agent."})]})}function p(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>r,x:()=>i});var t=n(6540);const o={},a=t.createContext(o);function r(e){const s=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),t.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e1a173b2.30e6bc41.js b/assets/js/e1a173b2.30e6bc41.js deleted file mode 100644 index 685e8c7b56..0000000000 --- a/assets/js/e1a173b2.30e6bc41.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7677],{5807:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>l});var s=n(4848),a=n(8453);const r={sidebar_label:"agent",title:"agenthub.SWE_agent.agent"},o=void 0,c={id:"python/agenthub/SWE_agent/agent",title:"agenthub.SWE_agent.agent",description:"SWEAgent Objects",source:"@site/docs/python/agenthub/SWE_agent/agent.md",sourceDirName:"python/agenthub/SWE_agent",slug:"/python/agenthub/SWE_agent/agent",permalink:"/OpenDevin/docs/python/agenthub/SWE_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.SWE_agent.agent"},sidebar:"apiSidebar",next:{title:"parser",permalink:"/OpenDevin/docs/python/agenthub/SWE_agent/parser"}},i={},l=[{value:"SWEAgent Objects",id:"sweagent-objects",level:2},{value:"step",id:"step",level:4},{value:"reset",id:"reset",level:4}];function d(e){const t={code:"code",h2:"h2",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"sweagent-objects",children:"SWEAgent Objects"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"class SWEAgent(Agent)\n"})}),"\n",(0,s.jsx)(t.p,{children:"An attempt to recreate swe_agent with output parsing, prompting style, and Application Computer Interface (ACI)."}),"\n",(0,s.jsx)(t.p,{children:"SWE-agent includes ACI functions like 'goto', 'search_for', 'edit', 'scroll', 'run'"}),"\n",(0,s.jsx)(t.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(t.p,{children:"SWE-Agent step:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Get context - past actions, custom commands, current step"}),"\n",(0,s.jsx)(t.li,{children:"Perform think-act - prompt model for action and reasoning"}),"\n",(0,s.jsx)(t.li,{children:"Catch errors - ensure model takes action (5 attempts max)"}),"\n"]}),"\n",(0,s.jsx)(t.h4,{id:"reset",children:"reset"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def reset() -> None\n"})}),"\n",(0,s.jsx)(t.p,{children:"Used to reset the agent"})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>c});var s=n(6540);const a={},r=s.createContext(a);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e262d05d.faa3f090.js b/assets/js/e262d05d.faa3f090.js new file mode 100644 index 0000000000..d90c6d0b2d --- /dev/null +++ b/assets/js/e262d05d.faa3f090.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3945],{2258:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>c});var t=s(4848),o=s(8453);const i={sidebar_label:"base",title:"opendevin.observation.base"},a=void 0,r={id:"python/opendevin/observation/base",title:"opendevin.observation.base",description:"Observation Objects",source:"@site/modules/python/opendevin/observation/base.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/base",permalink:"/OpenDevin/modules/python/opendevin/observation/base",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"base",title:"opendevin.observation.base"},sidebar:"apiSidebar",previous:{title:"observation",permalink:"/OpenDevin/modules/python/opendevin/observation/__init__"},next:{title:"browse",permalink:"/OpenDevin/modules/python/opendevin/observation/browse"}},d={},c=[{value:"Observation Objects",id:"observation-objects",level:2},{value:"to_dict",id:"to_dict",level:4},{value:"to_memory",id:"to_memory",level:4},{value:"message",id:"message",level:4},{value:"NullObservation Objects",id:"nullobservation-objects",level:2}];function l(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"observation-objects",children:"Observation Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass Observation()\n"})}),"\n",(0,t.jsx)(n.p,{children:"This data class represents an observation of the environment."}),"\n",(0,t.jsx)(n.h4,{id:"to_dict",children:"to_dict"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def to_dict() -> dict\n"})}),"\n",(0,t.jsx)(n.p,{children:"Converts the observation to a dictionary and adds user message."}),"\n",(0,t.jsx)(n.h4,{id:"to_memory",children:"to_memory"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def to_memory() -> dict\n"})}),"\n",(0,t.jsx)(n.p,{children:"Converts the observation to a dictionary."}),"\n",(0,t.jsx)(n.h4,{id:"message",children:"message"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@property\ndef message() -> str\n"})}),"\n",(0,t.jsx)(n.p,{children:"Returns a message describing the observation."}),"\n",(0,t.jsx)(n.h2,{id:"nullobservation-objects",children:"NullObservation Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass NullObservation(Observation)\n"})}),"\n",(0,t.jsx)(n.p,{children:"This data class represents a null observation.\nThis is used when the produced action is NOT executable."})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>r});var t=s(6540);const o={},i=t.createContext(o);function a(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e2e3f9fe.4084e752.js b/assets/js/e2e3f9fe.4084e752.js new file mode 100644 index 0000000000..c1459d08a7 --- /dev/null +++ b/assets/js/e2e3f9fe.4084e752.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1930],{9139:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>g,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var s=t(4848),a=t(8453);const r={sidebar_label:"agent",title:"agenthub.delegator_agent.agent"},i=void 0,o={id:"python/agenthub/delegator_agent/agent",title:"agenthub.delegator_agent.agent",description:"DelegatorAgent Objects",source:"@site/modules/python/agenthub/delegator_agent/agent.md",sourceDirName:"python/agenthub/delegator_agent",slug:"/python/agenthub/delegator_agent/agent",permalink:"/OpenDevin/modules/python/agenthub/delegator_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.delegator_agent.agent"},sidebar:"apiSidebar",previous:{title:"codeact_agent",permalink:"/OpenDevin/modules/python/agenthub/codeact_agent/"},next:{title:"agent",permalink:"/OpenDevin/modules/python/agenthub/dummy_agent/agent"}},l={},c=[{value:"DelegatorAgent Objects",id:"delegatoragent-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"step",id:"step",level:4}];function d(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"delegatoragent-objects",children:"DelegatorAgent Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class DelegatorAgent(Agent)\n"})}),"\n",(0,s.jsx)(n.p,{children:"The planner agent utilizes a special prompting strategy to create long term plans for solving problems.\nThe agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step."}),"\n",(0,s.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,s.jsx)(n.p,{children:"Initialize the Delegator Agent with an LLM"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(n.p,{children:"Checks to see if current step is completed, returns AgentFinishAction if True.\nOtherwise, creates a plan prompt and sends to model for inference, returning the result as the next action."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"state (State): The current state given the previous actions and observations"}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"AgentFinishAction: If the last state was 'completed', 'verified', or 'abandoned'"}),"\n",(0,s.jsx)(n.li,{children:"Action: The next action to take based on llm response"}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(6540);const a={},r=s.createContext(a);function i(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e57dadd8.d686d1ae.js b/assets/js/e57dadd8.d686d1ae.js deleted file mode 100644 index 74fcda07d7..0000000000 --- a/assets/js/e57dadd8.d686d1ae.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1727],{3105:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>i,default:()=>d,frontMatter:()=>l,metadata:()=>r,toc:()=>a});var o=t(4848),s=t(8453);const l={sidebar_label:"monologue",title:"agenthub.monologue_agent.utils.monologue"},i=void 0,r={id:"python/agenthub/monologue_agent/utils/monologue",title:"agenthub.monologue_agent.utils.monologue",description:"Monologue Objects",source:"@site/docs/python/agenthub/monologue_agent/utils/monologue.md",sourceDirName:"python/agenthub/monologue_agent/utils",slug:"/python/agenthub/monologue_agent/utils/monologue",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/monologue",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"monologue",title:"agenthub.monologue_agent.utils.monologue"},sidebar:"apiSidebar",previous:{title:"memory",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/memory"},next:{title:"prompts",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/prompts"}},h={},a=[{value:"Monologue Objects",id:"monologue-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"add_event",id:"add_event",level:4},{value:"get_thoughts",id:"get_thoughts",level:4},{value:"get_total_length",id:"get_total_length",level:4},{value:"condense",id:"condense",level:4}];function c(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"monologue-objects",children:"Monologue Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class Monologue()\n"})}),"\n",(0,o.jsx)(n.p,{children:"The monologue is a representation for the agent's internal monologue where it can think.\nThe agent has the capability of using this monologue for whatever it wants."}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initialize the empty list of thoughts"}),"\n",(0,o.jsx)(n.h4,{id:"add_event",children:"add_event"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def add_event(t: dict)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Adds an event to memory if it is a valid event."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"t (dict): The thought that we want to add to memory"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"AgentEventTypeError: If t is not a dict"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"get_thoughts",children:"get_thoughts"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def get_thoughts()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Get the current thoughts of the agent."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"List: The list of thoughts that the agent has."}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"get_total_length",children:"get_total_length"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def get_total_length()\n"})}),"\n",(0,o.jsx)(n.p,{children:"Gives the total number of characters in all thoughts"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Int: Total number of chars in thoughts."}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"condense",children:"condense"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def condense(llm: LLM)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Attempts to condense the monologue by using the llm"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"llm (LLM): llm to be used for summarization"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Raises"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Exception: the same exception as it got from the llm or processing the response"}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>r});var o=t(6540);const s={},l=o.createContext(s);function i(e){const n=o.useContext(l);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e6fb57b6.b1883670.js b/assets/js/e6fb57b6.b1883670.js new file mode 100644 index 0000000000..ddf2d9ae30 --- /dev/null +++ b/assets/js/e6fb57b6.b1883670.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[6706],{2681:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>i,contentTitle:()=>c,default:()=>p,frontMatter:()=>t,metadata:()=>d,toc:()=>l});var o=s(4848),r=s(8453);const t={sidebar_label:"process",title:"opendevin.sandbox.docker.process"},c=void 0,d={id:"python/opendevin/sandbox/docker/process",title:"opendevin.sandbox.docker.process",description:"DockerProcess Objects",source:"@site/modules/python/opendevin/sandbox/docker/process.md",sourceDirName:"python/opendevin/sandbox/docker",slug:"/python/opendevin/sandbox/docker/process",permalink:"/OpenDevin/modules/python/opendevin/sandbox/docker/process",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"process",title:"opendevin.sandbox.docker.process"},sidebar:"apiSidebar",previous:{title:"run",permalink:"/OpenDevin/modules/python/opendevin/observation/run"},next:{title:"sandbox",permalink:"/OpenDevin/modules/python/opendevin/sandbox/e2b/sandbox"}},i={},l=[{value:"DockerProcess Objects",id:"dockerprocess-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"parse_docker_exec_output",id:"parse_docker_exec_output",level:4},{value:"read_logs",id:"read_logs",level:4}];function a(e){const n={code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"dockerprocess-objects",children:"DockerProcess Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"class DockerProcess(Process)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Represents a background command execution"}),"\n",(0,o.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def __init__(id: int, command: str, result, pid: int)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Initialize a DockerProcess instance."}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"id"})," ",(0,o.jsx)(n.em,{children:"int"})," - The identifier of the command."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"command"})," ",(0,o.jsx)(n.em,{children:"str"})," - The command to be executed."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"result"})," - The result of the command execution."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"pid"})," ",(0,o.jsx)(n.em,{children:"int"})," - The process ID (PID) of the command."]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"parse_docker_exec_output",children:"parse_docker_exec_output"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def parse_docker_exec_output(logs: bytes) -> Tuple[bytes, bytes]\n"})}),"\n",(0,o.jsxs)(n.p,{children:["When you execute a command using ",(0,o.jsx)(n.code,{children:"exec"})," in a docker container, the output produced will be in bytes. this function parses the output of a Docker exec command."]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Example"}),":"]}),"\n",(0,o.jsxs)(n.p,{children:["Considering you have a docker container named ",(0,o.jsx)(n.code,{children:"my_container"})," up and running\n$ docker exec my_container echo \"Hello OpenDevin!\"\n>> b'\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\x13Hello OpenDevin!'"]}),"\n",(0,o.jsx)(n.p,{children:"Such binary logs will be processed by this function."}),"\n",(0,o.jsx)(n.p,{children:"The function handles message types, padding, and byte order to create a usable result. The primary goal is to convert raw container logs into a more structured format for further analysis or display."}),"\n",(0,o.jsx)(n.p,{children:"The function also returns a tail of bytes to ensure that no information is lost. It is a way to handle edge cases and maintain data integrity."}),"\n",(0,o.jsx)(n.p,{children:">> output_bytes = b'\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\x13Hello OpenDevin!'\n>> parsed_output, remaining_bytes = parse_docker_exec_output(output_bytes)"}),"\n",(0,o.jsx)(n.p,{children:">> print(parsed_output)\nb'Hello OpenDevin!'"}),"\n",(0,o.jsx)(n.p,{children:">> print(remaining_bytes)\nb''"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"logs"})," ",(0,o.jsx)(n.em,{children:"bytes"})," - The raw output logs of the command."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsx)(n.p,{children:"Tuple[bytes, bytes]: A tuple containing the parsed output and any remaining data."}),"\n",(0,o.jsx)(n.h4,{id:"read_logs",children:"read_logs"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def read_logs() -> str\n"})}),"\n",(0,o.jsx)(n.p,{children:"Read and decode the logs of the command."}),"\n",(0,o.jsx)(n.p,{children:"This function continuously reads the standard output of a subprocess and\nprocesses the output using the parse_docker_exec_output function to handle\nbinary log messages. It concatenates and decodes the output bytes into a\nstring, ensuring that no partial messages are lost during reading."}),"\n",(0,o.jsx)(n.p,{children:"Dummy Example:"}),"\n",(0,o.jsx)(n.p,{children:">> cmd = 'echo \"Hello OpenDevin!\"'\n>> result = subprocess.Popen(\ncmd, shell=True, stdout=subprocess.PIPE,\nstderr=subprocess.STDOUT, text=True, cwd='.'\n)\n>> bg_cmd = DockerProcess(id, cmd = cmd, result = result, pid)"}),"\n",(0,o.jsx)(n.p,{children:">> logs = bg_cmd.read_logs()\n>> print(logs)\nHello OpenDevin!"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:"str"})," - The decoded logs(string) of the command."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>d});var o=s(6540);const r={},t=o.createContext(r);function c(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e783f6e2.358e6a0d.js b/assets/js/e783f6e2.358e6a0d.js deleted file mode 100644 index cca9585305..0000000000 --- a/assets/js/e783f6e2.358e6a0d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[493],{9276:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>u,frontMatter:()=>s,metadata:()=>i,toc:()=>d});var o=t(4848),r=t(8453);const s={sidebar_label:"agent",title:"agenthub.micro.agent"},c=void 0,i={id:"python/agenthub/micro/agent",title:"agenthub.micro.agent",description:"my\\_encoder",source:"@site/docs/python/agenthub/micro/agent.md",sourceDirName:"python/agenthub/micro",slug:"/python/agenthub/micro/agent",permalink:"/OpenDevin/docs/python/agenthub/micro/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"agenthub.micro.agent"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/docs/python/agenthub/delegator_agent/agent"},next:{title:"json",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/json"}},a={},d=[{value:"my_encoder",id:"my_encoder",level:4},{value:"to_json",id:"to_json",level:4}];function l(e){const n={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"my_encoder",children:"my_encoder"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def my_encoder(obj)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Encodes objects as dictionaries"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"obj (Object): An object that will be converted"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"dict: If the object can be converted it is returned in dict format"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"to_json",children:"to_json"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def to_json(obj, **kwargs)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Serialize an object to str format"})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>i});var o=t(6540);const r={},s=o.createContext(r);function c(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e8c63ed1.907cc444.js b/assets/js/e8c63ed1.907cc444.js new file mode 100644 index 0000000000..6657beec56 --- /dev/null +++ b/assets/js/e8c63ed1.907cc444.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7282],{7031:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>l,default:()=>o,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var t=n(4848),i=n(8453);const r={sidebar_label:"plan",title:"opendevin.plan"},l=void 0,a={id:"python/opendevin/plan",title:"opendevin.plan",description:"Task Objects",source:"@site/modules/python/opendevin/plan.md",sourceDirName:"python/opendevin",slug:"/python/opendevin/plan",permalink:"/OpenDevin/modules/python/opendevin/plan",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"plan",title:"opendevin.plan"},sidebar:"apiSidebar",previous:{title:"main",permalink:"/OpenDevin/modules/python/opendevin/main"}},d={},c=[{value:"Task Objects",id:"task-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"to_string",id:"to_string",level:4},{value:"to_dict",id:"to_dict",level:4},{value:"set_state",id:"set_state",level:4},{value:"get_current_task",id:"get_current_task",level:4},{value:"Plan Objects",id:"plan-objects",level:2},{value:"__init__",id:"__init__-1",level:4},{value:"__str__",id:"__str__",level:4},{value:"get_task_by_id",id:"get_task_by_id",level:4},{value:"add_subtask",id:"add_subtask",level:4},{value:"set_subtask_state",id:"set_subtask_state",level:4},{value:"get_current_task",id:"get_current_task-1",level:4}];function h(e){const s={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.h2,{id:"task-objects",children:"Task Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"class Task()\n"})}),"\n",(0,t.jsx)(s.h4,{id:"__init__",children:"__init__"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def __init__(parent: 'Task | None',\n goal: str,\n state: str = OPEN_STATE,\n subtasks: List = [])\n"})}),"\n",(0,t.jsx)(s.p,{children:"Initializes a new instance of the Task class."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"parent"})," - The parent task, or None if it is the root task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"goal"})," - The goal of the task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"state"})," - The initial state of the task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"subtasks"})," - A list of subtasks associated with this task."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"to_string",children:"to_string"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def to_string(indent='')\n"})}),"\n",(0,t.jsx)(s.p,{children:"Returns a string representation of the task and its subtasks."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"indent"})," - The indentation string for formatting the output."]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"A string representation of the task and its subtasks."}),"\n",(0,t.jsx)(s.h4,{id:"to_dict",children:"to_dict"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def to_dict()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Returns a dictionary representation of the task."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"A dictionary containing the task's attributes."}),"\n",(0,t.jsx)(s.h4,{id:"set_state",children:"set_state"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def set_state(state)\n"})}),"\n",(0,t.jsx)(s.p,{children:"Sets the state of the task and its subtasks."}),"\n",(0,t.jsx)(s.p,{children:"Args: state: The new state of the task."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"PlanInvalidStateError"})," - If the provided state is invalid."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"get_current_task",children:"get_current_task"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def get_current_task() -> 'Task | None'\n"})}),"\n",(0,t.jsx)(s.p,{children:"Retrieves the current task in progress."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"The current task in progress, or None if no task is in progress."}),"\n",(0,t.jsx)(s.h2,{id:"plan-objects",children:"Plan Objects"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"class Plan()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Represents a plan consisting of tasks."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Attributes"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"main_goal"})," - The main goal of the plan."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"task"})," - The root task of the plan."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"__init__-1",children:"__init__"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def __init__(task: str)\n"})}),"\n",(0,t.jsx)(s.p,{children:"Initializes a new instance of the Plan class."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"task"})," - The main goal of the plan."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"__str__",children:"__str__"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def __str__()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Returns a string representation of the plan."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"A string representation of the plan."}),"\n",(0,t.jsx)(s.h4,{id:"get_task_by_id",children:"get_task_by_id"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def get_task_by_id(id: str) -> Task\n"})}),"\n",(0,t.jsx)(s.p,{children:"Retrieves a task by its ID."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"id"})," - The ID of the task."]}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"The task with the specified ID."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Raises"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"ValueError"})," - If the provided task ID is invalid or does not exist."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"add_subtask",children:"add_subtask"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def add_subtask(parent_id: str, goal: str, subtasks: List = [])\n"})}),"\n",(0,t.jsx)(s.p,{children:"Adds a subtask to a parent task."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"parent_id"})," - The ID of the parent task."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"goal"})," - The goal of the subtask."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"subtasks"})," - A list of subtasks associated with the new subtask."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"set_subtask_state",children:"set_subtask_state"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def set_subtask_state(id: str, state: str)\n"})}),"\n",(0,t.jsx)(s.p,{children:"Sets the state of a subtask."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Arguments"}),":"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"id"})," - The ID of the subtask."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.code,{children:"state"})," - The new state of the subtask."]}),"\n"]}),"\n",(0,t.jsx)(s.h4,{id:"get_current_task-1",children:"get_current_task"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-python",children:"def get_current_task()\n"})}),"\n",(0,t.jsx)(s.p,{children:"Retrieves the current task in progress."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Returns"}),":"]}),"\n",(0,t.jsx)(s.p,{children:"The current task in progress, or None if no task is in progress."})]})}function o(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>l,x:()=>a});var t=n(6540);const i={},r=t.createContext(i);function l(e){const s=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),t.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e8ec970c.c58deb09.js b/assets/js/e8ec970c.c58deb09.js new file mode 100644 index 0000000000..1d58b9b24f --- /dev/null +++ b/assets/js/e8ec970c.c58deb09.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2259],{8466:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>l,toc:()=>c});var t=o(4848),s=o(8453);const i={},r="Notes for Windows and WSL Users",l={id:"usage/troubleshooting/windows",title:"Notes for Windows and WSL Users",description:"OpenDevin only supports Windows via WSL.",source:"@site/modules/usage/troubleshooting/windows.md",sourceDirName:"usage/troubleshooting",slug:"/usage/troubleshooting/windows",permalink:"/OpenDevin/modules/usage/troubleshooting/windows",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"\ud83d\udea7 Troubleshooting",permalink:"/OpenDevin/modules/usage/troubleshooting/"},next:{title:"\ud83d\udcda Misc",permalink:"/OpenDevin/modules/usage/about"}},d={},c=[{value:"Troubleshooting",id:"troubleshooting",level:2},{value:"Failed to create opendevin user",id:"failed-to-create-opendevin-user",level:3},{value:"Poetry Installation",id:"poetry-installation",level:3},{value:"NoneType object has no attribute 'request'",id:"nonetype-object-has-no-attribute-request",level:3}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h1,{id:"notes-for-windows-and-wsl-users",children:"Notes for Windows and WSL Users"}),"\n",(0,t.jsxs)(n.p,{children:["OpenDevin only supports Windows via ",(0,t.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/windows/wsl/install",children:"WSL"}),".\nPlease be sure to run all commands inside your WSL terminal."]}),"\n",(0,t.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,t.jsx)(n.h3,{id:"failed-to-create-opendevin-user",children:"Failed to create opendevin user"}),"\n",(0,t.jsxs)(n.p,{children:["If you encounter the following error during setup: ",(0,t.jsx)(n.code,{children:"Exception: Failed to create opendevin user in sandbox: b'useradd: UID 0 is not unique\\n'"}),"\nYou can resolve it by running:\n",(0,t.jsx)(n.code,{children:" export SANDBOX_USER_ID=1000 "})]}),"\n",(0,t.jsx)(n.h3,{id:"poetry-installation",children:"Poetry Installation"}),"\n",(0,t.jsxs)(n.p,{children:["If you face issues running Poetry even after installing it during the build process, you may need to add its binary path to your environment:\n",(0,t.jsx)(n.code,{children:' export PATH="$HOME/.local/bin:$PATH" '})]}),"\n",(0,t.jsx)(n.h3,{id:"nonetype-object-has-no-attribute-request",children:"NoneType object has no attribute 'request'"}),"\n",(0,t.jsxs)(n.p,{children:["If you experiencing issues related to networking, such as ",(0,t.jsx)(n.code,{children:"NoneType object has no attribute 'request'"})," when executing ",(0,t.jsx)(n.code,{children:"make run"}),", you may need to configure your WSL2 networking settings. Follow these steps:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Open or create the ",(0,t.jsx)(n.code,{children:".wslconfig"})," file located at ",(0,t.jsx)(n.code,{children:"C:\\Users\\%username%\\.wslconfig"})," on your Windows host machine."]}),"\n",(0,t.jsxs)(n.li,{children:["Add the following configuration to the ",(0,t.jsx)(n.code,{children:".wslconfig"})," file:"]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"[wsl2]\nnetworkingMode=mirrored\nlocalhostForwarding=true\n"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Save the ",(0,t.jsx)(n.code,{children:".wslconfig"})," file."]}),"\n",(0,t.jsxs)(n.li,{children:["Restart WSL2 completely by exiting any running WSL2 instances and executing the command ",(0,t.jsx)(n.code,{children:"wsl --shutdown"})," in your command prompt or terminal."]}),"\n",(0,t.jsxs)(n.li,{children:["After restarting WSL, attempt to execute ",(0,t.jsx)(n.code,{children:"make run"})," again. The networking issue should be resolved."]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>l});var t=o(6540);const s={},i=t.createContext(s);function r(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ea306689.16128032.js b/assets/js/ea306689.16128032.js deleted file mode 100644 index 9a9e75092e..0000000000 --- a/assets/js/ea306689.16128032.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8973],{2807:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var s=t(4848),o=t(8453);const a={sidebar_label:"observation",title:"schema.observation"},r=void 0,c={id:"python/schema/observation",title:"schema.observation",description:"ObservationTypeSchema Objects",source:"@site/docs/python/schema/observation.md",sourceDirName:"python/schema",slug:"/python/schema/observation",permalink:"/OpenDevin/docs/python/schema/observation",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"observation",title:"schema.observation"}},i={},l=[{value:"ObservationTypeSchema Objects",id:"observationtypeschema-objects",level:2},{value:"READ",id:"read",level:4},{value:"BROWSE",id:"browse",level:4},{value:"RUN",id:"run",level:4},{value:"RECALL",id:"recall",level:4},{value:"CHAT",id:"chat",level:4},{value:"DELEGATE",id:"delegate",level:4}];function h(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"observationtypeschema-objects",children:"ObservationTypeSchema Objects"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"class ObservationTypeSchema(BaseModel)\n"})}),"\n",(0,s.jsx)(n.h4,{id:"read",children:"READ"}),"\n",(0,s.jsx)(n.p,{children:"The content of a file"}),"\n",(0,s.jsx)(n.h4,{id:"browse",children:"BROWSE"}),"\n",(0,s.jsx)(n.p,{children:"The HTML content of a URL"}),"\n",(0,s.jsx)(n.h4,{id:"run",children:"RUN"}),"\n",(0,s.jsx)(n.p,{children:"The output of a command"}),"\n",(0,s.jsx)(n.h4,{id:"recall",children:"RECALL"}),"\n",(0,s.jsx)(n.p,{children:"The result of a search"}),"\n",(0,s.jsx)(n.h4,{id:"chat",children:"CHAT"}),"\n",(0,s.jsx)(n.p,{children:"A message from the user"}),"\n",(0,s.jsx)(n.h4,{id:"delegate",children:"DELEGATE"}),"\n",(0,s.jsx)(n.p,{children:"The result of a task delegated to another agent"})]})}function d(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var s=t(6540);const o={},a=s.createContext(o);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/eb832c93.fe72f941.js b/assets/js/eb832c93.fe72f941.js new file mode 100644 index 0000000000..ee3bf6b347 --- /dev/null +++ b/assets/js/eb832c93.fe72f941.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5632],{190:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>a,toc:()=>p});var o=t(4848),s=t(8453);const r={sidebar_label:"run",title:"opendevin.observation.run"},i=void 0,a={id:"python/opendevin/observation/run",title:"opendevin.observation.run",description:"CmdOutputObservation Objects",source:"@site/modules/python/opendevin/observation/run.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/run",permalink:"/OpenDevin/modules/python/opendevin/observation/run",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"run",title:"opendevin.observation.run"},sidebar:"apiSidebar",previous:{title:"recall",permalink:"/OpenDevin/modules/python/opendevin/observation/recall"},next:{title:"process",permalink:"/OpenDevin/modules/python/opendevin/sandbox/docker/process"}},c={},p=[{value:"CmdOutputObservation Objects",id:"cmdoutputobservation-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h2,{id:"cmdoutputobservation-objects",children:"CmdOutputObservation Objects"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass CmdOutputObservation(Observation)\n"})}),"\n",(0,o.jsx)(n.p,{children:"This data class represents the output of a command."})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var o=t(6540);const s={},r=o.createContext(s);function i(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec0eb2c8.0520bc46.js b/assets/js/ec0eb2c8.0520bc46.js deleted file mode 100644 index 33a1a0f32c..0000000000 --- a/assets/js/ec0eb2c8.0520bc46.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[919],{2520:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var s=t(4848),r=t(8453);const o={sidebar_label:"auth",title:"server.auth.auth"},i=void 0,c={id:"python/server/auth/auth",title:"server.auth.auth",description:"get\\sid\\from\\_token",source:"@site/docs/python/server/auth/auth.md",sourceDirName:"python/server/auth",slug:"/python/server/auth/",permalink:"/OpenDevin/docs/python/server/auth/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"auth",title:"server.auth.auth"}},d={},l=[{value:"get_sid_from_token",id:"get_sid_from_token",level:4},{value:"sign_token",id:"sign_token",level:4}];function a(e){const n={code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h4,{id:"get_sid_from_token",children:"get_sid_from_token"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def get_sid_from_token(token: str) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Retrieves the session id from a JWT token."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"token"})," ",(0,s.jsx)(n.em,{children:"str"})," - The JWT token from which the session id is to be extracted."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"str"})," - The session id if found and valid, otherwise an empty string."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"sign_token",children:"sign_token"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def sign_token(payload: Dict[str, object]) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Signs a JWT token."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var s=t(6540);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec5e396f.c4d0bd4c.js b/assets/js/ec5e396f.c4d0bd4c.js deleted file mode 100644 index 1affb0374b..0000000000 --- a/assets/js/ec5e396f.c4d0bd4c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2921],{1625:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>r,toc:()=>d});var i=l(4848),t=l(8453);const s={sidebar_label:"llm",title:"opendevin.llm.llm"},o=void 0,r={id:"python/opendevin/llm/llm",title:"opendevin.llm.llm",description:"LLM Objects",source:"@site/docs/python/opendevin/llm/llm.md",sourceDirName:"python/opendevin/llm",slug:"/python/opendevin/llm/",permalink:"/OpenDevin/docs/python/opendevin/llm/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"llm",title:"opendevin.llm.llm"},sidebar:"apiSidebar",previous:{title:"agent_controller",permalink:"/OpenDevin/docs/python/opendevin/controller/agent_controller"},next:{title:"observation",permalink:"/OpenDevin/docs/python/opendevin/observation/__init__"}},c={},d=[{value:"LLM Objects",id:"llm-objects",level:2},{value:"__init__",id:"__init__",level:4},{value:"completion",id:"completion",level:4}];function a(e){const n={code:"code",em:"em",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"llm-objects",children:"LLM Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"class LLM()\n"})}),"\n",(0,i.jsx)(n.p,{children:"The LLM class represents a Language Model instance."}),"\n",(0,i.jsx)(n.h4,{id:"__init__",children:"__init__"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"def __init__(model=DEFAULT_MODEL_NAME,\n api_key=DEFAULT_API_KEY,\n base_url=DEFAULT_BASE_URL,\n api_version=DEFAULT_API_VERSION,\n num_retries=LLM_NUM_RETRIES,\n retry_min_wait=LLM_RETRY_MIN_WAIT,\n retry_max_wait=LLM_RETRY_MAX_WAIT)\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - The name of the language model. Defaults to LLM_MODEL."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"api_key"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - The API key for accessing the language model. Defaults to LLM_API_KEY."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"base_url"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - The base URL for the language model API. Defaults to LLM_BASE_URL. Not necessary for OpenAI."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"api_version"})," ",(0,i.jsx)(n.em,{children:"str, optional"})," - The version of the API to use. Defaults to LLM_API_VERSION. Not necessary for OpenAI."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"num_retries"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - The number of retries for API calls. Defaults to LLM_NUM_RETRIES."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"retry_min_wait"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - The minimum time to wait between retries in seconds. Defaults to LLM_RETRY_MIN_TIME."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"retry_max_wait"})," ",(0,i.jsx)(n.em,{children:"int, optional"})," - The maximum time to wait between retries in seconds. Defaults to LLM_RETRY_MAX_TIME."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Attributes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"model_name"})," ",(0,i.jsx)(n.em,{children:"str"})," - The name of the language model."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"api_key"})," ",(0,i.jsx)(n.em,{children:"str"})," - The API key for accessing the language model."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"base_url"})," ",(0,i.jsx)(n.em,{children:"str"})," - The base URL for the language model API."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"api_version"})," ",(0,i.jsx)(n.em,{children:"str"})," - The version of the API to use."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"api_key"}),"1 ",(0,i.jsx)(n.em,{children:"function"})," - A decorator for the litellm completion function."]}),"\n"]}),"\n",(0,i.jsx)(n.h4,{id:"completion",children:"completion"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@property\ndef completion()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Decorator for the litellm completion function."})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453:(e,n,l)=>{l.d(n,{R:()=>o,x:()=>r});var i=l(6540);const t={},s=i.createContext(t);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ed4ea48b.3a078eed.js b/assets/js/ed4ea48b.3a078eed.js deleted file mode 100644 index 08eb87fc07..0000000000 --- a/assets/js/ed4ea48b.3a078eed.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5420],{6248:(t,n,e)=>{e.r(n),e.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>d,frontMatter:()=>c,metadata:()=>r,toc:()=>_});var o=e(4848),i=e(8453);const c={sidebar_label:"action",title:"action"},s=void 0,r={id:"python/action/__init__",title:"action",description:"ACTION\\TYPE\\TO\\_CLASS",source:"@site/docs/python/action/__init__.md",sourceDirName:"python/action",slug:"/python/action/__init__",permalink:"/OpenDevin/docs/python/action/__init__",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"action",title:"action"}},a={},_=[{value:"ACTION_TYPE_TO_CLASS",id:"action_type_to_class",level:4}];function l(t){const n={h4:"h4",p:"p",...(0,i.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"action_type_to_class",children:"ACTION_TYPE_TO_CLASS"}),"\n",(0,o.jsx)(n.p,{children:"type: ignore[attr-defined]"})]})}function d(t={}){const{wrapper:n}={...(0,i.R)(),...t.components};return n?(0,o.jsx)(n,{...t,children:(0,o.jsx)(l,{...t})}):l(t)}},8453:(t,n,e)=>{e.d(n,{R:()=>s,x:()=>r});var o=e(6540);const i={},c=o.createContext(i);function s(t){const n=o.useContext(c);return o.useMemo((function(){return"function"==typeof t?t(n):{...n,...t}}),[n,t])}function r(t){let n;return n=t.disableParentContext?"function"==typeof t.components?t.components(i):t.components||i:s(t.components),o.createElement(c.Provider,{value:n},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/ed95afb7.6e0da92c.js b/assets/js/ed95afb7.6e0da92c.js deleted file mode 100644 index 64d55c59f9..0000000000 --- a/assets/js/ed95afb7.6e0da92c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7070],{3601:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>d,toc:()=>i});var r=n(4848),t=n(8453);const a={sidebar_label:"manager",title:"server.session.manager"},o=void 0,d={id:"python/server/session/manager",title:"server.session.manager",description:"SessionManager Objects",source:"@site/docs/python/server/session/manager.md",sourceDirName:"python/server/session",slug:"/python/server/session/manager",permalink:"/OpenDevin/docs/python/server/session/manager",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"manager",title:"server.session.manager"}},c={},i=[{value:"SessionManager Objects",id:"sessionmanager-objects",level:2},{value:"send",id:"send",level:4},{value:"send_error",id:"send_error",level:4},{value:"send_message",id:"send_message",level:4}];function l(e){const s={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.h2,{id:"sessionmanager-objects",children:"SessionManager Objects"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"class SessionManager()\n"})}),"\n",(0,r.jsx)(s.h4,{id:"send",children:"send"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"async def send(sid: str, data: Dict[str, object]) -> bool\n"})}),"\n",(0,r.jsx)(s.p,{children:"Sends data to the client."}),"\n",(0,r.jsx)(s.h4,{id:"send_error",children:"send_error"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"async def send_error(sid: str, message: str) -> bool\n"})}),"\n",(0,r.jsx)(s.p,{children:"Sends an error message to the client."}),"\n",(0,r.jsx)(s.h4,{id:"send_message",children:"send_message"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-python",children:"async def send_message(sid: str, message: str) -> bool\n"})}),"\n",(0,r.jsx)(s.p,{children:"Sends a message to the client."})]})}function h(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>d});var r=n(6540);const t={},a=r.createContext(t);function o(e){const s=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/edbbe4b4.97336daf.js b/assets/js/edbbe4b4.97336daf.js new file mode 100644 index 0000000000..c673787d7c --- /dev/null +++ b/assets/js/edbbe4b4.97336daf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9965],{7858:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>s,default:()=>a,frontMatter:()=>r,metadata:()=>u,toc:()=>l});var i=t(4848),o=t(8453);const r={sidebar_label:"requirement",title:"opendevin.sandbox.plugins.requirement"},s=void 0,u={id:"python/opendevin/sandbox/plugins/requirement",title:"opendevin.sandbox.plugins.requirement",description:"PluginRequirement Objects",source:"@site/modules/python/opendevin/sandbox/plugins/requirement.md",sourceDirName:"python/opendevin/sandbox/plugins",slug:"/python/opendevin/sandbox/plugins/requirement",permalink:"/OpenDevin/modules/python/opendevin/sandbox/plugins/requirement",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"requirement",title:"opendevin.sandbox.plugins.requirement"},sidebar:"apiSidebar",previous:{title:"mixin",permalink:"/OpenDevin/modules/python/opendevin/sandbox/plugins/mixin"},next:{title:"action",permalink:"/OpenDevin/modules/python/opendevin/schema/action"}},p={},l=[{value:"PluginRequirement Objects",id:"pluginrequirement-objects",level:2}];function d(e){const n={code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h2,{id:"pluginrequirement-objects",children:"PluginRequirement Objects"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass PluginRequirement()\n"})}),"\n",(0,i.jsx)(n.p,{children:"Requirement for a plugin."})]})}function a(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>u});var i=t(6540);const o={},r=i.createContext(o);function s(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function u(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ee17c702.88c1ab0c.js b/assets/js/ee17c702.88c1ab0c.js deleted file mode 100644 index 7f23ba8c3b..0000000000 --- a/assets/js/ee17c702.88c1ab0c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4057],{5050:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>d});var t=s(4848),o=s(8453);const i={sidebar_label:"base",title:"opendevin.observation.base"},a=void 0,r={id:"python/opendevin/observation/base",title:"opendevin.observation.base",description:"Observation Objects",source:"@site/docs/python/opendevin/observation/base.md",sourceDirName:"python/opendevin/observation",slug:"/python/opendevin/observation/base",permalink:"/OpenDevin/docs/python/opendevin/observation/base",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"base",title:"opendevin.observation.base"},sidebar:"apiSidebar",previous:{title:"observation",permalink:"/OpenDevin/docs/python/opendevin/observation/__init__"},next:{title:"browse",permalink:"/OpenDevin/docs/python/opendevin/observation/browse"}},c={},d=[{value:"Observation Objects",id:"observation-objects",level:2},{value:"to_dict",id:"to_dict",level:4},{value:"to_memory",id:"to_memory",level:4},{value:"message",id:"message",level:4},{value:"NullObservation Objects",id:"nullobservation-objects",level:2}];function l(e){const n={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.h2,{id:"observation-objects",children:"Observation Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass Observation()\n"})}),"\n",(0,t.jsx)(n.p,{children:"This data class represents an observation of the environment."}),"\n",(0,t.jsx)(n.h4,{id:"to_dict",children:"to_dict"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def to_dict() -> dict\n"})}),"\n",(0,t.jsx)(n.p,{children:"Converts the observation to a dictionary and adds user message."}),"\n",(0,t.jsx)(n.h4,{id:"to_memory",children:"to_memory"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def to_memory() -> dict\n"})}),"\n",(0,t.jsx)(n.p,{children:"Converts the observation to a dictionary."}),"\n",(0,t.jsx)(n.h4,{id:"message",children:"message"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@property\ndef message() -> str\n"})}),"\n",(0,t.jsx)(n.p,{children:"Returns a message describing the observation."}),"\n",(0,t.jsx)(n.h2,{id:"nullobservation-objects",children:"NullObservation Objects"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"@dataclass\nclass NullObservation(Observation)\n"})}),"\n",(0,t.jsx)(n.p,{children:"This data class represents a null observation.\nThis is used when the produced action is NOT executable."})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>r});var t=s(6540);const o={},i=t.createContext(o);function a(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f35d3ff1.78631d3b.js b/assets/js/f35d3ff1.78631d3b.js new file mode 100644 index 0000000000..34bd7b086c --- /dev/null +++ b/assets/js/f35d3ff1.78631d3b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8905],{6171:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>t,metadata:()=>d,toc:()=>a});var o=n(4848),r=n(8453);const t={sidebar_label:"session",title:"opendevin.server.session.session"},i=void 0,d={id:"python/opendevin/server/session/session",title:"opendevin.server.session.session",description:"Session Objects",source:"@site/modules/python/opendevin/server/session/session.md",sourceDirName:"python/opendevin/server/session",slug:"/python/opendevin/server/session/",permalink:"/OpenDevin/modules/python/opendevin/server/session/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"session",title:"opendevin.server.session.session"},sidebar:"apiSidebar",previous:{title:"msg_stack",permalink:"/OpenDevin/modules/python/opendevin/server/session/msg_stack"},next:{title:"listen",permalink:"/OpenDevin/modules/python/opendevin/server/listen"}},c={},a=[{value:"Session Objects",id:"session-objects",level:2},{value:"send_error",id:"send_error",level:4},{value:"send_message",id:"send_message",level:4}];function l(e){const s={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h2,{id:"session-objects",children:"Session Objects"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-python",children:"class Session()\n"})}),"\n",(0,o.jsx)(s.h4,{id:"send_error",children:"send_error"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-python",children:"async def send_error(message: str) -> bool\n"})}),"\n",(0,o.jsx)(s.p,{children:"Sends an error message to the client."}),"\n",(0,o.jsx)(s.h4,{id:"send_message",children:"send_message"}),"\n",(0,o.jsx)(s.pre,{children:(0,o.jsx)(s.code,{className:"language-python",children:"async def send_message(message: str) -> bool\n"})}),"\n",(0,o.jsx)(s.p,{children:"Sends a message to the client."})]})}function p(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,o.jsx)(s,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>d});var o=n(6540);const r={},t=o.createContext(r);function i(e){const s=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f3dcc4ba.65172a7e.js b/assets/js/f3dcc4ba.65172a7e.js new file mode 100644 index 0000000000..1083612876 --- /dev/null +++ b/assets/js/f3dcc4ba.65172a7e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8679],{6057:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>d,toc:()=>l});var s=t(4848),r=t(8453);const o={sidebar_label:"auth",title:"opendevin.server.auth.auth"},i=void 0,d={id:"python/opendevin/server/auth/auth",title:"opendevin.server.auth.auth",description:"get\\sid\\from\\_token",source:"@site/modules/python/opendevin/server/auth/auth.md",sourceDirName:"python/opendevin/server/auth",slug:"/python/opendevin/server/auth/",permalink:"/OpenDevin/modules/python/opendevin/server/auth/",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"auth",title:"opendevin.server.auth.auth"},sidebar:"apiSidebar",previous:{title:"manager",permalink:"/OpenDevin/modules/python/opendevin/server/agent/manager"},next:{title:"manager",permalink:"/OpenDevin/modules/python/opendevin/server/session/manager"}},a={},l=[{value:"get_sid_from_token",id:"get_sid_from_token",level:4},{value:"sign_token",id:"sign_token",level:4}];function c(e){const n={code:"code",em:"em",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h4,{id:"get_sid_from_token",children:"get_sid_from_token"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def get_sid_from_token(token: str) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Retrieves the session id from a JWT token."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"token"})," ",(0,s.jsx)(n.em,{children:"str"})," - The JWT token from which the session id is to be extracted."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"str"})," - The session id if found and valid, otherwise an empty string."]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"sign_token",children:"sign_token"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-python",children:"def sign_token(payload: Dict[str, object]) -> str\n"})}),"\n",(0,s.jsx)(n.p,{children:"Signs a JWT token."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>d});var s=t(6540);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f4941030.5b830092.js b/assets/js/f4941030.5b830092.js deleted file mode 100644 index 0dad9d06cb..0000000000 --- a/assets/js/f4941030.5b830092.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[416],{9906:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>r,contentTitle:()=>a,default:()=>l,frontMatter:()=>c,metadata:()=>d,toc:()=>b});var t=n(4848),s=n(8453);const c={sidebar_label:"sandbox",title:"sandbox.e2b.sandbox"},a=void 0,d={id:"python/sandbox/e2b/sandbox",title:"sandbox.e2b.sandbox",description:"E2BBox Objects",source:"@site/docs/python/sandbox/e2b/sandbox.md",sourceDirName:"python/sandbox/e2b",slug:"/python/sandbox/e2b/sandbox",permalink:"/OpenDevin/docs/python/sandbox/e2b/sandbox",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"sandbox",title:"sandbox.e2b.sandbox"}},r={},b=[{value:"E2BBox Objects",id:"e2bbox-objects",level:2},{value:"copy_to",id:"copy_to",level:4}];function i(e){const o={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.h2,{id:"e2bbox-objects",children:"E2BBox Objects"}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-python",children:"class E2BBox(Sandbox)\n"})}),"\n",(0,t.jsx)(o.h4,{id:"copy_to",children:"copy_to"}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-python",children:"def copy_to(host_src: str, sandbox_dest: str, recursive: bool = False)\n"})}),"\n",(0,t.jsx)(o.p,{children:"Copies a local file or directory to the sandbox."})]})}function l(e={}){const{wrapper:o}={...(0,s.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(i,{...e})}):i(e)}},8453:(e,o,n)=>{n.d(o,{R:()=>a,x:()=>d});var t=n(6540);const s={},c=t.createContext(s);function a(e){const o=t.useContext(c);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function d(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),t.createElement(c.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f51bf8b0.8635fdb0.js b/assets/js/f51bf8b0.8635fdb0.js deleted file mode 100644 index 8d9e86a3b9..0000000000 --- a/assets/js/f51bf8b0.8635fdb0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[321],{6644:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var s=n(4848),r=n(8453);const o={sidebar_label:"agent",title:"SWE_agent.agent"},a=void 0,c={id:"python/SWE_agent/agent",title:"SWE_agent.agent",description:"SWEAgent Objects",source:"@site/docs/python/SWE_agent/agent.md",sourceDirName:"python/SWE_agent",slug:"/python/SWE_agent/agent",permalink:"/OpenDevin/docs/python/SWE_agent/agent",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent",title:"SWE_agent.agent"}},i={},l=[{value:"SWEAgent Objects",id:"sweagent-objects",level:2},{value:"step",id:"step",level:4},{value:"reset",id:"reset",level:4}];function d(e){const t={code:"code",h2:"h2",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.h2,{id:"sweagent-objects",children:"SWEAgent Objects"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"class SWEAgent(Agent)\n"})}),"\n",(0,s.jsx)(t.p,{children:"An attempt to recreate swe_agent with output parsing, prompting style, and Application Computer Interface (ACI)."}),"\n",(0,s.jsx)(t.p,{children:"SWE-agent includes ACI functions like 'goto', 'search_for', 'edit', 'scroll', 'run'"}),"\n",(0,s.jsx)(t.h4,{id:"step",children:"step"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def step(state: State) -> Action\n"})}),"\n",(0,s.jsx)(t.p,{children:"SWE-Agent step:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Get context - past actions, custom commands, current step"}),"\n",(0,s.jsx)(t.li,{children:"Perform think-act - prompt model for action and reasoning"}),"\n",(0,s.jsx)(t.li,{children:"Catch errors - ensure model takes action (5 attempts max)"}),"\n"]}),"\n",(0,s.jsx)(t.h4,{id:"reset",children:"reset"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def reset() -> None\n"})}),"\n",(0,s.jsx)(t.p,{children:"Used to reset the agent"})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var s=n(6540);const r={},o=s.createContext(r);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f9c6dd8d.cf929d77.js b/assets/js/f9c6dd8d.cf929d77.js deleted file mode 100644 index 61b2ad7c61..0000000000 --- a/assets/js/f9c6dd8d.cf929d77.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[707],{8799:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>f,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var o=t(4848),c=t(8453);const r={sidebar_label:"config",title:"config"},s=void 0,i={id:"python/config",title:"config",description:"get",source:"@site/docs/python/config.md",sourceDirName:"python",slug:"/python/config",permalink:"/OpenDevin/docs/python/config",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"config",title:"config"}},a={},l=[{value:"get",id:"get",level:4}];function d(e){const n={code:"code",h4:"h4",p:"p",pre:"pre",...(0,c.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"get",children:"get"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def get(key: str, required: bool = False)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Get a key from the environment variables or config.toml or default configs."})]})}function f(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var o=t(6540);const c={},r=o.createContext(c);function s(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fb32c487.006be8dd.js b/assets/js/fb32c487.006be8dd.js deleted file mode 100644 index 6b216bbc1e..0000000000 --- a/assets/js/fb32c487.006be8dd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9822],{505:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>s,metadata:()=>a,toc:()=>i});var o=n(4848),r=n(8453);const s={sidebar_label:"agent_controller",title:"opendevin.controller.agent_controller"},l=void 0,a={id:"python/opendevin/controller/agent_controller",title:"opendevin.controller.agent_controller",description:"AgentController Objects",source:"@site/docs/python/opendevin/controller/agent_controller.md",sourceDirName:"python/opendevin/controller",slug:"/python/opendevin/controller/agent_controller",permalink:"/OpenDevin/docs/python/opendevin/controller/agent_controller",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent_controller",title:"opendevin.controller.agent_controller"},sidebar:"apiSidebar",previous:{title:"tasks",permalink:"/OpenDevin/docs/python/opendevin/action/tasks"},next:{title:"llm",permalink:"/OpenDevin/docs/python/opendevin/llm/"}},c={},i=[{value:"AgentController Objects",id:"agentcontroller-objects",level:2},{value:"setup_task",id:"setup_task",level:4},{value:"start",id:"start",level:4},{value:"get_task_state",id:"get_task_state",level:4}];function d(e){const t={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"agentcontroller-objects",children:"AgentController Objects"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"class AgentController()\n"})}),"\n",(0,o.jsx)(t.h4,{id:"setup_task",children:"setup_task"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"async def setup_task(task: str, inputs: dict = {})\n"})}),"\n",(0,o.jsx)(t.p,{children:"Sets up the agent controller with a task."}),"\n",(0,o.jsx)(t.h4,{id:"start",children:"start"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"async def start(task: str)\n"})}),"\n",(0,o.jsx)(t.p,{children:"Starts the agent controller with a task.\nIf task already run before, it will continue from the last step."}),"\n",(0,o.jsx)(t.h4,{id:"get_task_state",children:"get_task_state"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"def get_task_state()\n"})}),"\n",(0,o.jsx)(t.p,{children:"Returns the current state of the agent task."})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>l,x:()=>a});var o=n(6540);const r={},s=o.createContext(r);function l(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fb32f1bb.4362b925.js b/assets/js/fb32f1bb.4362b925.js new file mode 100644 index 0000000000..633b5af3b2 --- /dev/null +++ b/assets/js/fb32f1bb.4362b925.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5335],{9345:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>l,metadata:()=>a,toc:()=>i});var o=n(4848),r=n(8453);const l={sidebar_label:"agent_controller",title:"opendevin.controller.agent_controller"},s=void 0,a={id:"python/opendevin/controller/agent_controller",title:"opendevin.controller.agent_controller",description:"AgentController Objects",source:"@site/modules/python/opendevin/controller/agent_controller.md",sourceDirName:"python/opendevin/controller",slug:"/python/opendevin/controller/agent_controller",permalink:"/OpenDevin/modules/python/opendevin/controller/agent_controller",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"agent_controller",title:"opendevin.controller.agent_controller"},sidebar:"apiSidebar",previous:{title:"tasks",permalink:"/OpenDevin/modules/python/opendevin/action/tasks"},next:{title:"llm",permalink:"/OpenDevin/modules/python/opendevin/llm/"}},c={},i=[{value:"AgentController Objects",id:"agentcontroller-objects",level:2},{value:"setup_task",id:"setup_task",level:4},{value:"start",id:"start",level:4},{value:"get_task_state",id:"get_task_state",level:4}];function d(e){const t={code:"code",h2:"h2",h4:"h4",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.h2,{id:"agentcontroller-objects",children:"AgentController Objects"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"class AgentController()\n"})}),"\n",(0,o.jsx)(t.h4,{id:"setup_task",children:"setup_task"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"async def setup_task(task: str, inputs: dict = {})\n"})}),"\n",(0,o.jsx)(t.p,{children:"Sets up the agent controller with a task."}),"\n",(0,o.jsx)(t.h4,{id:"start",children:"start"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"async def start(task: str)\n"})}),"\n",(0,o.jsx)(t.p,{children:"Starts the agent controller with a task.\nIf task already run before, it will continue from the last step."}),"\n",(0,o.jsx)(t.h4,{id:"get_task_state",children:"get_task_state"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-python",children:"def get_task_state()\n"})}),"\n",(0,o.jsx)(t.p,{children:"Returns the current state of the agent task."})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>a});var o=n(6540);const r={},l=o.createContext(r);function s(e){const t=o.useContext(l);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),o.createElement(l.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/febfa7d3.5d3ab426.js b/assets/js/febfa7d3.5d3ab426.js new file mode 100644 index 0000000000..f9122bbc9e --- /dev/null +++ b/assets/js/febfa7d3.5d3ab426.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1783],{1801:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>o,toc:()=>h});var i=n(4848),s=n(8453);const r={sidebar_position:4},a="\ud83c\udfdb\ufe0f System Architecture Overview",o={id:"usage/architecture",title:"\ud83c\udfdb\ufe0f System Architecture Overview",description:"This is a high-level overview of the system architecture. The system is divided into two main components: the frontend and the backend. The frontend is responsible for handling user interactions and displaying the results. The backend is responsible for handling the business logic and executing the agents.",source:"@site/modules/usage/architecture.mdx",sourceDirName:"usage",slug:"/usage/architecture",permalink:"/OpenDevin/modules/usage/architecture",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_position:4},sidebar:"docsSidebar",previous:{title:"\ud83e\udde0 Agents and Capabilities",permalink:"/OpenDevin/modules/usage/agents"},next:{title:"\ud83d\udea7 Troubleshooting",permalink:"/OpenDevin/modules/usage/troubleshooting/"}},c={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2}];function d(e){const t={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components},{Details:r}=t;return r||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"\ufe0f-system-architecture-overview",children:"\ud83c\udfdb\ufe0f System Architecture Overview"}),"\n",(0,i.jsx)(t.p,{children:"This is a high-level overview of the system architecture. The system is divided into two main components: the frontend and the backend. The frontend is responsible for handling user interactions and displaying the results. The backend is responsible for handling the business logic and executing the agents."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"system_architecture.svg",src:n(7618).A+"",width:"756",height:"763"})}),"\n",(0,i.jsxs)(t.p,{children:["This Overview is simplified to show the main components and their interactions. For a more detailed view of the backend architecture, see the ",(0,i.jsx)(t.a,{href:"#backend-architecture",children:"Backend Architecture"})," section."]}),"\n",(0,i.jsx)(t.h1,{id:"backend-architecture",children:"Backend Architecture"}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsxs)(t.em,{children:[(0,i.jsx)(t.strong,{children:"Disclaimer"}),": The backend architecture is a work in progress and is subject to change. The following diagram shows the current architecture of the backend based on the commit that is shown in the footer of the diagram."]})}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"backend_architecture.svg",src:n(561).A+"",width:"5978",height:"1227"})}),"\n",(0,i.jsxs)(r,{children:[(0,i.jsx)("summary",{children:"Updating this Diagram"}),(0,i.jsxs)("div",{children:[(0,i.jsx)(t.p,{children:"The generation of the backend architecture diagram is partially automated.\nThe diagram is generated from the type hints in the code using the py2puml\ntool. The diagram is then manually reviewed, adjusted and exported to PNG\nand SVG."}),(0,i.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Running python environment in which opendevin is executable\n(according to the instructions in the README.md file in the root of the repository)"}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"https://github.com/lucsorel/py2puml",children:"py2puml"})," installed"]}),"\n"]}),(0,i.jsx)(t.h2,{id:"steps",children:"Steps"}),(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Autogenerate the diagram by running the following command from the root of the repository:\n",(0,i.jsx)(t.code,{children:"py2puml opendevin opendevin > docs/architecture/backend_architecture.puml"})]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Open the generated file in a PlantUML editor, e.g. Visual Studio Code with the PlantUML extension or ",(0,i.jsx)(t.a,{href:"https://www.planttext.com/",children:"PlantText"})]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Review the generated PUML and make all necessary adjustments to the diagram (add missing parts, fix mistakes, improve positioning).\n",(0,i.jsx)(t.em,{children:"py2puml creates the diagram based on the type hints in the code, so missing or incorrect type hints may result in an incomplete or incorrect diagram."})]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Review the diff between the new and the previous diagram and manually check if the changes are correct.\n",(0,i.jsx)(t.em,{children:"Make sure not to remove parts that were manually added to the diagram in the past and are still relevant."})]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Add the commit hash of the commit that was used to generate the diagram to the diagram footer."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Export the diagram as PNG and SVG files and replace the existing diagrams in the ",(0,i.jsx)(t.code,{children:"docs/architecture"})," directory. This can be done with (e.g. ",(0,i.jsx)(t.a,{href:"https://www.planttext.com/",children:"PlantText"}),")"]}),"\n"]}),"\n"]})]})]})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},561:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/backend_architecture-9c023feb6a761aa5104352c5713bc606.svg"},7618:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/system_architecture-f65c0a39005a377faaa0bf2ef7ca854f.svg"},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>o});var i=n(6540);const s={},r=i.createContext(s);function a(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fedb27cf.180417db.js b/assets/js/fedb27cf.180417db.js deleted file mode 100644 index 8d65584ab0..0000000000 --- a/assets/js/fedb27cf.180417db.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4640],{640:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>a});var o=t(4848),s=t(8453);const r={sidebar_label:"json",title:"agenthub.monologue_agent.utils.json"},l=void 0,i={id:"python/agenthub/monologue_agent/utils/json",title:"agenthub.monologue_agent.utils.json",description:"my\\_encoder",source:"@site/docs/python/agenthub/monologue_agent/utils/json.md",sourceDirName:"python/agenthub/monologue_agent/utils",slug:"/python/agenthub/monologue_agent/utils/json",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/json",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"json",title:"agenthub.monologue_agent.utils.json"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/docs/python/agenthub/micro/agent"},next:{title:"memory",permalink:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/memory"}},c={},a=[{value:"my_encoder",id:"my_encoder",level:4},{value:"dumps",id:"dumps",level:4},{value:"loads",id:"loads",level:4}];function d(e){const n={code:"code",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h4,{id:"my_encoder",children:"my_encoder"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def my_encoder(obj)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Encodes objects as dictionaries"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"obj (Object): An object that will be converted"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Returns"}),":"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"dict: If the object can be converted it is returned in dict format"}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"dumps",children:"dumps"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def dumps(obj, **kwargs)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Serialize an object to str format"}),"\n",(0,o.jsx)(n.h4,{id:"loads",children:"loads"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-python",children:"def loads(s, **kwargs)\n"})}),"\n",(0,o.jsx)(n.p,{children:"Create a JSON object from str"})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>i});var o=t(6540);const s={},r=o.createContext(s);function l(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ff0d9598.a842e9ab.js b/assets/js/ff0d9598.a842e9ab.js deleted file mode 100644 index 350fe6f637..0000000000 --- a/assets/js/ff0d9598.a842e9ab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7050],{3528:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>a,toc:()=>_});var o=n(4848),s=n(8453);const r={sidebar_label:"observation",title:"observation"},i=void 0,a={id:"python/observation/__init__",title:"observation",description:"OBSERVATION\\TYPE\\TO\\_CLASS",source:"@site/docs/python/observation/__init__.md",sourceDirName:"python/observation",slug:"/python/observation/__init__",permalink:"/OpenDevin/docs/python/observation/__init__",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"observation",title:"observation"}},c={},_=[{value:"OBSERVATION_TYPE_TO_CLASS",id:"observation_type_to_class",level:4}];function l(t){const e={h4:"h4",p:"p",...(0,s.R)(),...t.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h4,{id:"observation_type_to_class",children:"OBSERVATION_TYPE_TO_CLASS"}),"\n",(0,o.jsx)(e.p,{children:"type: ignore[attr-defined]"})]})}function d(t={}){const{wrapper:e}={...(0,s.R)(),...t.components};return e?(0,o.jsx)(e,{...t,children:(0,o.jsx)(l,{...t})}):l(t)}},8453:(t,e,n)=>{n.d(e,{R:()=>i,x:()=>a});var o=n(6540);const s={},r=o.createContext(s);function i(t){const e=o.useContext(r);return o.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function a(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:i(t.components),o.createElement(r.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/ff4b4bcd.48d0d2e2.js b/assets/js/ff4b4bcd.48d0d2e2.js deleted file mode 100644 index 721a5cca64..0000000000 --- a/assets/js/ff4b4bcd.48d0d2e2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3518],{2137:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>g,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=t(4848),s=t(8453);const a={sidebar_label:"manager",title:"opendevin.server.agent.manager"},i=void 0,o={id:"python/opendevin/server/agent/manager",title:"opendevin.server.agent.manager",description:"AgentManager Objects",source:"@site/docs/python/opendevin/server/agent/manager.md",sourceDirName:"python/opendevin/server/agent",slug:"/python/opendevin/server/agent/manager",permalink:"/OpenDevin/docs/python/opendevin/server/agent/manager",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"manager",title:"opendevin.server.agent.manager"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/OpenDevin/docs/python/opendevin/server/agent/"},next:{title:"auth",permalink:"/OpenDevin/docs/python/opendevin/server/auth/"}},c={},d=[{value:"AgentManager Objects",id:"agentmanager-objects",level:2},{value:"register_agent",id:"register_agent",level:4},{value:"dispatch",id:"dispatch",level:4}];function l(e){const n={code:"code",h2:"h2",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h2,{id:"agentmanager-objects",children:"AgentManager Objects"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"class AgentManager()\n"})}),"\n",(0,r.jsx)(n.h4,{id:"register_agent",children:"register_agent"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"def register_agent(sid: str)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Registers a new agent."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Arguments"}),":"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"sid"})," - The session ID of the agent."]}),"\n"]}),"\n",(0,r.jsx)(n.h4,{id:"dispatch",children:"dispatch"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:"async def dispatch(sid: str, action: str | None, data: dict)\n"})}),"\n",(0,r.jsx)(n.p,{children:"Dispatches actions to the agent from the client."})]})}function g(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var r=t(6540);const s={},a=r.createContext(s);function i(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.0e2e113d.js b/assets/js/main.0e2e113d.js deleted file mode 100644 index bce518a8ad..0000000000 --- a/assets/js/main.0e2e113d.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.0e2e113d.js.LICENSE.txt */ -(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8792],{8328:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});n(6540);var r=n(3259),o=n.n(r),a=n(4054);const i={"02934e1d":[()=>n.e(1991).then(n.bind(n,958)),"@site/docs/python/plan.md",958],"03b14be2":[()=>n.e(620).then(n.bind(n,5323)),"@site/docs/python/action/base.md",5323],"08602ca5":[()=>n.e(3710).then(n.bind(n,330)),"@site/docs/python/opendevin/sandbox/plugins/requirement.md",330],"0a038435":[()=>n.e(9445).then(n.bind(n,5135)),"@site/docs/python/opendevin/plan.md",5135],"0af59dc2":[()=>n.e(3741).then(n.bind(n,9176)),"@site/docs/python/opendevin/logger.md",9176],"129b4986":[()=>n.e(3560).then(n.bind(n,3700)),"@site/docs/python/opendevin/observation/files.md",3700],"149d2c0b":[()=>n.e(276).then(n.bind(n,4927)),"@site/docs/python/opendevin/server/agent/agent.md",4927],17896441:[()=>Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,4313)),"@theme/DocItem",4313],"19826e21":[()=>n.e(9867).then(n.bind(n,729)),"@site/docs/python/opendevin/server/session/msg_stack.md",729],"1df93b7f":[()=>Promise.all([n.e(1869),n.e(4583)]).then(n.bind(n,1014)),"@site/src/pages/index.tsx",1014],"241f2d2b":[()=>n.e(5566).then(n.bind(n,9077)),"@site/docs/python/observation/delegate.md",9077],"280598d2":[()=>n.e(2205).then(n.bind(n,1620)),"@site/docs/python/opendevin/sandbox/plugins/mixin.md",1620],"28801d74":[()=>n.e(4675).then(n.bind(n,738)),"@site/docs/python/codeact_agent/codeact_agent.md",738],"2a19c2bb":[()=>n.e(3665).then(n.bind(n,7420)),"@site/docs/python/opendevin/server/session/manager.md",7420],"2bcf47f1":[()=>n.e(7440).then(n.bind(n,3820)),"@site/docs/python/opendevin/action/fileop.md",3820],"2bdcc17b":[()=>n.e(5095).then(n.bind(n,8044)),"@site/docs/python/opendevin/observation/delegate.md",8044],"2f886f65":[()=>n.e(7400).then(n.bind(n,3231)),"@site/docs/python/opendevin/action/__init__.md",3231],"2fb7ca26":[()=>n.e(7722).then(n.bind(n,8695)),"@site/docs/python/opendevin/utils/system.md",8695],"33f11751":[()=>n.e(3860).then(n.bind(n,9048)),"@site/docs/usage/llms/azureLLMs.md",9048],"36ebda83":[()=>n.e(1087).then(n.bind(n,7949)),"@site/docs/python/opendevin/observation/__init__.md",7949],"37b15e81":[()=>n.e(2465).then(n.bind(n,95)),"@site/docs/python/agenthub/monologue_agent/utils/prompts.md",95],"3bc74c27":[()=>n.e(8524).then(n.bind(n,8434)),"@site/docs/python/files.md",8434],"3e51433d":[()=>n.e(1535).then(n.bind(n,9712)),"@site/docs/python/server/session/msg_stack.md",9712],"40be84db":[()=>n.e(5670).then(n.bind(n,282)),"@site/docs/python/opendevin/observation/recall.md",282],"472242d7":[()=>n.e(2685).then(n.bind(n,5233)),"@site/docs/python/logger.md",5233],"4753dddc":[()=>n.e(5463).then(n.bind(n,1634)),"@site/docs/python/server/listen.md",1634],"48209c71":[()=>n.e(4817).then(n.bind(n,2595)),"@site/docs/python/sandbox/plugins/mixin.md",2595],"48804a35":[()=>n.e(5886).then(n.bind(n,296)),"@site/docs/python/opendevin/action/base.md",296],"4b879815":[()=>n.e(8979).then(n.bind(n,2443)),"@site/docs/python/observation/base.md",2443],"4bbfebcc":[()=>n.e(2934).then(n.bind(n,5247)),"@site/docs/usage/about.md",5247],52071558:[()=>n.e(144).then(n.bind(n,3858)),"@site/docs/python/server/session/session.md",3858],"5246e7a7":[()=>n.e(700).then(n.bind(n,3463)),"@site/docs/python/action/fileop.md",3463],"5412fff2":[()=>n.e(1033).then(n.bind(n,1512)),"@site/docs/python/monologue_agent/utils/memory.md",1512],"5493cb6f":[()=>n.e(9303).then(n.bind(n,2560)),"@site/docs/usage/intro.mdx",2560],"54d6b847":[()=>n.e(7251).then(n.bind(n,2273)),"@site/docs/python/opendevin/files.md",2273],"5b169c1f":[()=>n.e(8670).then(n.bind(n,3065)),"@site/docs/python/agenthub/monologue_agent/utils/memory.md",3065],"5de541ca":[()=>n.e(6335).then(n.bind(n,2272)),"@site/docs/python/monologue_agent/agent.md",2272],"5e3a92ae":[()=>n.e(4774).then(n.bind(n,2605)),"@site/docs/python/opendevin/sandbox/e2b/sandbox.md",2605],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"60d4308b":[()=>n.e(3186).then(n.bind(n,650)),"@site/docs/python/opendevin/schema/observation.md",650],"662652d6":[()=>n.e(8716).then(n.bind(n,3359)),"@site/docs/python/observation/files.md",3359],"669d2fb4":[()=>n.e(8730).then(n.bind(n,1585)),"@site/docs/python/opendevin/server/auth/auth.md",1585],"67fae27e":[()=>n.e(5724).then(n.bind(n,9007)),"@site/docs/python/observation/message.md",9007],"68c038dc":[()=>n.e(2166).then(n.bind(n,8212)),"@site/docs/python/delegator_agent/agent.md",8212],"6c0b43a2":[()=>n.e(8078).then(n.t.bind(n,4061,19)),"/Users/alex/Documents/Work/CMU/OpenDevin.nosync/docs/.docusaurus/docusaurus-plugin-content-pages/default/plugin-route-context-module-100.json",4061],"6d0f81ff":[()=>n.e(8486).then(n.bind(n,5370)),"@site/docs/python/action/tasks.md",5370],"6fa566de":[()=>n.e(8808).then(n.bind(n,5031)),"@site/docs/python/opendevin/schema/task.md",5031],"71601b48":[()=>n.e(3848).then(n.bind(n,9738)),"@site/docs/usage/troubleshooting/windows.md",9738],"728ae092":[()=>n.e(8267).then(n.bind(n,4951)),"@site/docs/python/agenthub/monologue_agent/agent.md",4951],"73b24ddd":[()=>n.e(2173).then(n.bind(n,7004)),"@site/docs/python/monologue_agent/utils/prompts.md",7004],"74f506f5":[()=>n.e(9824).then(n.bind(n,7465)),"@site/docs/python/opendevin/main.md",7465],"77a072c5":[()=>n.e(9473).then(n.bind(n,9943)),"@site/docs/python/schema/action.md",9943],"7a3df8fe":[()=>n.e(691).then(n.bind(n,6326)),"@site/docs/python/opendevin/observation/run.md",6326],"7c083d5c":[()=>n.e(9420).then(n.bind(n,3250)),"@site/docs/usage/agents.md",3250],"7c4044b6":[()=>n.e(2973).then(n.bind(n,3323)),"@site/docs/python/opendevin/agent.md",3323],"81dcebe5":[()=>n.e(6362).then(n.bind(n,654)),"@site/docs/python/opendevin/sandbox/docker/process.md",654],"822f9405":[()=>n.e(5943).then(n.bind(n,3955)),"@site/docs/python/opendevin/server/session/session.md",3955],"858ab766":[()=>n.e(4162).then(n.bind(n,2801)),"@site/docs/python/opendevin/sandbox/plugins/jupyter/__init__.md",2801],"8625080f":[()=>n.e(6152).then(n.bind(n,1968)),"@site/docs/python/agent.md",1968],"8698cc2c":[()=>n.e(8605).then(n.bind(n,8916)),"@site/docs/python/planner_agent/prompt.md",8916],"8c67e2e5":[()=>n.e(1346).then(n.bind(n,9250)),"@site/docs/python/controller/agent_controller.md",9250],"8e39f6b9":[()=>n.e(117).then(n.bind(n,3679)),"@site/docs/python/sandbox/docker/process.md",3679],"9062f025":[()=>n.e(9261).then(n.bind(n,678)),"@site/docs/python/SWE_agent/parser.md",678],"935f2afb":[()=>n.e(8581).then(n.t.bind(n,5610,19)),"~docs/default/version-current-metadata-prop-751.json",5610],"93fbbd20":[()=>n.e(2455).then(n.bind(n,1412)),"@site/docs/python/sandbox/plugins/jupyter/__init__.md",1412],"955c06e6":[()=>n.e(958).then(n.bind(n,8315)),"@site/docs/usage/llms/llms.md",8315],"998453ed":[()=>n.e(4046).then(n.bind(n,569)),"@site/docs/python/planner_agent/agent.md",569],"99bc8fdd":[()=>n.e(8930).then(n.bind(n,863)),"@site/docs/python/opendevin/action/tasks.md",863],"9c03797e":[()=>n.e(7120).then(n.bind(n,3294)),"@site/docs/python/server/agent/agent.md",3294],"9c9a25fe":[()=>n.e(1533).then(n.bind(n,5266)),"@site/docs/python/observation/error.md",5266],"9d6e2b71":[()=>n.e(7647).then(n.bind(n,6724)),"@site/docs/usage/llms/googleLLMs.md",6724],a0da559b:[()=>n.e(4358).then(n.bind(n,1662)),"@site/docs/python/opendevin/config.md",1662],a150f81a:[()=>n.e(8102).then(n.t.bind(n,1966,19)),"/Users/alex/Documents/Work/CMU/OpenDevin.nosync/docs/.docusaurus/docusaurus-plugin-content-docs/default/plugin-route-context-module-100.json",1966],a1778e00:[()=>n.e(5138).then(n.bind(n,1506)),"@site/docs/python/monologue_agent/utils/monologue.md",1506],a25e84b4:[()=>n.e(9294).then(n.bind(n,7810)),"@site/src/pages/faq.tsx",7810],a303a078:[()=>n.e(942).then(n.bind(n,1473)),"@site/docs/python/agenthub/planner_agent/prompt.md",1473],a5673c89:[()=>n.e(4547).then(n.bind(n,2734)),"@site/docs/python/agenthub/planner_agent/agent.md",2734],a5b6ae45:[()=>n.e(7526).then(n.bind(n,1133)),"@site/docs/python/agenthub/codeact_agent/codeact_agent.md",1133],a5e0da4d:[()=>n.e(5527).then(n.bind(n,3409)),"@site/docs/usage/troubleshooting/troubleshooting.md",3409],a6721bfe:[()=>n.e(2395).then(n.bind(n,3805)),"@site/docs/python/monologue_agent/utils/json.md",3805],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,4532)),"@theme/DocVersionRoot",4532],a86dacba:[()=>n.e(8785).then(n.bind(n,5845)),"@site/docs/python/sandbox/plugins/requirement.md",5845],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,2559)),"@theme/DocRoot",2559],a94bae3d:[()=>n.e(5e3).then(n.bind(n,6309)),"@site/docs/python/opendevin/observation/browse.md",6309],aab75608:[()=>n.e(1913).then(n.bind(n,4197)),"@site/docs/python/observation/run.md",4197],ab526b7f:[()=>n.e(1052).then(n.bind(n,2859)),"@site/docs/python/agenthub/delegator_agent/agent.md",2859],abe37dfc:[()=>n.e(8254).then(n.bind(n,6668)),"@site/docs/python/main.md",6668],b092af1b:[()=>n.e(3016).then(n.bind(n,2235)),"@site/docs/python/agenthub/SWE_agent/parser.md",2235],b1235c84:[()=>n.e(6629).then(n.bind(n,2722)),"@site/docs/python/utils/system.md",2722],ba86bea2:[()=>n.e(5412).then(n.bind(n,9502)),"@site/docs/python/opendevin/server/listen.md",9502],bb03d9af:[()=>n.e(9832).then(n.bind(n,8820)),"@site/docs/usage/llms/localLLMs.md",8820],c49b4ca3:[()=>n.e(6100).then(n.bind(n,6904)),"@site/docs/python/schema/task.md",6904],c5a70b49:[()=>n.e(2940).then(n.bind(n,9332)),"@site/docs/python/observation/browse.md",9332],c5bd584a:[()=>n.e(711).then(n.bind(n,6148)),"@site/docs/python/opendevin/schema/action.md",6148],c78811ab:[()=>n.e(170).then(n.bind(n,6244)),"@site/docs/python/server/agent/manager.md",6244],ce99aea4:[()=>n.e(3928).then(n.bind(n,6723)),"@site/docs/python/observation/recall.md",6723],d021f14c:[()=>n.e(6388).then(n.bind(n,2497)),"@site/docs/python/opendevin/observation/error.md",2497],dda3f5b2:[()=>n.e(7464).then(n.bind(n,5224)),"@site/docs/python/opendevin/observation/message.md",5224],e1a173b2:[()=>n.e(7677).then(n.bind(n,5807)),"@site/docs/python/agenthub/SWE_agent/agent.md",5807],e57dadd8:[()=>n.e(1727).then(n.bind(n,3105)),"@site/docs/python/agenthub/monologue_agent/utils/monologue.md",3105],e783f6e2:[()=>n.e(493).then(n.bind(n,9276)),"@site/docs/python/agenthub/micro/agent.md",9276],ea306689:[()=>n.e(8973).then(n.bind(n,2807)),"@site/docs/python/schema/observation.md",2807],ec0eb2c8:[()=>n.e(919).then(n.bind(n,2520)),"@site/docs/python/server/auth/auth.md",2520],ec5e396f:[()=>n.e(2921).then(n.bind(n,1625)),"@site/docs/python/opendevin/llm/llm.md",1625],ed4ea48b:[()=>n.e(5420).then(n.bind(n,6248)),"@site/docs/python/action/__init__.md",6248],ed95afb7:[()=>n.e(7070).then(n.bind(n,3601)),"@site/docs/python/server/session/manager.md",3601],ee17c702:[()=>n.e(4057).then(n.bind(n,5050)),"@site/docs/python/opendevin/observation/base.md",5050],f4941030:[()=>n.e(416).then(n.bind(n,9906)),"@site/docs/python/sandbox/e2b/sandbox.md",9906],f51bf8b0:[()=>n.e(321).then(n.bind(n,6644)),"@site/docs/python/SWE_agent/agent.md",6644],f9c6dd8d:[()=>n.e(707).then(n.bind(n,8799)),"@site/docs/python/config.md",8799],fb32c487:[()=>n.e(9822).then(n.bind(n,505)),"@site/docs/python/opendevin/controller/agent_controller.md",505],fedb27cf:[()=>n.e(4640).then(n.bind(n,640)),"@site/docs/python/agenthub/monologue_agent/utils/json.md",640],ff0d9598:[()=>n.e(7050).then(n.bind(n,3528)),"@site/docs/python/observation/__init__.md",3528],ff4b4bcd:[()=>n.e(3518).then(n.bind(n,2137)),"@site/docs/python/opendevin/server/agent/manager.md",2137]};var s=n(4848);function l(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(6921),u=n(3102);function d(e,t){if("*"===e)return o()({loading:l,loader:()=>n.e(2237).then(n.bind(n,2237)),modules:["@theme/NotFound"],webpack:()=>[2237],render(e,t){const n=e.default;return(0,s.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,{...t})})}});const r=a[`${e}-${t}`],d={},p=[],f=[],h=(0,c.A)(r);return Object.entries(h).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),o().Map({loading:l,loader:d,modules:p,webpack:()=>f,render(t,n){const o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let i=o;const s=n.split(".");s.slice(0,-1).forEach((e=>{i=i[e]})),i[s[s.length-1]]=a}));const a=o.__comp;delete o.__comp;const i=o.__context;return delete o.__context,(0,s.jsx)(u.W,{value:i,children:(0,s.jsx)(a,{...o,...n})})}})}const p=[{path:"/OpenDevin/",component:d("/OpenDevin/","9f4"),exact:!0},{path:"/OpenDevin/faq",component:d("/OpenDevin/faq","3af"),exact:!0},{path:"/OpenDevin/docs",component:d("/OpenDevin/docs","670"),routes:[{path:"/OpenDevin/docs",component:d("/OpenDevin/docs","ab9"),routes:[{path:"/OpenDevin/docs",component:d("/OpenDevin/docs","8e6"),routes:[{path:"/OpenDevin/docs/python/action/__init__",component:d("/OpenDevin/docs/python/action/__init__","0a9"),exact:!0},{path:"/OpenDevin/docs/python/action/base",component:d("/OpenDevin/docs/python/action/base","78f"),exact:!0},{path:"/OpenDevin/docs/python/action/fileop",component:d("/OpenDevin/docs/python/action/fileop","335"),exact:!0},{path:"/OpenDevin/docs/python/action/tasks",component:d("/OpenDevin/docs/python/action/tasks","d9d"),exact:!0},{path:"/OpenDevin/docs/python/agent",component:d("/OpenDevin/docs/python/agent","934"),exact:!0},{path:"/OpenDevin/docs/python/agenthub/codeact_agent",component:d("/OpenDevin/docs/python/agenthub/codeact_agent","4f1"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/delegator_agent/agent",component:d("/OpenDevin/docs/python/agenthub/delegator_agent/agent","005"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/micro/agent",component:d("/OpenDevin/docs/python/agenthub/micro/agent","ff0"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/monologue_agent/agent",component:d("/OpenDevin/docs/python/agenthub/monologue_agent/agent","200"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/json",component:d("/OpenDevin/docs/python/agenthub/monologue_agent/utils/json","b07"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/memory",component:d("/OpenDevin/docs/python/agenthub/monologue_agent/utils/memory","6bc"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/monologue",component:d("/OpenDevin/docs/python/agenthub/monologue_agent/utils/monologue","37e"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/monologue_agent/utils/prompts",component:d("/OpenDevin/docs/python/agenthub/monologue_agent/utils/prompts","e5f"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/planner_agent/agent",component:d("/OpenDevin/docs/python/agenthub/planner_agent/agent","71a"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/planner_agent/prompt",component:d("/OpenDevin/docs/python/agenthub/planner_agent/prompt","256"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/SWE_agent/agent",component:d("/OpenDevin/docs/python/agenthub/SWE_agent/agent","073"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/agenthub/SWE_agent/parser",component:d("/OpenDevin/docs/python/agenthub/SWE_agent/parser","b54"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/codeact_agent",component:d("/OpenDevin/docs/python/codeact_agent","ac3"),exact:!0},{path:"/OpenDevin/docs/python/config",component:d("/OpenDevin/docs/python/config","b54"),exact:!0},{path:"/OpenDevin/docs/python/controller/agent_controller",component:d("/OpenDevin/docs/python/controller/agent_controller","250"),exact:!0},{path:"/OpenDevin/docs/python/delegator_agent/agent",component:d("/OpenDevin/docs/python/delegator_agent/agent","b34"),exact:!0},{path:"/OpenDevin/docs/python/files",component:d("/OpenDevin/docs/python/files","fda"),exact:!0},{path:"/OpenDevin/docs/python/logger",component:d("/OpenDevin/docs/python/logger","846"),exact:!0},{path:"/OpenDevin/docs/python/main",component:d("/OpenDevin/docs/python/main","fc4"),exact:!0},{path:"/OpenDevin/docs/python/monologue_agent/agent",component:d("/OpenDevin/docs/python/monologue_agent/agent","a14"),exact:!0},{path:"/OpenDevin/docs/python/monologue_agent/utils/json",component:d("/OpenDevin/docs/python/monologue_agent/utils/json","6f7"),exact:!0},{path:"/OpenDevin/docs/python/monologue_agent/utils/memory",component:d("/OpenDevin/docs/python/monologue_agent/utils/memory","2a3"),exact:!0},{path:"/OpenDevin/docs/python/monologue_agent/utils/monologue",component:d("/OpenDevin/docs/python/monologue_agent/utils/monologue","565"),exact:!0},{path:"/OpenDevin/docs/python/monologue_agent/utils/prompts",component:d("/OpenDevin/docs/python/monologue_agent/utils/prompts","783"),exact:!0},{path:"/OpenDevin/docs/python/observation/__init__",component:d("/OpenDevin/docs/python/observation/__init__","24c"),exact:!0},{path:"/OpenDevin/docs/python/observation/base",component:d("/OpenDevin/docs/python/observation/base","a0a"),exact:!0},{path:"/OpenDevin/docs/python/observation/browse",component:d("/OpenDevin/docs/python/observation/browse","f1a"),exact:!0},{path:"/OpenDevin/docs/python/observation/delegate",component:d("/OpenDevin/docs/python/observation/delegate","277"),exact:!0},{path:"/OpenDevin/docs/python/observation/error",component:d("/OpenDevin/docs/python/observation/error","8f7"),exact:!0},{path:"/OpenDevin/docs/python/observation/files",component:d("/OpenDevin/docs/python/observation/files","010"),exact:!0},{path:"/OpenDevin/docs/python/observation/message",component:d("/OpenDevin/docs/python/observation/message","d21"),exact:!0},{path:"/OpenDevin/docs/python/observation/recall",component:d("/OpenDevin/docs/python/observation/recall","5a3"),exact:!0},{path:"/OpenDevin/docs/python/observation/run",component:d("/OpenDevin/docs/python/observation/run","e99"),exact:!0},{path:"/OpenDevin/docs/python/opendevin/action/__init__",component:d("/OpenDevin/docs/python/opendevin/action/__init__","2c1"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/action/base",component:d("/OpenDevin/docs/python/opendevin/action/base","491"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/action/fileop",component:d("/OpenDevin/docs/python/opendevin/action/fileop","541"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/action/tasks",component:d("/OpenDevin/docs/python/opendevin/action/tasks","731"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/agent",component:d("/OpenDevin/docs/python/opendevin/agent","710"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/config",component:d("/OpenDevin/docs/python/opendevin/config","24b"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/controller/agent_controller",component:d("/OpenDevin/docs/python/opendevin/controller/agent_controller","617"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/files",component:d("/OpenDevin/docs/python/opendevin/files","5d2"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/llm",component:d("/OpenDevin/docs/python/opendevin/llm","b92"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/logger",component:d("/OpenDevin/docs/python/opendevin/logger","9cc"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/main",component:d("/OpenDevin/docs/python/opendevin/main","b35"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/observation/__init__",component:d("/OpenDevin/docs/python/opendevin/observation/__init__","aa3"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/observation/base",component:d("/OpenDevin/docs/python/opendevin/observation/base","d5c"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/observation/browse",component:d("/OpenDevin/docs/python/opendevin/observation/browse","aff"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/observation/delegate",component:d("/OpenDevin/docs/python/opendevin/observation/delegate","1f2"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/observation/error",component:d("/OpenDevin/docs/python/opendevin/observation/error","497"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/observation/files",component:d("/OpenDevin/docs/python/opendevin/observation/files","aac"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/observation/message",component:d("/OpenDevin/docs/python/opendevin/observation/message","fb1"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/observation/recall",component:d("/OpenDevin/docs/python/opendevin/observation/recall","4cc"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/observation/run",component:d("/OpenDevin/docs/python/opendevin/observation/run","3c9"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/plan",component:d("/OpenDevin/docs/python/opendevin/plan","066"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/sandbox/docker/process",component:d("/OpenDevin/docs/python/opendevin/sandbox/docker/process","4a6"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/sandbox/e2b/sandbox",component:d("/OpenDevin/docs/python/opendevin/sandbox/e2b/sandbox","3c9"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/sandbox/plugins/jupyter/__init__",component:d("/OpenDevin/docs/python/opendevin/sandbox/plugins/jupyter/__init__","c11"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/sandbox/plugins/mixin",component:d("/OpenDevin/docs/python/opendevin/sandbox/plugins/mixin","02d"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/sandbox/plugins/requirement",component:d("/OpenDevin/docs/python/opendevin/sandbox/plugins/requirement","681"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/schema/action",component:d("/OpenDevin/docs/python/opendevin/schema/action","fae"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/schema/observation",component:d("/OpenDevin/docs/python/opendevin/schema/observation","b7f"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/schema/task",component:d("/OpenDevin/docs/python/opendevin/schema/task","a29"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/server/agent",component:d("/OpenDevin/docs/python/opendevin/server/agent","6cc"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/server/agent/manager",component:d("/OpenDevin/docs/python/opendevin/server/agent/manager","4b7"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/server/auth",component:d("/OpenDevin/docs/python/opendevin/server/auth","853"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/server/listen",component:d("/OpenDevin/docs/python/opendevin/server/listen","519"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/server/session",component:d("/OpenDevin/docs/python/opendevin/server/session","e55"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/server/session/manager",component:d("/OpenDevin/docs/python/opendevin/server/session/manager","769"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/server/session/msg_stack",component:d("/OpenDevin/docs/python/opendevin/server/session/msg_stack","ac8"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/opendevin/utils/system",component:d("/OpenDevin/docs/python/opendevin/utils/system","665"),exact:!0,sidebar:"apiSidebar"},{path:"/OpenDevin/docs/python/plan",component:d("/OpenDevin/docs/python/plan","58e"),exact:!0},{path:"/OpenDevin/docs/python/planner_agent/agent",component:d("/OpenDevin/docs/python/planner_agent/agent","c30"),exact:!0},{path:"/OpenDevin/docs/python/planner_agent/prompt",component:d("/OpenDevin/docs/python/planner_agent/prompt","c27"),exact:!0},{path:"/OpenDevin/docs/python/sandbox/docker/process",component:d("/OpenDevin/docs/python/sandbox/docker/process","550"),exact:!0},{path:"/OpenDevin/docs/python/sandbox/e2b/sandbox",component:d("/OpenDevin/docs/python/sandbox/e2b/sandbox","362"),exact:!0},{path:"/OpenDevin/docs/python/sandbox/plugins/jupyter/__init__",component:d("/OpenDevin/docs/python/sandbox/plugins/jupyter/__init__","698"),exact:!0},{path:"/OpenDevin/docs/python/sandbox/plugins/mixin",component:d("/OpenDevin/docs/python/sandbox/plugins/mixin","9a9"),exact:!0},{path:"/OpenDevin/docs/python/sandbox/plugins/requirement",component:d("/OpenDevin/docs/python/sandbox/plugins/requirement","f2b"),exact:!0},{path:"/OpenDevin/docs/python/schema/action",component:d("/OpenDevin/docs/python/schema/action","15e"),exact:!0},{path:"/OpenDevin/docs/python/schema/observation",component:d("/OpenDevin/docs/python/schema/observation","d85"),exact:!0},{path:"/OpenDevin/docs/python/schema/task",component:d("/OpenDevin/docs/python/schema/task","300"),exact:!0},{path:"/OpenDevin/docs/python/server/agent",component:d("/OpenDevin/docs/python/server/agent","4dd"),exact:!0},{path:"/OpenDevin/docs/python/server/agent/manager",component:d("/OpenDevin/docs/python/server/agent/manager","c0a"),exact:!0},{path:"/OpenDevin/docs/python/server/auth",component:d("/OpenDevin/docs/python/server/auth","237"),exact:!0},{path:"/OpenDevin/docs/python/server/listen",component:d("/OpenDevin/docs/python/server/listen","f6d"),exact:!0},{path:"/OpenDevin/docs/python/server/session",component:d("/OpenDevin/docs/python/server/session","719"),exact:!0},{path:"/OpenDevin/docs/python/server/session/manager",component:d("/OpenDevin/docs/python/server/session/manager","297"),exact:!0},{path:"/OpenDevin/docs/python/server/session/msg_stack",component:d("/OpenDevin/docs/python/server/session/msg_stack","527"),exact:!0},{path:"/OpenDevin/docs/python/SWE_agent/agent",component:d("/OpenDevin/docs/python/SWE_agent/agent","93c"),exact:!0},{path:"/OpenDevin/docs/python/SWE_agent/parser",component:d("/OpenDevin/docs/python/SWE_agent/parser","e9e"),exact:!0},{path:"/OpenDevin/docs/python/utils/system",component:d("/OpenDevin/docs/python/utils/system","9c9"),exact:!0},{path:"/OpenDevin/docs/usage/about",component:d("/OpenDevin/docs/usage/about","55b"),exact:!0,sidebar:"docsSidebar"},{path:"/OpenDevin/docs/usage/agents",component:d("/OpenDevin/docs/usage/agents","378"),exact:!0,sidebar:"docsSidebar"},{path:"/OpenDevin/docs/usage/intro",component:d("/OpenDevin/docs/usage/intro","c35"),exact:!0,sidebar:"docsSidebar"},{path:"/OpenDevin/docs/usage/llms",component:d("/OpenDevin/docs/usage/llms","8ea"),exact:!0,sidebar:"docsSidebar"},{path:"/OpenDevin/docs/usage/llms/azureLLMs",component:d("/OpenDevin/docs/usage/llms/azureLLMs","efb"),exact:!0,sidebar:"docsSidebar"},{path:"/OpenDevin/docs/usage/llms/googleLLMs",component:d("/OpenDevin/docs/usage/llms/googleLLMs","609"),exact:!0,sidebar:"docsSidebar"},{path:"/OpenDevin/docs/usage/llms/localLLMs",component:d("/OpenDevin/docs/usage/llms/localLLMs","aa7"),exact:!0,sidebar:"docsSidebar"},{path:"/OpenDevin/docs/usage/troubleshooting",component:d("/OpenDevin/docs/usage/troubleshooting","c97"),exact:!0,sidebar:"docsSidebar"},{path:"/OpenDevin/docs/usage/troubleshooting/windows",component:d("/OpenDevin/docs/usage/troubleshooting/windows","a09"),exact:!0,sidebar:"docsSidebar"}]}]}]},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>i});var r=n(6540),o=n(4848);const a=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,o.jsx)(a.Provider,{value:n,children:t})}},8536:(e,t,n)=>{"use strict";var r=n(6540),o=n(5338),a=n(4625),i=n(545),s=n(8193);const l=[n(119),n(6134),n(6294),n(1043)];var c=n(8328),u=n(6347),d=n(2831),p=n(4848);function f(e){let{children:t}=e;return(0,p.jsx)(p.Fragment,{children:t})}var h=n(5260),m=n(4586),g=n(6025),y=n(6342),b=n(1003),v=n(2131),w=n(4090),k=n(2967),x=n(440),S=n(1463);function _(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,m.A)(),r=(0,v.o)(),o=n[e].htmlLang,a=e=>e.replace("-","_");return(0,p.jsxs)(h.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,p.jsx)("meta",{property:"og:locale",content:a(o)}),Object.values(n).filter((e=>o!==e.htmlLang)).map((e=>(0,p.jsx)("meta",{property:"og:locale:alternate",content:a(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function O(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,m.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,m.A)(),{pathname:r}=(0,u.zy)();return e+(0,x.applyTrailingSlash)((0,g.A)(r),{trailingSlash:n,baseUrl:t})}(),o=t?`${n}${t}`:r;return(0,p.jsxs)(h.A,{children:[(0,p.jsx)("meta",{property:"og:url",content:o}),(0,p.jsx)("link",{rel:"canonical",href:o})]})}function E(){const{i18n:{currentLocale:e}}=(0,m.A)(),{metadata:t,image:n}=(0,y.p)();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(h.A,{children:[(0,p.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,p.jsx)("body",{className:w.w})]}),n&&(0,p.jsx)(b.be,{image:n}),(0,p.jsx)(O,{}),(0,p.jsx)(_,{}),(0,p.jsx)(S.A,{tag:k.Cy,locale:e}),(0,p.jsx)(h.A,{children:t.map(((e,t)=>(0,p.jsx)("meta",{...e},t)))})]})}const D=new Map;function C(e){if(D.has(e.pathname))return{...e,pathname:D.get(e.pathname)};if((0,d.u)(c.A,e.pathname).some((e=>{let{route:t}=e;return!0===t.exact})))return D.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return D.set(e.pathname,t),{...e,pathname:t}}var A=n(6125),T=n(6988),j=n(205);function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>o.forEach((e=>e?.()))}const N=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,j.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,o=t.hash===n.hash,a=t.search===n.search;if(r&&o&&!a)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),L("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function R(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,d.u)(c.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class P extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=s.A.canUseDOM?L("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=L("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),R(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,p.jsx)(N,{previousLocation:this.previousLocation,location:t,children:(0,p.jsx)(u.qh,{location:t,render:()=>e})})}}const M=P,I="__docusaurus-base-url-issue-banner-container",F="__docusaurus-base-url-issue-banner",z="__docusaurus-base-url-issue-banner-suggestion-container";function B(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${I}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;o?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var Y=n(6921);const Z=new Set,X=new Set,J=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ee={prefetch(e){if(!(e=>!J()&&!X.has(e)&&!Z.has(e))(e))return!1;Z.add(e);const t=(0,d.u)(c.A,e).flatMap((e=>{return t=e.route.path,Object.entries(Q).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,Y.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?K(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!J()&&!X.has(e))(e)&&(X.add(e),R(e))},te=Object.freeze(ee),ne=Boolean(!0);if(s.A.canUseDOM){window.docusaurus=te;const e=document.getElementById("__docusaurus"),t=(0,p.jsx)(i.vd,{children:(0,p.jsx)(a.Kd,{children:(0,p.jsx)(V,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},s=()=>{if(ne)r.startTransition((()=>{o.hydrateRoot(e,t,{onRecoverableError:n})}));else{const a=o.createRoot(e,{onRecoverableError:n});r.startTransition((()=>{a.render(t)}))}};R(window.location.pathname).then(s)}},6988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(6540),o=n(4784);const a=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/OpenDevin/docs","versions":[{"name":"current","label":"Next","isLast":true,"path":"/OpenDevin/docs","mainDocId":"usage/intro","docs":[{"id":"python/action/__init__","path":"/OpenDevin/docs/python/action/__init__"},{"id":"python/action/base","path":"/OpenDevin/docs/python/action/base"},{"id":"python/action/fileop","path":"/OpenDevin/docs/python/action/fileop"},{"id":"python/action/tasks","path":"/OpenDevin/docs/python/action/tasks"},{"id":"python/agent","path":"/OpenDevin/docs/python/agent"},{"id":"python/agenthub/codeact_agent/codeact_agent","path":"/OpenDevin/docs/python/agenthub/codeact_agent/","sidebar":"apiSidebar"},{"id":"python/agenthub/delegator_agent/agent","path":"/OpenDevin/docs/python/agenthub/delegator_agent/agent","sidebar":"apiSidebar"},{"id":"python/agenthub/micro/agent","path":"/OpenDevin/docs/python/agenthub/micro/agent","sidebar":"apiSidebar"},{"id":"python/agenthub/monologue_agent/agent","path":"/OpenDevin/docs/python/agenthub/monologue_agent/agent","sidebar":"apiSidebar"},{"id":"python/agenthub/monologue_agent/utils/json","path":"/OpenDevin/docs/python/agenthub/monologue_agent/utils/json","sidebar":"apiSidebar"},{"id":"python/agenthub/monologue_agent/utils/memory","path":"/OpenDevin/docs/python/agenthub/monologue_agent/utils/memory","sidebar":"apiSidebar"},{"id":"python/agenthub/monologue_agent/utils/monologue","path":"/OpenDevin/docs/python/agenthub/monologue_agent/utils/monologue","sidebar":"apiSidebar"},{"id":"python/agenthub/monologue_agent/utils/prompts","path":"/OpenDevin/docs/python/agenthub/monologue_agent/utils/prompts","sidebar":"apiSidebar"},{"id":"python/agenthub/planner_agent/agent","path":"/OpenDevin/docs/python/agenthub/planner_agent/agent","sidebar":"apiSidebar"},{"id":"python/agenthub/planner_agent/prompt","path":"/OpenDevin/docs/python/agenthub/planner_agent/prompt","sidebar":"apiSidebar"},{"id":"python/agenthub/SWE_agent/agent","path":"/OpenDevin/docs/python/agenthub/SWE_agent/agent","sidebar":"apiSidebar"},{"id":"python/agenthub/SWE_agent/parser","path":"/OpenDevin/docs/python/agenthub/SWE_agent/parser","sidebar":"apiSidebar"},{"id":"python/codeact_agent/codeact_agent","path":"/OpenDevin/docs/python/codeact_agent/"},{"id":"python/config","path":"/OpenDevin/docs/python/config"},{"id":"python/controller/agent_controller","path":"/OpenDevin/docs/python/controller/agent_controller"},{"id":"python/delegator_agent/agent","path":"/OpenDevin/docs/python/delegator_agent/agent"},{"id":"python/files","path":"/OpenDevin/docs/python/files"},{"id":"python/logger","path":"/OpenDevin/docs/python/logger"},{"id":"python/main","path":"/OpenDevin/docs/python/main"},{"id":"python/monologue_agent/agent","path":"/OpenDevin/docs/python/monologue_agent/agent"},{"id":"python/monologue_agent/utils/json","path":"/OpenDevin/docs/python/monologue_agent/utils/json"},{"id":"python/monologue_agent/utils/memory","path":"/OpenDevin/docs/python/monologue_agent/utils/memory"},{"id":"python/monologue_agent/utils/monologue","path":"/OpenDevin/docs/python/monologue_agent/utils/monologue"},{"id":"python/monologue_agent/utils/prompts","path":"/OpenDevin/docs/python/monologue_agent/utils/prompts"},{"id":"python/observation/__init__","path":"/OpenDevin/docs/python/observation/__init__"},{"id":"python/observation/base","path":"/OpenDevin/docs/python/observation/base"},{"id":"python/observation/browse","path":"/OpenDevin/docs/python/observation/browse"},{"id":"python/observation/delegate","path":"/OpenDevin/docs/python/observation/delegate"},{"id":"python/observation/error","path":"/OpenDevin/docs/python/observation/error"},{"id":"python/observation/files","path":"/OpenDevin/docs/python/observation/files"},{"id":"python/observation/message","path":"/OpenDevin/docs/python/observation/message"},{"id":"python/observation/recall","path":"/OpenDevin/docs/python/observation/recall"},{"id":"python/observation/run","path":"/OpenDevin/docs/python/observation/run"},{"id":"python/opendevin/action/__init__","path":"/OpenDevin/docs/python/opendevin/action/__init__","sidebar":"apiSidebar"},{"id":"python/opendevin/action/base","path":"/OpenDevin/docs/python/opendevin/action/base","sidebar":"apiSidebar"},{"id":"python/opendevin/action/fileop","path":"/OpenDevin/docs/python/opendevin/action/fileop","sidebar":"apiSidebar"},{"id":"python/opendevin/action/tasks","path":"/OpenDevin/docs/python/opendevin/action/tasks","sidebar":"apiSidebar"},{"id":"python/opendevin/agent","path":"/OpenDevin/docs/python/opendevin/agent","sidebar":"apiSidebar"},{"id":"python/opendevin/config","path":"/OpenDevin/docs/python/opendevin/config","sidebar":"apiSidebar"},{"id":"python/opendevin/controller/agent_controller","path":"/OpenDevin/docs/python/opendevin/controller/agent_controller","sidebar":"apiSidebar"},{"id":"python/opendevin/files","path":"/OpenDevin/docs/python/opendevin/files","sidebar":"apiSidebar"},{"id":"python/opendevin/llm/llm","path":"/OpenDevin/docs/python/opendevin/llm/","sidebar":"apiSidebar"},{"id":"python/opendevin/logger","path":"/OpenDevin/docs/python/opendevin/logger","sidebar":"apiSidebar"},{"id":"python/opendevin/main","path":"/OpenDevin/docs/python/opendevin/main","sidebar":"apiSidebar"},{"id":"python/opendevin/observation/__init__","path":"/OpenDevin/docs/python/opendevin/observation/__init__","sidebar":"apiSidebar"},{"id":"python/opendevin/observation/base","path":"/OpenDevin/docs/python/opendevin/observation/base","sidebar":"apiSidebar"},{"id":"python/opendevin/observation/browse","path":"/OpenDevin/docs/python/opendevin/observation/browse","sidebar":"apiSidebar"},{"id":"python/opendevin/observation/delegate","path":"/OpenDevin/docs/python/opendevin/observation/delegate","sidebar":"apiSidebar"},{"id":"python/opendevin/observation/error","path":"/OpenDevin/docs/python/opendevin/observation/error","sidebar":"apiSidebar"},{"id":"python/opendevin/observation/files","path":"/OpenDevin/docs/python/opendevin/observation/files","sidebar":"apiSidebar"},{"id":"python/opendevin/observation/message","path":"/OpenDevin/docs/python/opendevin/observation/message","sidebar":"apiSidebar"},{"id":"python/opendevin/observation/recall","path":"/OpenDevin/docs/python/opendevin/observation/recall","sidebar":"apiSidebar"},{"id":"python/opendevin/observation/run","path":"/OpenDevin/docs/python/opendevin/observation/run","sidebar":"apiSidebar"},{"id":"python/opendevin/plan","path":"/OpenDevin/docs/python/opendevin/plan","sidebar":"apiSidebar"},{"id":"python/opendevin/sandbox/docker/process","path":"/OpenDevin/docs/python/opendevin/sandbox/docker/process","sidebar":"apiSidebar"},{"id":"python/opendevin/sandbox/e2b/sandbox","path":"/OpenDevin/docs/python/opendevin/sandbox/e2b/sandbox","sidebar":"apiSidebar"},{"id":"python/opendevin/sandbox/plugins/jupyter/__init__","path":"/OpenDevin/docs/python/opendevin/sandbox/plugins/jupyter/__init__","sidebar":"apiSidebar"},{"id":"python/opendevin/sandbox/plugins/mixin","path":"/OpenDevin/docs/python/opendevin/sandbox/plugins/mixin","sidebar":"apiSidebar"},{"id":"python/opendevin/sandbox/plugins/requirement","path":"/OpenDevin/docs/python/opendevin/sandbox/plugins/requirement","sidebar":"apiSidebar"},{"id":"python/opendevin/schema/action","path":"/OpenDevin/docs/python/opendevin/schema/action","sidebar":"apiSidebar"},{"id":"python/opendevin/schema/observation","path":"/OpenDevin/docs/python/opendevin/schema/observation","sidebar":"apiSidebar"},{"id":"python/opendevin/schema/task","path":"/OpenDevin/docs/python/opendevin/schema/task","sidebar":"apiSidebar"},{"id":"python/opendevin/server/agent/agent","path":"/OpenDevin/docs/python/opendevin/server/agent/","sidebar":"apiSidebar"},{"id":"python/opendevin/server/agent/manager","path":"/OpenDevin/docs/python/opendevin/server/agent/manager","sidebar":"apiSidebar"},{"id":"python/opendevin/server/auth/auth","path":"/OpenDevin/docs/python/opendevin/server/auth/","sidebar":"apiSidebar"},{"id":"python/opendevin/server/listen","path":"/OpenDevin/docs/python/opendevin/server/listen","sidebar":"apiSidebar"},{"id":"python/opendevin/server/session/manager","path":"/OpenDevin/docs/python/opendevin/server/session/manager","sidebar":"apiSidebar"},{"id":"python/opendevin/server/session/msg_stack","path":"/OpenDevin/docs/python/opendevin/server/session/msg_stack","sidebar":"apiSidebar"},{"id":"python/opendevin/server/session/session","path":"/OpenDevin/docs/python/opendevin/server/session/","sidebar":"apiSidebar"},{"id":"python/opendevin/utils/system","path":"/OpenDevin/docs/python/opendevin/utils/system","sidebar":"apiSidebar"},{"id":"python/plan","path":"/OpenDevin/docs/python/plan"},{"id":"python/planner_agent/agent","path":"/OpenDevin/docs/python/planner_agent/agent"},{"id":"python/planner_agent/prompt","path":"/OpenDevin/docs/python/planner_agent/prompt"},{"id":"python/sandbox/docker/process","path":"/OpenDevin/docs/python/sandbox/docker/process"},{"id":"python/sandbox/e2b/sandbox","path":"/OpenDevin/docs/python/sandbox/e2b/sandbox"},{"id":"python/sandbox/plugins/jupyter/__init__","path":"/OpenDevin/docs/python/sandbox/plugins/jupyter/__init__"},{"id":"python/sandbox/plugins/mixin","path":"/OpenDevin/docs/python/sandbox/plugins/mixin"},{"id":"python/sandbox/plugins/requirement","path":"/OpenDevin/docs/python/sandbox/plugins/requirement"},{"id":"python/schema/action","path":"/OpenDevin/docs/python/schema/action"},{"id":"python/schema/observation","path":"/OpenDevin/docs/python/schema/observation"},{"id":"python/schema/task","path":"/OpenDevin/docs/python/schema/task"},{"id":"python/server/agent/agent","path":"/OpenDevin/docs/python/server/agent/"},{"id":"python/server/agent/manager","path":"/OpenDevin/docs/python/server/agent/manager"},{"id":"python/server/auth/auth","path":"/OpenDevin/docs/python/server/auth/"},{"id":"python/server/listen","path":"/OpenDevin/docs/python/server/listen"},{"id":"python/server/session/manager","path":"/OpenDevin/docs/python/server/session/manager"},{"id":"python/server/session/msg_stack","path":"/OpenDevin/docs/python/server/session/msg_stack"},{"id":"python/server/session/session","path":"/OpenDevin/docs/python/server/session/"},{"id":"python/SWE_agent/agent","path":"/OpenDevin/docs/python/SWE_agent/agent"},{"id":"python/SWE_agent/parser","path":"/OpenDevin/docs/python/SWE_agent/parser"},{"id":"python/utils/system","path":"/OpenDevin/docs/python/utils/system"},{"id":"usage/about","path":"/OpenDevin/docs/usage/about","sidebar":"docsSidebar"},{"id":"usage/agents","path":"/OpenDevin/docs/usage/agents","sidebar":"docsSidebar"},{"id":"usage/intro","path":"/OpenDevin/docs/usage/intro","sidebar":"docsSidebar"},{"id":"usage/llms/azureLLMs","path":"/OpenDevin/docs/usage/llms/azureLLMs","sidebar":"docsSidebar"},{"id":"usage/llms/googleLLMs","path":"/OpenDevin/docs/usage/llms/googleLLMs","sidebar":"docsSidebar"},{"id":"usage/llms/llms","path":"/OpenDevin/docs/usage/llms/","sidebar":"docsSidebar"},{"id":"usage/llms/localLLMs","path":"/OpenDevin/docs/usage/llms/localLLMs","sidebar":"docsSidebar"},{"id":"usage/troubleshooting/troubleshooting","path":"/OpenDevin/docs/usage/troubleshooting/","sidebar":"docsSidebar"},{"id":"usage/troubleshooting/windows","path":"/OpenDevin/docs/usage/troubleshooting/windows","sidebar":"docsSidebar"}],"draftIds":[],"sidebars":{"docsSidebar":{"link":{"path":"/OpenDevin/docs/usage/intro","label":"usage/intro"}},"apiSidebar":{"link":{"path":"/OpenDevin/docs/python/agenthub/SWE_agent/agent","label":"python/agenthub/SWE_agent/agent"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(2654);const l=JSON.parse('{"docusaurusVersion":"3.2.1","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.2.1"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.2.1"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.2.1"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.2.1"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.2.1"}}}');var c=n(4848);const u={siteConfig:o.default,siteMetadata:l,globalData:a,i18n:i,codeTranslations:s},d=r.createContext(u);function p(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},7489:(e,t,n)=>{"use strict";n.d(t,{A:()=>m});var r=n(6540),o=n(8193),a=n(5260),i=n(440),s=n(781),l=n(3102),c=n(4848);function u(e){let{error:t,tryAgain:n}=e;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(d,{error:t})]})}function d(e){let{error:t}=e;const n=(0,i.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){let{children:t}=e;return(0,c.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function f(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)(p,{children:(0,c.jsxs)(m,{fallback:()=>(0,c.jsx)(u,{error:t,tryAgain:n}),children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(s.A,{children:(0,c.jsx)(u,{error:t,tryAgain:n})})]})})}const h=e=>(0,c.jsx)(f,{...e});class m extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??h)(e)}return e??null}}},8193:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(545),o=n(4848);function a(e){return(0,o.jsx)(r.mg,{...e})}},8774:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(6540),o=n(4625),a=n(440),i=n(4586),s=n(6654),l=n(8193),c=n(3427),u=n(6025),d=n(4848);function p(e,t){let{isNavLink:n,to:p,href:f,activeClassName:h,isActive:m,"data-noBrokenLinkCheck":g,autoAddBaseUrl:y=!0,...b}=e;const{siteConfig:{trailingSlash:v,baseUrl:w}}=(0,i.A)(),{withBaseUrl:k}=(0,u.h)(),x=(0,c.A)(),S=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>S.current));const _=p||f;const O=(0,s.A)(_),E=_?.replace("pathname://","");let D=void 0!==E?(C=E,y&&(e=>e.startsWith("/"))(C)?k(C):C):void 0;var C;D&&O&&(D=(0,a.applyTrailingSlash)(D,{trailingSlash:v,baseUrl:w}));const A=(0,r.useRef)(!1),T=n?o.k2:o.N_,j=l.A.canUseIntersectionObserver,L=(0,r.useRef)(),N=()=>{A.current||null==D||(window.docusaurus.preload(D),A.current=!0)};(0,r.useEffect)((()=>(!j&&O&&null!=D&&window.docusaurus.prefetch(D),()=>{j&&L.current&&L.current.disconnect()})),[L,D,j,O]);const R=D?.startsWith("#")??!1,P=!b.target||"_self"===b.target,M=!D||!O||!P||R;return g||!R&&M||x.collectLink(D),b.id&&x.collectAnchor(b.id),M?(0,d.jsx)("a",{ref:S,href:D,..._&&!O&&{target:"_blank",rel:"noopener noreferrer"},...b}):(0,d.jsx)(T,{...b,onMouseEnter:N,onTouchStart:N,innerRef:e=>{S.current=e,j&&e&&O&&(L.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(L.current.unobserve(e),L.current.disconnect(),null!=D&&window.docusaurus.prefetch(D))}))})),L.current.observe(e))},to:D,...n&&{isActive:m,activeClassName:h}})}const f=r.forwardRef(p)},418:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=()=>null},1312:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,T:()=>l});var r=n(6540),o=n(4848);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(2654);function s(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return a(s({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const i=s({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(i,r)})}},7065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},6654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},6025:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,h:()=>i});var r=n(6540),o=n(4586),a=n(6654);function i(){const{siteConfig:{baseUrl:e,url:t}}=(0,o.A)(),n=(0,r.useCallback)(((n,r)=>function(e,t,n,r){let{forcePrependBaseUrl:o=!1,absolute:i=!1}=void 0===r?{}:r;if(!n||n.startsWith("#")||(0,a.z)(n))return n;if(o)return t+n.replace(/^\//,"");if(n===t.replace(/\/$/,""))return t;const s=n.startsWith(t)?n:t+n.replace(/^\//,"");return i?e+s:s}(t,e,n,r)),[t,e]);return{withBaseUrl:n}}function s(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},3427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(6540);n(4848);const o=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),a=()=>(0,r.useContext)(o);function i(){return a()}},4586:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(6988);function a(){return(0,r.useContext)(o.o)}},2303:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6540),o=n(6125);function a(){return(0,r.useContext)(o.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(6540);const o=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect},6921:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function o(e){const t={};return function e(n,o){Object.entries(n).forEach((n=>{let[a,i]=n;const s=o?`${o}.${a}`:a;r(i)?e(i,s):t[s]=i}))}(e),t}},3102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>a});var r=n(6540),o=n(4848);const a=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(a),s=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,o.jsx)(a.Provider,{value:s,children:t})}},4070:(e,t,n)=>{"use strict";n.d(t,{zK:()=>m,vT:()=>p,Gy:()=>u,HW:()=>g,ht:()=>d,r7:()=>h,jh:()=>f});var r=n(6347),o=n(4586),a=n(7065);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,o.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const s=e=>e.versions.find((e=>e.isLast));function l(e,t){const n=function(e,t){const n=s(e);return[...e.versions.filter((e=>e!==n)),n].find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}(e,t),o=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}}const c={},u=()=>i("docusaurus-plugin-content-docs")??c,d=e=>{try{return function(e,t,n){void 0===t&&(t=a.W),void 0===n&&(n={});const r=i(e),o=r?.[t];if(!o&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return o}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":` (pluginId=${e}`),{cause:t})}};function p(e){void 0===e&&(e={});const t=u(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const o=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return a}(t,n,e)}function f(e){return d(e).versions}function h(e){const t=d(e);return s(t)}function m(e){const t=d(e),{pathname:n}=(0,r.zy)();return l(t,n)}function g(e){const t=d(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=s(e);return{latestDocSuggestion:l(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},6294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(5947),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{o().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},6134:(e,t,n)=>{"use strict";n.r(t);var r=n(1765),o=n(4784);!function(e){const{themeConfig:{prism:t}}=o.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(9700),n(8692)(`./prism-${e}`)})),delete globalThis.Prism}(r.My)},1107:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(6540);var r=n(4164),o=n(1312),a=n(6342),i=n(8774),s=n(3427);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=n(4848);function u(e){let{as:t,id:n,...u}=e;const d=(0,s.A)(),{navbar:{hideOnScroll:p}}=(0,a.p)();if("h1"===t||!n)return(0,c.jsx)(t,{...u,id:void 0});d.collectAnchor(n);const f=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:n});return(0,c.jsxs)(t,{...u,className:(0,r.A)("anchor",p?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,u.className),id:n,children:[u.children,(0,c.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":f,title:f,children:"\u200b"})]})}},3186:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=n(4848);function a(e){let{width:t=13.5,height:n=13.5}=e;return(0,o.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},781:(e,t,n)=>{"use strict";n.d(t,{A:()=>ft});var r=n(6540),o=n(4164),a=n(7489),i=n(1003),s=n(6347),l=n(1312),c=n(5062),u=n(4848);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,s.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)}),[]);return(0,c.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}const h=(0,l.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function m(e){const t=e.children??h,{containerRef:n,onClick:r}=f();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":h,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var g=n(7559),y=n(4090);const b={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(m,{className:b.skipToContent})}var w=n(6342),k=n(5041);function x(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:o=1.2,className:a,...i}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,u.jsx)("g",{stroke:r,strokeWidth:o,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const S={closeButton:"closeButton_CVFx"};function _(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.A)("clean-btn close",S.closeButton,e.className),children:(0,u.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const O={content:"content_knG7"};function E(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,o.A)(O.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const D={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function C(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,k.Mj)();if(!t)return null;const{backgroundColor:r,textColor:o,isCloseable:a}=e;return(0,u.jsxs)("div",{className:D.announcementBar,style:{backgroundColor:r,color:o},role:"banner",children:[a&&(0,u.jsx)("div",{className:D.announcementBarPlaceholder}),(0,u.jsx)(E,{className:D.announcementBarContent}),a&&(0,u.jsx)(_,{onClick:n,className:D.announcementBarClose})]})}var A=n(9876),T=n(3104);var j=n(9532),L=n(5600);const N=r.createContext(null);function R(e){let{children:t}=e;const n=function(){const e=(0,A.M)(),t=(0,L.YL)(),[n,o]=(0,r.useState)(!1),a=null!==t.component,i=(0,j.ZC)(a);return(0,r.useEffect)((()=>{a&&!i&&o(!0)}),[a,i]),(0,r.useEffect)((()=>{a?e.shown||o(!0):o(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[n,o]),[n])}();return(0,u.jsx)(N.Provider,{value:n,children:t})}function P(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function M(){const e=(0,r.useContext)(N);if(!e)throw new j.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,o=(0,r.useCallback)((()=>n(!1)),[n]),a=(0,L.YL)();return(0,r.useMemo)((()=>({shown:t,hide:o,content:P(a)})),[o,a,t])}function I(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:a}=M();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var F=n(5293),z=n(2303);function B(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function $(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const U={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function q(e){let{className:t,buttonClassName:n,value:r,onChange:a}=e;const i=(0,z.A)(),s=(0,l.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,o.A)(U.toggle,t),children:(0,u.jsxs)("button",{className:(0,o.A)("clean-btn",U.toggleButton,!i&&U.toggleButtonDisabled,n),type:"button",onClick:()=>a("dark"===r?"light":"dark"),disabled:!i,title:s,"aria-label":s,"aria-live":"polite",children:[(0,u.jsx)(B,{className:(0,o.A)(U.toggleIcon,U.lightToggleIcon)}),(0,u.jsx)($,{className:(0,o.A)(U.toggleIcon,U.darkToggleIcon)})]})})}const W=r.memo(q),H={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function G(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:o,setColorMode:a}=(0,F.G)();return r?null:(0,u.jsx)(W,{className:t,buttonClassName:"dark"===n?H.darkNavbarColorModeToggle:void 0,value:o,onChange:a})}var V=n(3465);function Q(){return(0,u.jsx)(V.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){const e=(0,A.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(Q,{}),(0,u.jsx)(G,{className:"margin-right--md"}),(0,u.jsx)(K,{})]})}var Z=n(8774),X=n(6025),J=n(6654);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(3186);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:o,label:a,html:i,isDropdownLink:s,prependBaseUrlToHref:l,...c}=e;const d=(0,X.A)(r),p=(0,X.A)(t),f=(0,X.A)(o,{forcePrependBaseUrl:!0}),h=a&&o&&!(0,J.A)(o),m=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[a,h&&(0,u.jsx)(te.A,{...s&&{width:12,height:12}})]})};return o?(0,u.jsx)(Z.A,{href:l?f:o,...c,...m}):(0,u.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(p)},...c,...m})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const a=(0,u.jsx)(ne,{className:(0,o.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:a}):a}function oe(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ne,{className:(0,o.A)("menu__link",t),...r})})}function ae(e){let{mobile:t=!1,position:n,...r}=e;const o=t?oe:re;return(0,u.jsx)(o,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(1422),se=n(9169),le=n(4586);const ce={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ue(e,t){return e.some((e=>function(e,t){return!!(0,se.ys)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:a,onClick:i,...s}=e;const l=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),(0,u.jsxs)("div",{ref:l,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(ne,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:s.to?void 0:"#",className:(0,o.A)("navbar__link",a),...s,onClick:s.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:s.children??s.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Oe,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function pe(e){let{items:t,className:n,position:a,onClick:i,...l}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,le.A)(),{pathname:t}=(0,s.zy)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:p,toggleCollapsed:f,setCollapsed:h}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&h(!d)}),[c,d,h]),(0,u.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":p}),children:[(0,u.jsx)(ne,{role:"button",className:(0,o.A)(ce.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...l,onClick:e=>{e.preventDefault(),f()},children:l.children??l.label}),(0,u.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:p,children:t.map(((e,t)=>(0,r.createElement)(Oe,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function fe(e){let{mobile:t=!1,...n}=e;const r=t?pe:de;return(0,u.jsx)(r,{...n})}var he=n(2131);function me(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const ge="iconLanguage_nlXk";var ye=n(418);const be={navbarSearchContainer:"navbarSearchContainer_Bca1"};function ve(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,o.A)(n,be.navbarSearchContainer),children:t})}var we=n(4070),ke=n(1754);var xe=n(5597);const Se=e=>e.docs.find((t=>t.id===e.mainDocId));const _e={default:ae,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:o="",...a}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,le.A)(),p=(0,he.o)(),{search:f,hash:h}=(0,s.zy)(),m=[...n,...c.map((e=>{const n=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${h}${o}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],g=t?(0,l.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,u.jsx)(fe,{...a,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(me,{className:ge}),g]}),items:m})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(ve,{className:n,children:(0,u.jsx)(ye.A,{})})},dropdown:fe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:a=!1}=e;const i=a?"li":"div";return(0,u.jsx)(i,{className:(0,o.A)({navbar__item:!r&&!a,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,we.zK)(r),i=(0,ke.QB)(t,r),s=a?.path===i?.path;return null===i||i.unlisted&&!s?null:(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>s||!!a?.sidebar&&a.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,we.zK)(r),i=(0,ke.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>a?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...o}=e;const a=(0,ke.Vd)(r)[0],i=t??a.label,s=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(a).path;return(0,u.jsx)(ae,{...o,label:i,to:s})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:o,dropdownItemsAfter:a,...i}=e;const{search:c,hash:d}=(0,s.zy)(),p=(0,we.zK)(n),f=(0,we.jh)(n),{savePreferredVersionName:h}=(0,xe.g1)(n),m=[...o,...f.map((e=>{const t=p.alternateDocVersions[e.name]??Se(e);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===p.activeVersion,onClick:()=>h(e.name)}})),...a],g=(0,ke.Vd)(n)[0],y=t&&m.length>1?(0,l.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,b=t&&m.length>1?void 0:Se(g).path;return m.length<=1?(0,u.jsx)(ae,{...i,mobile:t,label:y,to:b,isActive:r?()=>!1:void 0}):(0,u.jsx)(fe,{...i,mobile:t,label:y,to:b,items:m,isActive:r?()=>!1:void 0})}};function Oe(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=_e[r];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(o,{...n})}function Ee(){const e=(0,A.M)(),t=(0,w.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Oe,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function De(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(l.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Ce(){const e=0===(0,w.p)().navbar.items.length,t=M();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(De,{onClick:()=>t.hide()}),t.content]})}function Ae(){const e=(0,A.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(I,{header:(0,u.jsx)(Y,{}),primaryMenu:(0,u.jsx)(Ee,{}),secondaryMenu:(0,u.jsx)(Ce,{})}):null}const Te={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function je(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,o.A)("navbar-sidebar__backdrop",e.className)})}function Le(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:a}}=(0,w.p)(),i=(0,A.M)(),{navbarRef:s,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,T.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=s?n(!1):i+c{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:s,"aria-label":(0,l.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.A)("navbar","navbar--fixed-top",n&&[Te.navbarHideable,!d&&Te.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(je,{onClick:i.toggle}),(0,u.jsx)(Ae,{})]})}var Ne=n(440);const Re={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function Pe(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(l.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function Me(e){let{error:t}=e;const n=(0,Ne.getErrorCausalChain)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,u.jsx)("p",{className:Re.errorBoundaryError,children:n})}class Ie extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const Fe="right";function ze(e){let{width:t=30,height:n=30,className:r,...o}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...o,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function Be(){const{toggle:e,shown:t}=(0,A.M)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,l.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(ze,{})})}const $e={colorModeToggle:"colorModeToggle_DEke"};function Ue(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(Ie,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(Oe,{...e})},t)))})}function qe(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function We(){const e=(0,A.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??Fe)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return(0,u.jsx)(qe,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(Be,{}),(0,u.jsx)(Q,{}),(0,u.jsx)(Ue,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ue,{items:r}),(0,u.jsx)(G,{className:$e.colorModeToggle}),!o&&(0,u.jsx)(ve,{children:(0,u.jsx)(ye.A,{})})]})})}function He(){return(0,u.jsx)(Le,{children:(0,u.jsx)(We,{})})}function Ge(e){let{item:t}=e;const{to:n,href:r,label:o,prependBaseUrlToHref:a,...i}=t,s=(0,X.A)(n),l=(0,X.A)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(Z.A,{className:"footer__link-item",...r?{href:a?l:r}:{to:s},...i,children:[o,r&&!(0,J.A)(r)&&(0,u.jsx)(te.A,{})]})}function Ve(e){let{item:t}=e;return t.html?(0,u.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(Ge,{item:t})},t.href??t.to)}function Qe(e){let{column:t}=e;return(0,u.jsxs)("div",{className:"col footer__col",children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,u.jsx)(Ve,{item:e},t)))})]})}function Ke(e){let{columns:t}=e;return(0,u.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,u.jsx)(Qe,{column:e},t)))})}function Ye(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function Ze(e){let{item:t}=e;return t.html?(0,u.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(Ge,{item:t})}function Xe(e){let{links:t}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(Ze,{item:e}),t.length!==n+1&&(0,u.jsx)(Ye,{})]},n)))})})}function Je(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(Ke,{columns:t}):(0,u.jsx)(Xe,{links:t})}var et=n(1122);const tt={footerLogoLink:"footerLogoLink_BH7S"};function nt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.h)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,u.jsx)(et.A,{className:(0,o.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function rt(e){let{logo:t}=e;return t.href?(0,u.jsx)(Z.A,{href:t.href,className:tt.footerLogoLink,target:t.target,children:(0,u.jsx)(nt,{logo:t})}):(0,u.jsx)(nt,{logo:t})}function ot(e){let{copyright:t}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function at(e){let{style:t,links:n,logo:r,copyright:a}=e;return(0,u.jsx)("footer",{className:(0,o.A)("footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||a)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function it(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:o}=e;return(0,u.jsx)(at,{style:o,links:n&&n.length>0&&(0,u.jsx)(Je,{links:n}),logo:r&&(0,u.jsx)(rt,{logo:r}),copyright:t&&(0,u.jsx)(ot,{copyright:t})})}const st=r.memo(it),lt=(0,j.fM)([F.a,k.oq,T.Tv,xe.VQ,i.Jx,function(e){let{children:t}=e;return(0,u.jsx)(L.y_,{children:(0,u.jsx)(A.e,{children:(0,u.jsx)(R,{children:t})})})}]);function ct(e){let{children:t}=e;return(0,u.jsx)(lt,{children:t})}var ut=n(1107);function dt(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(ut.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(l.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(Pe,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(Me,{error:t})})]})})})}const pt={mainWrapper:"mainWrapper_z2l0"};function ft(e){const{children:t,noFooter:n,wrapperClassName:r,title:s,description:l}=e;return(0,y.J)(),(0,u.jsxs)(ct,{children:[(0,u.jsx)(i.be,{title:s,description:l}),(0,u.jsx)(v,{}),(0,u.jsx)(C,{}),(0,u.jsx)(He,{}),(0,u.jsx)("div",{id:d,className:(0,o.A)(g.G.wrapper.main,pt.mainWrapper,r),children:(0,u.jsx)(a.A,{fallback:e=>(0,u.jsx)(dt,{...e}),children:t})}),!n&&(0,u.jsx)(st,{})]})}},3465:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(6540);var r=n(8774),o=n(6025),a=n(4586),i=n(6342),s=n(1122),l=n(4848);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.A)(t.src),dark:(0,o.A)(t.srcDark||t.src)},i=(0,l.jsx)(s.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,l.jsx)("div",{className:r,children:i}):i}function u(e){const{siteConfig:{title:t}}=(0,a.A)(),{navbar:{title:n,logo:s}}=(0,i.p)(),{imageClassName:u,titleClassName:d,...p}=e,f=(0,o.A)(s?.href||"/"),h=n?"":t,m=s?.alt??h;return(0,l.jsxs)(r.A,{to:f,...p,...s?.target&&{target:s.target},children:[s&&(0,l.jsx)(c,{logo:s,alt:m,imageClassName:u}),null!=n&&(0,l.jsx)("b",{className:d,children:n})]})}},1463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(6540);var r=n(5260),o=n(4848);function a(e){let{locale:t,version:n,tag:a}=e;const i=t;return(0,o.jsxs)(r.A,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),i&&(0,o.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},1122:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(6540),o=n(4164),a=n(2303),i=n(5293);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var l=n(4848);function c(e){let{className:t,children:n}=e;const c=(0,a.A)(),{colorMode:u}=(0,i.G)();return(0,l.jsx)(l.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const a=n({theme:e,className:(0,o.A)(t,s.themedComponent,s[`themedComponent--${e}`])});return(0,l.jsx)(r.Fragment,{children:a},e)}))})}function u(e){const{sources:t,className:n,alt:r,...o}=e;return(0,l.jsx)(c,{className:n,children:e=>{let{theme:n,className:a}=e;return(0,l.jsx)("img",{src:t[n],alt:r,className:a,...o})}})}},1422:(e,t,n)=>{"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(6540),o=n(8193),a=n(205),i=n(3109),s=n(4848);const l="ease-in-out";function c(e){let{initialState:t}=e;const[n,o]=(0,r.useState)(t??!1),a=(0,r.useCallback)((()=>{o((e=>!e))}),[]);return{collapsed:n,setCollapsed:o,toggleCollapsed:a}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){let{collapsibleRef:t,collapsed:n,animation:o}=e;const a=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=o?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${o?.easing??l}`,height:`${t}px`}}function s(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return p(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,o])}function h(e){if(!o.A.canUseDOM)return e?u:d}function m(e){let{as:t="div",collapsed:n,children:o,animation:a,onCollapseTransitionEnd:i,className:l,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return f({collapsibleRef:u,collapsed:n,animation:a}),(0,s.jsx)(t,{ref:u,style:c?void 0:h(n),onTransitionEnd:e=>{"height"===e.propertyName&&(p(u.current,n),i?.(n))},className:l,children:o})}function g(e){let{collapsed:t,...n}=e;const[o,i]=(0,r.useState)(!t),[l,c]=(0,r.useState)(t);return(0,a.A)((()=>{t||i(!0)}),[t]),(0,a.A)((()=>{o&&c(t)}),[o,t]),o?(0,s.jsx)(m,{...n,collapsed:l}):null}function y(e){let{lazy:t,...n}=e;const r=t?g:m;return(0,s.jsx)(r,{...n})}},5041:(e,t,n)=>{"use strict";n.d(t,{Mj:()=>m,oq:()=>h});var r=n(6540),o=n(2303),a=n(9466),i=n(9532),s=n(6342),l=n(4848);const c=(0,a.Wf)("docusaurus.announcement.dismiss"),u=(0,a.Wf)("docusaurus.announcement.id"),d=()=>"true"===c.get(),p=e=>c.set(String(e)),f=r.createContext(null);function h(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.p)(),t=(0,o.A)(),[n,a]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{a(d())}),[]);const i=(0,r.useCallback)((()=>{p(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&p(!1),!r&&d()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,l.jsx)(f.Provider,{value:n,children:t})}function m(){const e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293:(e,t,n)=>{"use strict";n.d(t,{G:()=>y,a:()=>g});var r=n(6540),o=n(8193),a=n(9532),i=n(9466),s=n(6342),l=n(4848);const c=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),p={light:"light",dark:"dark"},f=e=>e===p.dark?p.dark:p.light,h=e=>o.A.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),m=e=>{d.set(f(e))};function g(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.p)(),[o,a]=(0,r.useState)(h(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:o=!0}=r;t?(a(t),o&&m(t)):(a(n?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:i,get isDarkTheme(){return o===p.dark},setLightTheme(){i(p.light)},setDarkTheme(){i(p.dark)}})),[o,i])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function y(){const e=(0,r.useContext)(c);if(null==e)throw new a.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},5597:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>y,g1:()=>v});var r=n(6540),o=n(4070),a=n(7065),i=n(6342),s=n(1754),l=n(9532),c=n(9466),u=n(4848);const d=e=>`docs-preferred-version-${e}`,p={save:(e,t,n)=>{(0,c.Wf)(d(e),{persistence:t}).set(n)},read:(e,t)=>(0,c.Wf)(d(e),{persistence:t}).get(),clear:(e,t)=>{(0,c.Wf)(d(e),{persistence:t}).del()}},f=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const h=r.createContext(null);function m(){const e=(0,o.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,s]=(0,r.useState)((()=>f(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function o(e){const t=p.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(p.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,o(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){p.save(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function g(e){let{children:t}=e;const n=m();return(0,u.jsx)(h.Provider,{value:n,children:t})}function y(e){let{children:t}=e;return s.C5?(0,u.jsx)(g,{children:t}):(0,u.jsx)(u.Fragment,{children:t})}function b(){const e=(0,r.useContext)(h);if(!e)throw new l.dV("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=a.W);const t=(0,o.ht)(e),[n,i]=b(),{preferredVersionName:s}=n[e];return{preferredVersion:t.versions.find((e=>e.name===s))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}},6588:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,t:()=>c});var r=n(6540),o=n(9532),a=n(4848);const i=Symbol("EmptyContext"),s=r.createContext(i);function l(e){let{children:t,name:n,items:o}=e;const i=(0,r.useMemo)((()=>n&&o?{name:n,items:o}:null),[n,o]);return(0,a.jsx)(s.Provider,{value:i,children:t})}function c(){const e=(0,r.useContext)(s);if(e===i)throw new o.dV("DocsSidebarProvider");return e}},2252:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,r:()=>l});var r=n(6540),o=n(9532),a=n(4848);const i=r.createContext(null);function s(e){let{children:t,version:n}=e;return(0,a.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(null===e)throw new o.dV("DocsVersionProvider");return e}},9876:(e,t,n)=>{"use strict";n.d(t,{e:()=>f,M:()=>h});var r=n(6540),o=n(5600),a=n(4581),i=n(6347),s=n(9532);function l(e){!function(e){const t=(0,i.W6)(),n=(0,s._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}var c=n(6342),u=n(4848);const d=r.createContext(void 0);function p(){const e=function(){const e=(0,o.YL)(),{items:t}=(0,c.p)().navbar;return 0===t.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,[i,s]=(0,r.useState)(!1);l((()=>{if(i)return s(!1),!1}));const u=(0,r.useCallback)((()=>{s((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&s(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:i})),[e,n,u,i])}function f(e){let{children:t}=e;const n=p();return(0,u.jsx)(d.Provider,{value:n,children:t})}function h(){const e=r.useContext(d);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},5600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>c,YL:()=>l,y_:()=>s});var r=n(6540),o=n(9532),a=n(4848);const i=r.createContext(null);function s(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(!e)throw new o.dV("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const a=(0,r.useContext)(i);if(!a)throw new o.dV("NavbarSecondaryMenuContentProvider");const[,s]=a,l=(0,o.Be)(n);return(0,r.useEffect)((()=>{s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},4090:(e,t,n)=>{"use strict";n.d(t,{w:()=>o,J:()=>a});var r=n(6540);const o="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},4581:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(6540),o=n(8193);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,s]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){s(function(e){if(!o.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a.desktop:a.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},7559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"}}},3109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},1754:(e,t,n)=>{"use strict";n.d(t,{Nr:()=>f,w8:()=>g,C5:()=>p,B5:()=>_,Vd:()=>k,QB:()=>S,fW:()=>x,OF:()=>w,Y:()=>b});var r=n(6540),o=n(6347),a=n(2831),i=n(4070),s=n(5597),l=n(2252),c=n(6588);function u(e){return Array.from(new Set(e))}var d=n(9169);const p=!!i.Gy;function f(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=f(t);if(e)return e}}(e):void 0:e.href}const h=(e,t)=>void 0!==e&&(0,d.ys)(e,t),m=(e,t)=>e.some((e=>g(e,t)));function g(e,t){return"link"===e.type?h(e.href,t):"category"===e.type&&(h(e.href,t)||m(e.items,t))}function y(e,t){switch(e.type){case"category":return g(e,t)||e.items.some((e=>y(e,t)));case"link":return!e.unlisted||g(e,t);default:return!0}}function b(e,t){return(0,r.useMemo)((()=>e.filter((e=>y(e,t)))),[e,t])}function v(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const o=[];return function e(t){for(const a of t)if("category"===a.type&&((0,d.ys)(a.href,n)||e(a.items))||"link"===a.type&&(0,d.ys)(a.href,n)){return r&&"category"!==a.type||o.unshift(a),!0}return!1}(t),o}function w(){const e=(0,c.t)(),{pathname:t}=(0,o.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?v({sidebarItems:e.items,pathname:t}):null}function k(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,s.g1)(e),o=(0,i.r7)(e);return(0,r.useMemo)((()=>u([t,n,o].filter(Boolean))),[t,n,o])}function x(e,t){const n=k(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function S(e,t){const n=k(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${u(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function _(e){let{route:t}=e;const n=(0,o.zy)(),r=(0,l.r)(),i=t.routes,s=i.find((e=>(0,o.B6)(n.pathname,e)));if(!s)return null;const c=s.sidebar,u=c?r.docsSidebars[c]:void 0;return{docElement:(0,a.v)(i),sidebarName:c,sidebarItems:u}}},1003:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>d,Jx:()=>h});var r=n(6540),o=n(4164),a=n(5260),i=n(3102);function s(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(6025),c=n(4586);var u=n(4848);function d(e){let{title:t,description:n,keywords:r,image:o,children:i}=e;const s=function(e){const{siteConfig:t}=(0,c.A)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,l.h)(),p=o?d(o,{absolute:!0}):void 0;return(0,u.jsxs)(a.A,{children:[t&&(0,u.jsx)("title",{children:s}),t&&(0,u.jsx)("meta",{property:"og:title",content:s}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,u.jsx)("meta",{property:"og:image",content:p}),p&&(0,u.jsx)("meta",{name:"twitter:image",content:p}),i]})}const p=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(p),s=(0,o.A)(i,t);return(0,u.jsxs)(p.Provider,{value:s,children:[(0,u.jsx)(a.A,{children:(0,u.jsx)("html",{className:s})}),n]})}function h(e){let{children:t}=e;const n=s(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const a=`plugin-id-${n.plugin.id}`;return(0,u.jsx)(f,{className:(0,o.A)(r,a),children:t})}},9532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>c,ZC:()=>s,_q:()=>i,dV:()=>l,fM:()=>u});var r=n(6540),o=n(205),a=n(4848);function i(e){const t=(0,r.useRef)(e);return(0,o.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function s(e){const t=(0,r.useRef)();return(0,o.A)((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,a.jsx)(a.Fragment,{children:e.reduceRight(((e,t)=>(0,a.jsx)(t,{children:e})),n)})}}},9169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>s,ys:()=>i});var r=n(6540),o=n(8328),a=n(4586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function s(){const{baseUrl:e}=(0,a.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function o(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(o).flatMap((e=>e.routes??[])))}(n)}({routes:o.A,baseUrl:e})),[e])}},3104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>p,Tv:()=>c,gk:()=>f});var r=n(6540),o=n(8193),a=n(2303),i=(n(205),n(9532)),s=n(4848);const l=r.createContext(void 0);function c(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,s.jsx)(l.Provider,{value:n,children:t})}function u(){const e=(0,r.useContext)(l);if(null==e)throw new i.dV("ScrollControllerProvider");return e}const d=()=>o.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function p(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=u(),o=(0,r.useRef)(d()),a=(0,i._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=d();a(e,o.current),o.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function f(){const e=(0,r.useRef)(null),t=(0,a.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(n&&o>e||!n&&ot&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},2967:(e,t,n)=>{"use strict";n.d(t,{Cy:()=>r,tU:()=>o});n(4586);const r="default";function o(e,t){return`docs-${e}-${t}`}},9466:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>l});n(6540);const r="localStorage";function o(e){let{key:t,oldValue:n,newValue:r,storage:o}=e;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}function a(e){if(void 0===e&&(e=r),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,i||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),i=!0),null}var t}let i=!1;const s={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function l(e,t){if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(e);const n=a(t?.persistence);return null===n?s:{get:()=>{try{return n.getItem(e)}catch(t){return console.error(`Docusaurus storage error, can't get key=${e}`,t),null}},set:t=>{try{const r=n.getItem(e);n.setItem(e,t),o({key:e,oldValue:r,newValue:t,storage:n})}catch(r){console.error(`Docusaurus storage error, can't set ${e}=${t}`,r)}},del:()=>{try{const t=n.getItem(e);n.removeItem(e),o({key:e,oldValue:t,newValue:null,storage:n})}catch(t){console.error(`Docusaurus storage error, can't delete key=${e}`,t)}},listen:t=>{try{const r=r=>{r.storageArea===n&&r.key===e&&t(r)};return window.addEventListener("storage",r),()=>window.removeEventListener("storage",r)}catch(r){return console.error(`Docusaurus storage error, can't listen for changes of key=${e}`,r),()=>{}}}}}},2131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(4586),o=n(6347),a=n(440);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:s}}=(0,r.A)(),{pathname:l}=(0,o.zy)(),c=(0,a.applyTrailingSlash)(l,{trailingSlash:n,baseUrl:e}),u=s===i?e:e.replace(`/${s}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${u}`:`${u}${e}/`}(n)}${d}`}}}},5062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(6540),o=n(6347),a=n(9532);function i(e){const t=(0,o.zy)(),n=(0,a.ZC)(t),i=(0,a._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(4586);function o(){return(0,r.A)().siteConfig.themeConfig}},2983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeTrailingSlash=t.addLeadingSlash=t.addTrailingSlash=void 0;const r=n(2566);function o(e){return e.endsWith("/")?e:`${e}/`}function a(e){return(0,r.removeSuffix)(e,"/")}t.addTrailingSlash=o,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),s="/"===i||i===r?i:(l=i,n?o(l):a(l));var l;return e.replace(i,s)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=a},253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=void 0,t.getErrorCausalChain=function e(t){return t.cause?[t,...e(t.cause)]:[t]}},440:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=t.removePrefix=t.addSuffix=t.removeSuffix=t.addPrefix=t.removeTrailingSlash=t.addLeadingSlash=t.addTrailingSlash=t.applyTrailingSlash=t.blogPostContainerID=void 0,t.blogPostContainerID="__blog-post-container";var o=n(2983);Object.defineProperty(t,"applyTrailingSlash",{enumerable:!0,get:function(){return r(o).default}}),Object.defineProperty(t,"addTrailingSlash",{enumerable:!0,get:function(){return o.addTrailingSlash}}),Object.defineProperty(t,"addLeadingSlash",{enumerable:!0,get:function(){return o.addLeadingSlash}}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return o.removeTrailingSlash}});var a=n(2566);Object.defineProperty(t,"addPrefix",{enumerable:!0,get:function(){return a.addPrefix}}),Object.defineProperty(t,"removeSuffix",{enumerable:!0,get:function(){return a.removeSuffix}}),Object.defineProperty(t,"addSuffix",{enumerable:!0,get:function(){return a.addSuffix}}),Object.defineProperty(t,"removePrefix",{enumerable:!0,get:function(){return a.removePrefix}});var i=n(253);Object.defineProperty(t,"getErrorCausalChain",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},2566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removePrefix=t.addSuffix=t.removeSuffix=t.addPrefix=void 0,t.addPrefix=function(e,t){return e.startsWith(t)?e:`${t}${e}`},t.removeSuffix=function(e,t){return""===t?e:e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:`${e}${t}`},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},1513:(e,t,n)=>{"use strict";n.d(t,{zR:()=>w,TM:()=>E,yJ:()=>f,sC:()=>C,AO:()=>p});var r=n(8168);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r=0;p--){var f=i[p];"."===f?a(i,p):".."===f?(a(i,p),d++):d&&(a(i,p),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&o(i[0])||i.unshift("");var h=i.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var s=n(1561);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function h(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=f(e,t,m(),w.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(4363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),m=l(n),g=0;g{"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},4634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},119:(e,t,n)=>{"use strict";n.r(t)},1043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){l(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),s=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},5302:(e,t,n)=>{var r=n(4634);e.exports=f,e.exports.parse=a,e.exports.compile=function(e,t){return s(a(e,t),t)},e.exports.tokensToFunction=s,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,i=0,s="",u=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],p=n[1],f=n.index;if(s+=e.slice(i,f),i=f+d.length,p)s+=p[1];else{var h=e[i],m=n[2],g=n[3],y=n[4],b=n[5],v=n[6],w=n[7];s&&(r.push(s),s="");var k=null!=m&&null!=h&&h!==m,x="+"===v||"*"===v,S="?"===v||"*"===v,_=n[2]||u,O=y||b;r.push({name:g||a++,prefix:m||"",delimiter:_,optional:S,repeat:x,partial:k,asterisk:!!w,pattern:O?c(O):w?".*":"[^"+l(_)+"]+?"})}}return i{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},8722:(e,t,n)=>{const r=n(6969),o=n(8380),a=new Set;function i(e){void 0===e?e=Object.keys(r.languages).filter((e=>"meta"!=e)):Array.isArray(e)||(e=[e]);const t=[...a,...Object.keys(Prism.languages)];o(r,e,t).load((e=>{if(!(e in r.languages))return void(i.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(3157).resolve(t)],delete Prism.languages[e],n(3157)(t),a.add(e)}))}i.silent=!1,e.exports=i},9700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,s=i.length;-1!==n.code.indexOf(o=t(r,s));)++s;return i[s]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(s){for(var l=0;l=a.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),h=p.indexOf(f);if(h>-1){++o;var m=p.substring(0,h),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=p.substring(h+f.length),b=[];m&&b.push.apply(b,i([m])),b.push(g),y&&b.push.apply(b,i([y])),"string"==typeof c?s.splice.apply(s,[l,1].concat(b)):c.content=b}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(Prism)},8692:(e,t,n)=>{var r={"./":8722};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=8692},3157:(e,t,n)=>{var r={"./":8722};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=3157},8380:e=>{"use strict";var t=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n "));var s={},l=e[r];if(l){function c(t){if(!(t in e))throw new Error(r+" depends on an unknown component "+t);if(!(t in s))for(var i in o(t,a),s[t]=!0,n[t])s[i]=!0}t(l.require,c),t(l.optional,c),t(l.modify,c)}n[r]=s,a.pop()}}return function(e){var t=n[e];return t||(o(e,r),t=n[e]),t}}function o(e){for(var t in e)return!0;return!1}return function(a,i,s){var l=function(e){var t={};for(var n in e){var r=e[n];for(var o in r)if("meta"!=o){var a=r[o];t[o]="string"==typeof a?{title:a}:a}}return t}(a),c=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var o in n={},e){var a=e[o];t(a&&a.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+o+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+o+" because it is a component.");n[t]=o}))}return n[r]||r}}(l);i=i.map(c),s=(s||[]).map(c);var u=n(i),d=n(s);i.forEach((function e(n){var r=l[n];t(r&&r.require,(function(t){t in d||(u[t]=!0,e(t))}))}));for(var p,f=r(l),h=u;o(h);){for(var m in p={},h){var g=l[m];t(g&&g.modify,(function(e){e in d&&(p[e]=!0)}))}for(var y in d)if(!(y in u))for(var b in f(y))if(b in u){p[y]=!0;break}for(var v in h=p)u[v]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,o){var a=o?o.series:void 0,i=o?o.parallel:e,s={},l={};function c(e){if(e in s)return s[e];l[e]=!0;var o,u=[];for(var d in t(e))d in n&&u.push(d);if(0===u.length)o=r(e);else{var p=i(u.map((function(e){var t=c(e);return delete l[e],t})));a?o=a(p,(function(){return r(e)})):r(e)}return s[e]=o}for(var u in n)c(u);var d=[];for(var p in l)d.push(s[p]);return i(d)}(f,u,t,n)}};return w}}();e.exports=t},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},2551:(e,t,n)=>{"use strict";var r=n(6540),o=n(9982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n