mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Deploy website - based on 055f2dda4a99ec5ce7588defc81d7861f644b66c
This commit is contained in:
commit
ce2677d794
1
assets/css/styles.f22a29a8.css
Normal file
1
assets/css/styles.f22a29a8.css
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/02934e1d.cbcb756f.js
Normal file
1
assets/js/02934e1d.cbcb756f.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/03b14be2.57b32c87.js
Normal file
1
assets/js/03b14be2.57b32c87.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/08602ca5.1ca833e7.js
Normal file
1
assets/js/08602ca5.1ca833e7.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3710],{330:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>a,frontMatter:()=>r,metadata:()=>u,toc:()=>p});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:"/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:"/docs/python/opendevin/sandbox/plugins/mixin"},next:{title:"action",permalink:"/docs/python/opendevin/schema/action"}},c={},p=[{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)}}}]);
|
||||
1
assets/js/0a038435.0b9847f3.js
Normal file
1
assets/js/0a038435.0b9847f3.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/0af59dc2.099ee4d8.js
Normal file
1
assets/js/0af59dc2.099ee4d8.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/129b4986.108049c2.js
Normal file
1
assets/js/129b4986.108049c2.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/observation/error"},next:{title:"message",permalink:"/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)}}}]);
|
||||
1
assets/js/149d2c0b.1a2071c7.js
Normal file
1
assets/js/149d2c0b.1a2071c7.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/17896441.ddff058e.js
Normal file
1
assets/js/17896441.ddff058e.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/19826e21.9b46ca1e.js
Normal file
1
assets/js/19826e21.9b46ca1e.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9867],{729:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>a,contentTitle:()=>i,default:()=>p,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:"/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:"/docs/python/opendevin/server/session/manager"},next:{title:"session",permalink:"/docs/python/opendevin/server/session/"}},a={},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:()=>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)}}}]);
|
||||
1
assets/js/1df93b7f.2e289f33.js
Normal file
1
assets/js/1df93b7f.2e289f33.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/2237.56c57425.js
Normal file
1
assets/js/2237.56c57425.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[2237],{3363:(e,t,n)=>{n.d(t,{A:()=>a});n(6540);var i=n(4164),o=n(1312),s=n(1107),r=n(4848);function a(e){let{className:t}=e;return(0,r.jsx)("main",{className:(0,i.A)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},2237:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});n(6540);var i=n(1312),o=n(1003),s=n(781),r=n(3363),a=n(4848);function d(){const e=(0,i.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.be,{title:e}),(0,a.jsx)(s.A,{children:(0,a.jsx)(r.A,{})})]})}}}]);
|
||||
1
assets/js/241f2d2b.016142d6.js
Normal file
1
assets/js/241f2d2b.016142d6.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5566],{9077:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>r,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>l});var o=n(4848),s=n(8453);const a={sidebar_label:"delegate",title:"observation.delegate"},r=void 0,c={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:"/docs/python/observation/delegate",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"delegate",title:"observation.delegate"}},i={},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 u(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:()=>c});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 c(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)}}}]);
|
||||
1
assets/js/280598d2.da740050.js
Normal file
1
assets/js/280598d2.da740050.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/sandbox/plugins/jupyter/__init__"},next:{title:"requirement",permalink:"/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)}}}]);
|
||||
1
assets/js/28801d74.adf40c39.js
Normal file
1
assets/js/28801d74.adf40c39.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/2a19c2bb.38866b09.js
Normal file
1
assets/js/2a19c2bb.38866b09.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/server/auth/"},next:{title:"msg_stack",permalink:"/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)}}}]);
|
||||
1
assets/js/2bcf47f1.11299af9.js
Normal file
1
assets/js/2bcf47f1.11299af9.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7440],{3820:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>c,metadata:()=>s,toc:()=>r});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:"/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:"/docs/python/opendevin/action/base"},next:{title:"tasks",permalink:"/docs/python/opendevin/action/tasks"}},l={},r=[{value:"FileReadAction Objects",id:"filereadaction-objects",level:2}];function d(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 p(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:()=>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)}}}]);
|
||||
1
assets/js/2bdcc17b.4b7c614d.js
Normal file
1
assets/js/2bdcc17b.4b7c614d.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5095],{8044:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>c});var o=n(4848),s=n(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:"/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:"/docs/python/opendevin/observation/browse"},next:{title:"error",permalink:"/docs/python/opendevin/observation/error"}},d={},c=[{value:"AgentDelegateObservation Objects",id:"agentdelegateobservation-objects",level:2}];function l(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)(l,{...e})}):l(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)}}}]);
|
||||
1
assets/js/2f886f65.f6347166.js
Normal file
1
assets/js/2f886f65.f6347166.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/agenthub/planner_agent/prompt"},next:{title:"base",permalink:"/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)}}}]);
|
||||
1
assets/js/2fb7ca26.e0a47b57.js
Normal file
1
assets/js/2fb7ca26.e0a47b57.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7722],{8695:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>r,toc:()=>p});var i=n(4848),s=n(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:"/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:"/docs/python/opendevin/server/listen"},next:{title:"agent",permalink:"/docs/python/opendevin/agent"}},l={},p=[{value:"find_available_tcp_port",id:"find_available_tcp_port",level:4}];function c(e){const t={code:"code",h4:"h4",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h4,{id:"find_available_tcp_port",children:"find_available_tcp_port"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-python",children:"def find_available_tcp_port() -> int\n"})}),"\n",(0,i.jsx)(t.p,{children:"Find an available TCP port, return -1 if none available."})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>r});var i=n(6540);const s={},o=i.createContext(s);function a(e){const t=i.useContext(o);return i.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(s):e.components||s:a(e.components),i.createElement(o.Provider,{value:t},e.children)}}}]);
|
||||
1
assets/js/33f11751.0e460a3e.js
Normal file
1
assets/js/33f11751.0e460a3e.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/docs/usage/llms/azureLLMs",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"\ud83e\udd16 LLM Backends",permalink:"/docs/usage/llms/"},next:{title:"Google Gemini/Vertex LLM",permalink:"/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="<azure-api-base-url>" # e.g. "https://openai-gpt-4-test-v-1.openai.azure.com/"\nLLM_API_KEY="<azure-api-key>"\nLLM_MODEL="azure/<your-gpt-deployment-name>"\nLLM_API_VERSION = "<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/<your-actual-gpt-deployment-name>\". 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 = "<your-embedding-deployment-name>" # e.g. "TextEmbedding...<etc>"\nLLM_API_VERSION = "<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)}}}]);
|
||||
1
assets/js/36ebda83.f4c571b9.js
Normal file
1
assets/js/36ebda83.f4c571b9.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1087],{7949:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>s,metadata:()=>a,toc:()=>p});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:"/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:"/docs/python/opendevin/llm/"},next:{title:"base",permalink:"/docs/python/opendevin/observation/base"}},c={},p=[{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)}}}]);
|
||||
1
assets/js/37b15e81.b40609cc.js
Normal file
1
assets/js/37b15e81.b40609cc.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/3bc74c27.cb000c87.js
Normal file
1
assets/js/3bc74c27.cb000c87.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/3e51433d.cb2b2f8e.js
Normal file
1
assets/js/3e51433d.cb2b2f8e.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/40be84db.0b40c35e.js
Normal file
1
assets/js/40be84db.0b40c35e.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/observation/message"},next:{title:"run",permalink:"/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)}}}]);
|
||||
1
assets/js/472242d7.fbd36f94.js
Normal file
1
assets/js/472242d7.fbd36f94.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/4753dddc.9a97e25c.js
Normal file
1
assets/js/4753dddc.9a97e25c.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5463],{1634:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var s=n(4848),l=n(8453);const r={sidebar_label:"listen",title:"server.listen"},i=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:"/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:()=>i,x:()=>o});var s=n(6540);const l={},r=s.createContext(l);function i(e){const t=s.useContext(r);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:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]);
|
||||
1
assets/js/48209c71.fc372c62.js
Normal file
1
assets/js/48209c71.fc372c62.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[4817],{2595:(n,i,e)=>{e.r(i),e.d(i,{assets:()=>c,contentTitle:()=>l,default:()=>d,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:"/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 a(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 d(n={}){const{wrapper:i}={...(0,s.R)(),...n.components};return i?(0,t.jsx)(i,{...n,children:(0,t.jsx)(a,{...n})}):a(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)}}}]);
|
||||
1
assets/js/48804a35.dec03887.js
Normal file
1
assets/js/48804a35.dec03887.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5886],{296:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>r,contentTitle:()=>s,default:()=>p,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:"/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:"/docs/python/opendevin/action/__init__"},next:{title:"fileop",permalink:"/docs/python/opendevin/action/fileop"}},r={},l=[{value:"NullAction Objects",id:"nullaction-objects",level:2}];function d(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 p(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:()=>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)}}}]);
|
||||
1
assets/js/4b879815.bf18a6ec.js
Normal file
1
assets/js/4b879815.bf18a6ec.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/4bbfebcc.47158dd7.js
Normal file
1
assets/js/4bbfebcc.47158dd7.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/52071558.a6d46301.js
Normal file
1
assets/js/52071558.a6d46301.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/5246e7a7.d9e0ce35.js
Normal file
1
assets/js/5246e7a7.d9e0ce35.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/5412fff2.9a3a1ac5.js
Normal file
1
assets/js/5412fff2.9a3a1ac5.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/5493cb6f.3d4fc30c.js
Normal file
1
assets/js/5493cb6f.3d4fc30c.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/54d6b847.a7211a95.js
Normal file
1
assets/js/54d6b847.a7211a95.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/docs/python/opendevin/files",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"files",title:"opendevin.files"},sidebar:"apiSidebar",previous:{title:"config",permalink:"/docs/python/opendevin/config"},next:{title:"logger",permalink:"/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)}}}]);
|
||||
1
assets/js/5b169c1f.84ef997d.js
Normal file
1
assets/js/5b169c1f.84ef997d.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/agenthub/monologue_agent/utils/json"},next:{title:"monologue",permalink:"/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)}}}]);
|
||||
1
assets/js/5de541ca.3ff81223.js
Normal file
1
assets/js/5de541ca.3ff81223.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/5e3a92ae.8291e7e1.js
Normal file
1
assets/js/5e3a92ae.8291e7e1.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/sandbox/docker/process"},next:{title:"jupyter",permalink:"/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)}}}]);
|
||||
1
assets/js/5e95c892.aa1c8caa.js
Normal file
1
assets/js/5e95c892.aa1c8caa.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9647],{7121:(e,s,r)=>{r.r(s),r.d(s,{default:()=>l});r(6540);var c=r(4164),u=r(1003),a=r(7559),d=r(2831),n=r(781),t=r(4848);function l(e){return(0,t.jsx)(u.e3,{className:(0,c.A)(a.G.wrapper.docsPages),children:(0,t.jsx)(n.A,{children:(0,d.v)(e.route.routes)})})}}}]);
|
||||
1
assets/js/60d4308b.294a511e.js
Normal file
1
assets/js/60d4308b.294a511e.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/schema/action"},next:{title:"task",permalink:"/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)}}}]);
|
||||
1
assets/js/662652d6.f3081201.js
Normal file
1
assets/js/662652d6.f3081201.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8716],{3359:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>b,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var n=s(4848),o=s(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:"/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,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"filereadobservation-objects",children:"FileReadObservation Objects"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass FileReadObservation(Observation)\n"})}),"\n",(0,n.jsx)(t.p,{children:"This data class represents the content of a file."}),"\n",(0,n.jsx)(t.h2,{id:"filewriteobservation-objects",children:"FileWriteObservation Objects"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass FileWriteObservation(Observation)\n"})}),"\n",(0,n.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,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>a});var n=s(6540);const o={},i=n.createContext(o);function r(e){const t=n.useContext(i);return n.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),n.createElement(i.Provider,{value:t},e.children)}}}]);
|
||||
1
assets/js/669d2fb4.a66a7df2.js
Normal file
1
assets/js/669d2fb4.a66a7df2.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/server/agent/manager"},next:{title:"manager",permalink:"/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)}}}]);
|
||||
1
assets/js/67fae27e.98be4327.js
Normal file
1
assets/js/67fae27e.98be4327.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/68c038dc.ab983abc.js
Normal file
1
assets/js/68c038dc.ab983abc.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/6c0b43a2.3a263c8f.js
Normal file
1
assets/js/6c0b43a2.3a263c8f.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8078],{4061:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-pages","id":"default"}')}}]);
|
||||
1
assets/js/6d0f81ff.196e3a4c.js
Normal file
1
assets/js/6d0f81ff.196e3a4c.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/6fa566de.00c389ff.js
Normal file
1
assets/js/6fa566de.00c389ff.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/schema/observation"},next:{title:"agent",permalink:"/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)}}}]);
|
||||
1
assets/js/71601b48.34ba7789.js
Normal file
1
assets/js/71601b48.34ba7789.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/docs/usage/troubleshooting/windows",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"\ud83d\udea7 Troubleshooting",permalink:"/docs/usage/troubleshooting/"},next:{title:"\ud83d\udcda Misc",permalink:"/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)}}}]);
|
||||
1
assets/js/728ae092.1a41d273.js
Normal file
1
assets/js/728ae092.1a41d273.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8267],{4951:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var o=t(4848),s=t(8453);const r={sidebar_label:"agent",title:"agenthub.monologue_agent.agent"},l=void 0,a={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:"/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:"/docs/python/agenthub/monologue_agent/utils/prompts"},next:{title:"agent",permalink:"/docs/python/agenthub/planner_agent/agent"}},i={},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:()=>a});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 a(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)}}}]);
|
||||
1
assets/js/73b24ddd.1fd8f5a7.js
Normal file
1
assets/js/73b24ddd.1fd8f5a7.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/74f506f5.f112a070.js
Normal file
1
assets/js/74f506f5.f112a070.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/docs/python/opendevin/main",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"main",title:"opendevin.main"},sidebar:"apiSidebar",previous:{title:"logger",permalink:"/docs/python/opendevin/logger"},next:{title:"plan",permalink:"/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)}}}]);
|
||||
1
assets/js/77a072c5.dc03499c.js
Normal file
1
assets/js/77a072c5.dc03499c.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/7a3df8fe.9edf2e8a.js
Normal file
1
assets/js/7a3df8fe.9edf2e8a.js
Normal file
@ -0,0 +1 @@
|
||||
"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:()=>d});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:"/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:"/docs/python/opendevin/observation/recall"},next:{title:"process",permalink:"/docs/python/opendevin/sandbox/docker/process"}},c={},d=[{value:"CmdOutputObservation Objects",id:"cmdoutputobservation-objects",level:2}];function p(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)(p,{...e})}):p(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)}}}]);
|
||||
1
assets/js/7c083d5c.ec638039.js
Normal file
1
assets/js/7c083d5c.ec638039.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/7c4044b6.ec49553e.js
Normal file
1
assets/js/7c4044b6.ec49553e.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/81dcebe5.6cb5f726.js
Normal file
1
assets/js/81dcebe5.6cb5f726.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/822f9405.6aca01a0.js
Normal file
1
assets/js/822f9405.6aca01a0.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/server/session/msg_stack"},next:{title:"listen",permalink:"/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)}}}]);
|
||||
1
assets/js/858ab766.309bc935.js
Normal file
1
assets/js/858ab766.309bc935.js
Normal file
@ -0,0 +1 @@
|
||||
"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:()=>i,metadata:()=>p,toc:()=>d});var s=t(4848),o=t(8453);const i={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:"/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:"/docs/python/opendevin/sandbox/e2b/sandbox"},next:{title:"mixin",permalink:"/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,o.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,o.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 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 p(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)}}}]);
|
||||
1
assets/js/8625080f.f4c6eaee.js
Normal file
1
assets/js/8625080f.f4c6eaee.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/8698cc2c.ea41092f.js
Normal file
1
assets/js/8698cc2c.ea41092f.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8605],{8916:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>a,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>p});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:"/docs/python/planner_agent/prompt",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"prompt",title:"planner_agent.prompt"}},a={},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:()=>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)}}}]);
|
||||
1
assets/js/8c67e2e5.a14f897c.js
Normal file
1
assets/js/8c67e2e5.a14f897c.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/8e39f6b9.84439098.js
Normal file
1
assets/js/8e39f6b9.84439098.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/9062f025.723964f4.js
Normal file
1
assets/js/9062f025.723964f4.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/935f2afb.849e4308.js
Normal file
1
assets/js/935f2afb.849e4308.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/93fbbd20.4f8e54b6.js
Normal file
1
assets/js/93fbbd20.4f8e54b6.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/955c06e6.6204206b.js
Normal file
1
assets/js/955c06e6.6204206b.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/docs/usage/llms/",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{sidebar_position:2},sidebar:"docsSidebar",previous:{title:"\ud83d\udcbb OpenDevin",permalink:"/docs/usage/intro"},next:{title:"Azure OpenAI LLM",permalink:"/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)}}}]);
|
||||
1
assets/js/998453ed.c8f4f57e.js
Normal file
1
assets/js/998453ed.c8f4f57e.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/99bc8fdd.5555ba10.js
Normal file
1
assets/js/99bc8fdd.5555ba10.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8930],{863:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>r,contentTitle:()=>c,default:()=>p,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:"/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:"/docs/python/opendevin/action/fileop"},next:{title:"agent_controller",permalink:"/docs/python/opendevin/controller/agent_controller"}},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,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e.h2,{id:"taskstatechangedaction-objects",children:"TaskStateChangedAction Objects"}),"\n",(0,o.jsx)(e.pre,{children:(0,o.jsx)(e.code,{className:"language-python",children:"@dataclass\nclass TaskStateChangedAction(NotExecutableAction)\n"})}),"\n",(0,o.jsx)(e.p,{children:"Fake action, just to notify the client that a task state has changed."})]})}function p(t={}){const{wrapper:e}={...(0,a.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:()=>c,x:()=>i});var o=n(6540);const a={},s=o.createContext(a);function c(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(a):t.components||a:c(t.components),o.createElement(s.Provider,{value:e},t.children)}}}]);
|
||||
1
assets/js/9c03797e.9f0cb457.js
Normal file
1
assets/js/9c03797e.9f0cb457.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/9c9a25fe.15015c03.js
Normal file
1
assets/js/9c9a25fe.15015c03.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1533],{5266:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>a,default:()=>b,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:"/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 b(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)}}}]);
|
||||
1
assets/js/9d6e2b71.4b54e114.js
Normal file
1
assets/js/9d6e2b71.4b54e114.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/docs/usage/llms/googleLLMs",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{},sidebar:"docsSidebar",previous:{title:"Azure OpenAI LLM",permalink:"/docs/usage/llms/azureLLMs"},next:{title:"Local LLM with Ollama",permalink:"/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="<your-google-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="<json-dump-of-gcp-service-account-json>"\nVERTEXAI_PROJECT="<your-gcp-project-id>"\nVERTEXAI_LOCATION="<your-gcp-location>"\nLLM_MODEL="vertex_ai/<desired-llm-model>"\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)}}}]);
|
||||
1
assets/js/a0da559b.7dfe87f0.js
Normal file
1
assets/js/a0da559b.7dfe87f0.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/docs/python/opendevin/config",draft:!1,unlisted:!1,tags:[],version:"current",frontMatter:{sidebar_label:"config",title:"opendevin.config"},sidebar:"apiSidebar",previous:{title:"agent",permalink:"/docs/python/opendevin/agent"},next:{title:"files",permalink:"/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)}}}]);
|
||||
1
assets/js/a150f81a.48976b16.js
Normal file
1
assets/js/a150f81a.48976b16.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[8102],{1966:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]);
|
||||
1
assets/js/a1778e00.01604ab4.js
Normal file
1
assets/js/a1778e00.01604ab4.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/a25e84b4.df7ee370.js
Normal file
1
assets/js/a25e84b4.df7ee370.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[9294],{7810:(e,n,i)=>{i.r(n),i.d(n,{default:()=>o});var s=i(781),t=i(4848);function o(){return(0,t.jsx)(s.A,{title:"FAQ",description:"Frequently Asked Questions",children:(0,t.jsxs)("div",{id:"faq",style:{maxWidth:"900px",margin:"0px auto",padding:"40px",textAlign:"justify"},children:[(0,t.jsx)("h1",{style:{fontSize:"3rem"},children:"Frequently Asked Questions"}),(0,t.jsx)("h2",{style:{fontSize:"2rem"},children:"Support"}),(0,t.jsx)("h3",{children:"How can I report an issue with OpenDevin?"}),(0,t.jsxs)("p",{children:["Please send us a message on our"," ",(0,t.jsx)("a",{href:"https://discord.gg/mBuDGRzzES",children:"Discord channel"})," or file a bug on"," ",(0,t.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin/issues",children:"GitHub"})," if you run into any issues!"]}),(0,t.jsx)("h2",{style:{fontSize:"2rem"},children:"General"}),(0,t.jsx)("h3",{children:"What is Devin?"}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{style:{fontWeight:"600",color:"var(--logo)"},children:"Devin"})," ","represents a cutting-edge autonomous agent designed to navigate the complexities of software engineering. It leverages a combination of tools such as a shell, code editor, and web browser, showcasing the untapped potential of LLMs in software development. Our goal is to explore and expand upon Devin's capabilities, identifying both its strengths and areas for improvement, to guide the progress of open code models."]}),(0,t.jsx)("h3",{children:"Why OpenDevin?"}),(0,t.jsxs)("p",{children:["The"," ",(0,t.jsx)("span",{style:{fontWeight:"600",color:"var(--logo)"},children:"OpenDevin"})," ","project is born out of a desire to replicate, enhance, and innovate beyond the original Devin model. By engaging the"," ",(0,t.jsx)("a",{href:"https://github.com/OpenDevin/OpenDevin",children:"open-source community"}),", we aim to tackle the challenges faced by Code LLMs in practical scenarios, producing works that significantly contribute to the community and pave the way for future advancements."]})]})})}}}]);
|
||||
1
assets/js/a303a078.cd12d07b.js
Normal file
1
assets/js/a303a078.cd12d07b.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[942],{1473:(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/docs/python/agenthub/planner_agent/prompt.md",sourceDirName:"python/agenthub/planner_agent",slug:"/python/agenthub/planner_agent/prompt",permalink:"/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:"/docs/python/agenthub/planner_agent/agent"},next:{title:"action",permalink:"/docs/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)}}}]);
|
||||
1
assets/js/a5673c89.41a73970.js
Normal file
1
assets/js/a5673c89.41a73970.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/agenthub/monologue_agent/agent"},next:{title:"prompt",permalink:"/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)}}}]);
|
||||
1
assets/js/a5b6ae45.218141a1.js
Normal file
1
assets/js/a5b6ae45.218141a1.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/agenthub/SWE_agent/parser"},next:{title:"agent",permalink:"/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)}}}]);
|
||||
1
assets/js/a5e0da4d.9a11dd4c.js
Normal file
1
assets/js/a5e0da4d.9a11dd4c.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/a6721bfe.0008fbd2.js
Normal file
1
assets/js/a6721bfe.0008fbd2.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/a7bd4aaa.73b0e486.js
Normal file
1
assets/js/a7bd4aaa.73b0e486.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[7098],{4532:(n,e,s)=>{s.r(e),s.d(e,{default:()=>d});s(6540);var r=s(1003),o=s(2967),t=s(2252),c=s(2831),i=s(1463),u=s(4848);function a(n){const{version:e}=n;return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(i.A,{version:e.version,tag:(0,o.tU)(e.pluginId,e.version)}),(0,u.jsx)(r.be,{children:e.noIndex&&(0,u.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function l(n){const{version:e,route:s}=n;return(0,u.jsx)(r.e3,{className:e.className,children:(0,u.jsx)(t.n,{version:e,children:(0,c.v)(s.routes)})})}function d(n){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(a,{...n}),(0,u.jsx)(l,{...n})]})}}}]);
|
||||
1
assets/js/a86dacba.7307f5af.js
Normal file
1
assets/js/a86dacba.7307f5af.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/a94703ab.843131cf.js
Normal file
1
assets/js/a94703ab.843131cf.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/a94bae3d.42646dce.js
Normal file
1
assets/js/a94bae3d.42646dce.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[5e3],{6309:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>b,frontMatter:()=>r,metadata:()=>a,toc:()=>p});var n=o(4848),s=o(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:"/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:"/docs/python/opendevin/observation/base"},next:{title:"delegate",permalink:"/docs/python/opendevin/observation/delegate"}},c={},p=[{value:"BrowserOutputObservation Objects",id:"browseroutputobservation-objects",level:2}];function d(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.h2,{id:"browseroutputobservation-objects",children:"BrowserOutputObservation Objects"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-python",children:"@dataclass\nclass BrowserOutputObservation(Observation)\n"})}),"\n",(0,n.jsx)(t.p,{children:"This data class represents the output of a browser."})]})}function b(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453:(e,t,o)=>{o.d(t,{R:()=>i,x:()=>a});var n=o(6540);const s={},r=n.createContext(s);function i(e){const t=n.useContext(r);return n.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(s):e.components||s:i(e.components),n.createElement(r.Provider,{value:t},e.children)}}}]);
|
||||
1
assets/js/aab75608.b81991c7.js
Normal file
1
assets/js/aab75608.b81991c7.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/ab526b7f.d5fa9991.js
Normal file
1
assets/js/ab526b7f.d5fa9991.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[1052],{2859:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>g,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var s=n(4848),a=n(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:"/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:"/docs/python/agenthub/codeact_agent/"},next:{title:"agent",permalink:"/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 t={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)(t.h2,{id:"delegatoragent-objects",children:"DelegatorAgent Objects"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"class DelegatorAgent(Agent)\n"})}),"\n",(0,s.jsx)(t.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)(t.h4,{id:"__init__",children:"__init__"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-python",children:"def __init__(llm: LLM)\n"})}),"\n",(0,s.jsx)(t.p,{children:"Initialize the Delegator Agent with an LLM"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"llm (LLM): The llm to be used by this agent"}),"\n"]}),"\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:"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)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Arguments"}),":"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"state (State): The current state given the previous actions and observations"}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Returns"}),":"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"AgentFinishAction: If the last state was 'completed', 'verified', or 'abandoned'"}),"\n",(0,s.jsx)(t.li,{children:"Action: The next action to take based on llm response"}),"\n"]})]})}function g(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:()=>i,x:()=>o});var s=n(6540);const a={},r=s.createContext(a);function i(e){const t=s.useContext(r);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(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]);
|
||||
1
assets/js/abe37dfc.22f30d7e.js
Normal file
1
assets/js/abe37dfc.22f30d7e.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/b092af1b.d295bcd6.js
Normal file
1
assets/js/b092af1b.d295bcd6.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3016],{2235:(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/docs/python/agenthub/SWE_agent/parser.md",sourceDirName:"python/agenthub/SWE_agent",slug:"/python/agenthub/SWE_agent/parser",permalink:"/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:"/docs/python/agenthub/SWE_agent/agent"},next:{title:"codeact_agent",permalink:"/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 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)}}}]);
|
||||
1
assets/js/b1235c84.0c321af7.js
Normal file
1
assets/js/b1235c84.0c321af7.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/ba86bea2.7602ca9f.js
Normal file
1
assets/js/ba86bea2.7602ca9f.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/server/session/"},next:{title:"system",permalink:"/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)}}}]);
|
||||
1
assets/js/bb03d9af.ca25389c.js
Normal file
1
assets/js/bb03d9af.ca25389c.js
Normal file
File diff suppressed because one or more lines are too long
1
assets/js/c49b4ca3.bc703f5a.js
Normal file
1
assets/js/c49b4ca3.bc703f5a.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/c5a70b49.44247326.js
Normal file
1
assets/js/c5a70b49.44247326.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/c5bd584a.28beec9c.js
Normal file
1
assets/js/c5bd584a.28beec9c.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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:"/docs/python/opendevin/sandbox/plugins/requirement"},next:{title:"observation",permalink:"/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)}}}]);
|
||||
1
assets/js/c78811ab.93c0ffa6.js
Normal file
1
assets/js/c78811ab.93c0ffa6.js
Normal file
@ -0,0 +1 @@
|
||||
"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:"/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)}}}]);
|
||||
1
assets/js/ce99aea4.f40fd516.js
Normal file
1
assets/js/ce99aea4.f40fd516.js
Normal file
@ -0,0 +1 @@
|
||||
"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[3928],{6723:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>b,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:"/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 b(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)}}}]);
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user