1"use strict";(self.webpackChunkspoonos_cookbook=self.webpackChunkspoonos_cookbook||[]).push([[2708],{28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>c});var a=o(96540);const t={},s=a.createContext(t);function i(e){const n=a.useContext(s);return a.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(t):e.components||t:i(e.components),a.createElement(s.Provider,{value:n},e.children)}},85813:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>r,contentTitle:()=>c,default:()=>d,frontMatter:()=>i,metadata:()=>a,toc:()=>p});const a=JSON.parse('{"id":"api-reference/spoon_ai/agents/spoon_ai.agents.spoon_react","title":"spoon_ai.agents.spoon_react","description":"* spoon\\\\ai.agents.spoon\\\\react","source":"@site/docs/api-reference/spoon_ai/agents/spoon_react.md","sourceDirName":"api-reference/spoon_ai/agents","slug":"/api-reference/spoon_ai/agents/spoon_react","permalink":"/docs/api-reference/spoon_ai/agents/spoon_react","draft":false,"unlisted":false,"editUrl":"https://github.com/XSpoonAi/spoon-doc/tree/main/docs/api-reference/spoon_ai/agents/spoon_react.md","tags":[],"version":"current","frontMatter":{"id":"spoon_ai.agents.spoon_react","slug":"/api-reference/spoon_ai/agents/spoon_react","title":"spoon_ai.agents.spoon_react"},"sidebar":"tutorialSidebar","previous":{"title":"spoon_ai.agents.react","permalink":"/docs/api-reference/spoon_ai/agents/react"},"next":{"title":"spoon_ai.agents.spoon_react_mcp","permalink":"/docs/api-reference/spoon_ai/agents/spoon_react_mcp"}}');var t=o(74848),s=o(28453);const i={id:"spoon_ai.agents.spoon_react",slug:"/api-reference/spoon_ai/agents/spoon_react",title:"spoon_ai.agents.spoon_react"},c="Table of Contents",r={},p=[{value:"<code>create_configured_chatbot</code>",id:"create_configured_chatbot",level:4},{value:"<code>SpoonReactAI</code> Objects",id:"spoonreactai-objects",level:2},{value:"<code>__init__</code>",id:"__init__",level:4},{value:"<code>initialize</code>",id:"initialize",level:4},{value:"<code>run</code>",id:"run",level:4}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"table-of-contents",children:"Table of Contents"})}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#spoon_ai.agents.spoon_react",children:"spoon_ai.agents.spoon_react"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#spoon_ai.agents.spoon_react.create_configured_chatbot",children:"create_configured_chatbot"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#spoon_ai.agents.spoon_react.SpoonReactAI",children:"SpoonReactAI"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#spoon_ai.agents.spoon_react.SpoonReactAI.__init__",children:"__init__"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#spoon_ai.agents.spoon_react.SpoonReactAI.initialize",children:"initialize"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#spoon_ai.agents.spoon_react.SpoonReactAI.run",children:"run"})}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)("a",{id:"spoon_ai.agents.spoon_react"}),"\n",(0,t.jsxs)(n.h1,{id:"module-spoon_aiagentsspoon_react",children:["Module ",(0,t.jsx)(n.code,{children:"spoon_ai.agents.spoon_react"})]}),"\n",(0,t.jsx)("a",{id:"spoon_ai.agents.spoon_react.create_configured_chatbot"}),"\n",(0,t.jsx)(n.h4,{id:"create_configured_chatbot",children:(0,t.jsx)(n.code,{children:"create_configured_chatbot"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def create_configured_chatbot()\n"})}),"\n",(0,t.jsx)(n.p,{children:"Create a ChatBot instance with intelligent provider selection."}),"\n",(0,t.jsx)("a",{id:"spoon_ai.agents.spoon_react.SpoonReactAI"}),"\n",(0,t.jsxs)(n.h2,{id:"spoonreactai-objects",children:[(0,t.jsx)(n.code,{children:"SpoonReactAI"})," Objects"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"class SpoonReactAI(ToolCallAgent)\n"})}),"\n",(0,t.jsx)("a",{id:"spoon_ai.agents.spoon_react.SpoonReactAI.__init__"}),"\n",(0,t.jsx)(n.h4,{id:"__init__",children:(0,t.jsx)(n.code,{children:"__init__"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"def __init__(**kwargs)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Initialize SpoonReactAI with both ToolCallAgent and MCPClientMixin initialization"}),"\n",(0,t.jsx)("a",{id:"spoon_ai.agents.spoon_react.SpoonReactAI.initialize"}),"\n",(0,t.jsx)(n.h4,{id:"initialize",children:(0,t.jsx)(n.code,{children:"initialize"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def initialize(__context: Any = None)\n"})}),"\n",(0,t.jsx)(n.p,{children:"Initialize async components and subscribe to topics"}),"\n",(0,t.jsx)("a",{id:"spoon_ai.agents.spoon_react.SpoonReactAI.run"}),"\n",(0,t.jsx)(n.h4,{id:"run",children:(0,t.jsx)(n.code,{children:"run"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-python",children:"async def run(request: Optional[str] = None) -> str\n"})}),"\n",(0,t.jsx)(n.p,{children:"Ensure prompts reflect current tools before running."})]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.