@agentica/chat 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,7 +97,7 @@ only one thing due to lack of specificity or homogeneity of candidate functions.
97
97
 
98
98
  Additionally, if you A.I. agent wants to cancel same function multiply, you can
99
99
  do it by assigning the same function name multiply in the \`functions\` property.`}]};async function HMn(o){var D;if(o.operations.divided===void 0)return kmt(o,o.operations.array,0);const h=o.operations.divided.map(()=>[]),b=[],_=await Promise.all(o.operations.divided.map(async(B,q)=>kmt({...o,stack:h[q],dispatch:async Q=>{b.push(Q)}},B,0)));if(h.every(B=>B.length===0))return _[0];if((((D=o.config)==null?void 0:D.eliticism)??eT.ELITICISM)===!0)return kmt(o,h.flat().map(B=>o.operations.group.get(B.operation.controller.name).get(B.operation.function.name)),0);const O=new ZBt({id:rjt(),selections:[]});for(const B of b)B.type==="select"&&(O.selections.push(B.selection),await ajt(o,{name:B.selection.operation.name,reason:B.selection.reason}));return[O]}async function ajt(o,h){const b=o.stack.findIndex(O=>O.operation.name===h.name);if(b===-1)return null;const _=o.stack[b];return o.stack.splice(b,1),await o.dispatch(new T7e({selection:new XP({operation:_.operation,reason:h.reason})})),_}async function kmt(o,h,b,_){var Q,U,nt,at;const O=await o.request("cancel",{messages:[{role:"system",content:Gj.write(o.config)},{role:"assistant",tool_calls:[{type:"function",id:"getApiFunctions",function:{name:"getApiFunctions",arguments:JSON.stringify({})}}]},{role:"tool",tool_call_id:"getApiFunctions",content:JSON.stringify(h.map(it=>({name:it.name,description:it.function.description,...it.protocol==="http"?{method:it.function.method,path:it.function.path,tags:it.function.tags}:{}})))},...o.histories.map(qj.decode).flat(),{role:"user",content:o.prompt.text},{role:"system",content:((nt=(U=(Q=o.config)==null?void 0:Q.systemPrompt)==null?void 0:U.cancel)==null?void 0:nt.call(U,o.histories))??ZP.CANCEL},...zMn(_??[])],tools:$Mn.functions.map(it=>({type:"function",function:{name:it.name,description:it.description,parameters:it.parameters}})),tool_choice:"auto",parallel_tool_calls:!0}),D=await q5.readAll(O),B=m6.merge(D);if(b++<(((at=o.config)==null?void 0:at.retry)??eT.RETRY)){const it=[];for(const st of B.choices)for(const tt of st.message.tool_calls??[]){if(tt.function.name!=="cancelFunctions")continue;const St=JSON.parse(tt.function.arguments),Mt=(()=>{const jt=qn=>Array.isArray(qn.functions)&&qn.functions.every(ar=>typeof ar=="object"&&ar!==null&&oe(ar)),oe=qn=>typeof qn.reason=="string"&&typeof qn.name=="string",qt=(qn,ar,nr=!0)=>[(Array.isArray(qn.functions)||Dn(nr,{path:ar+".functions",expected:"Array<___IChatFunctionReference>",value:qn.functions}))&&qn.functions.map((Me,Kn)=>(typeof Me=="object"&&Me!==null||Dn(nr,{path:ar+".functions["+Kn+"]",expected:"___IChatFunctionReference",value:Me}))&&_e(Me,ar+".functions["+Kn+"]",nr)||Dn(nr,{path:ar+".functions["+Kn+"]",expected:"___IChatFunctionReference",value:Me})).every(Me=>Me)||Dn(nr,{path:ar+".functions",expected:"Array<___IChatFunctionReference>",value:qn.functions})].every(Me=>Me),_e=(qn,ar,nr=!0)=>[typeof qn.reason=="string"||Dn(nr,{path:ar+".reason",expected:"string",value:qn.reason}),typeof qn.name=="string"||Dn(nr,{path:ar+".name",expected:"string",value:qn.name})].every(Me=>Me),bn=qn=>typeof qn=="object"&&qn!==null&&jt(qn);let pe,Dn;return qn=>{if(bn(qn)===!1){pe=[],Dn=njt(pe),((nr,Me,Kn=!0)=>(typeof nr=="object"&&nr!==null||Dn(!0,{path:Me+"",expected:"__IChatFunctionReference.IProps",value:nr}))&&qt(nr,Me+"",!0)||Dn(!0,{path:Me+"",expected:"__IChatFunctionReference.IProps",value:nr}))(qn,"$input",!0);const ar=pe.length===0;return ar?{success:ar,data:qn}:{success:ar,errors:pe,data:qn}}return{success:!0,data:qn}}})()(St);Mt.success===!1&&it.push({id:tt.id,name:tt.function.name,validation:Mt})}if(it.length>0)return kmt(o,h,b,it)}const q=[];for(const it of B.choices)if(it.message.tool_calls!=null)for(const st of it.message.tool_calls){if(st.type!=="function"||st.function.name!=="cancelFunctions")continue;const tt=(()=>{const Mt=qt=>Array.isArray(qt.functions)&&qt.functions.every(_e=>typeof _e=="object"&&_e!==null&&jt(_e)),jt=qt=>typeof qt.reason=="string"&&typeof qt.name=="string",oe=qt=>typeof qt=="object"&&qt!==null&&Mt(qt);return qt=>(qt=JSON.parse(qt),oe(qt)?qt:null)})()(st.function.arguments);if(tt===null)continue;const St=new ZBt({id:st.id,selections:[]});for(const Mt of tt.functions){const jt=await ajt(o,Mt);jt!==null&&St.selections.push(jt)}St.selections.length!==0&&q.push(St)}return q}function zMn(o){return o.map(h=>[{role:"assistant",tool_calls:[{type:"function",id:h.id,function:{name:h.name,arguments:JSON.stringify(h.validation.data)}}]},{role:"tool",content:JSON.stringify(h.validation.errors),tool_call_id:h.id},{role:"system",content:["You A.I. assistant has composed wrong typed arguments.","","Correct it at the next function calling."].join(`
100
- `)}]).flat()}const cBt={execute:HMn,cancelFunction:ajt};async function UMn(o){var D,B,q;const h=await o.request("call",{messages:[{role:"system",content:Gj.write(o.config)},...o.histories.map(qj.decode).flat(),{role:"user",content:o.prompt.text},{role:"system",content:((q=(B=(D=o.config)==null?void 0:D.systemPrompt)==null?void 0:B.execute)==null?void 0:q.call(B,o.histories))??ZP.EXECUTE}],tools:o.stack.map(Q=>({type:"function",function:{name:Q.operation.name,description:Q.operation.function.description,parameters:Q.operation.function.separated!==void 0?Q.operation.function.separated.llm??{type:"object",properties:{},required:[],additionalProperties:!1,$defs:{}}:Q.operation.function.parameters}})),tool_choice:"auto",parallel_tool_calls:!1}),b=[],_=await q5.readAll(h),O=m6.merge(_);for(const Q of O.choices){for(const U of Q.message.tool_calls??[])if(U.type==="function"){const nt=o.operations.flat.get(U.function.name);if(nt===void 0)continue;b.push(async()=>{const at=new E7e({id:U.id,operation:nt,arguments:JSON.parse(U.function.arguments)});at.operation.protocol==="http"&&WMn({operation:at.operation,arguments:at.arguments}),await o.dispatch(at);const it=await P7e(o,at,0);return await o.dispatch(new gMn({id:at.id,operation:at.operation,arguments:it.arguments,value:it.value})),await cBt.cancelFunction(o,{name:at.operation.name,reason:"completed"}),await o.dispatch(new T7e({selection:new XP({operation:at.operation,reason:"complete"})})),[it,new ZBt({id:at.id,selections:[new XP({operation:at.operation,reason:"complete"})]})]})}Q.message.role==="assistant"&&Q.message.content!==null&&Q.message.content.length>0&&b.push(async()=>{const U=new Uj({role:"assistant",text:Q.message.content});return await o.dispatch(new ibt({role:"assistant",get:()=>U.text,done:()=>!0,stream:q5.to(U.text),join:async()=>Promise.resolve(U.text)})),[U]})}return(await Promise.all(b.map(async Q=>Q()))).flat()}async function P7e(o,h,b){var _,O,D;if(h.operation.protocol==="http"){const B=h.operation.function.validate(h.arguments);if(B.success===!1&&b++<(((_=o.config)==null?void 0:_.retry)??eT.RETRY)){const q=await ZDt(o,h,b,B.errors);if(q!==null)return q}try{const q=await GMn(h.operation,h.arguments);return(((q.status===400||q.status===404||q.status===422)&&b++<(((O=o.config)==null?void 0:O.retry)??eT.RETRY)&&typeof q.body)===!1===!1?await ZDt(o,h,b,q.body):null)??new jP({operation:h.operation,id:h.id,arguments:h.arguments,value:q})}catch(q){return new jP({operation:h.operation,id:h.id,arguments:h.arguments,value:{status:500,headers:{},body:q instanceof Error?{...q,name:q.name,message:q.message}:q}})}}else{const B=h.operation.function.validate(h.arguments);if(B.success===!1)return(b++<(((D=o.config)==null?void 0:D.retry)??eT.RETRY)?await ZDt(o,h,b,B.errors):null)??new jP({id:h.id,operation:h.operation,arguments:h.arguments,value:{name:"TypeGuardError",message:"Invalid arguments.",errors:B.errors}});try{const q=await qMn(h.operation,h.arguments);return new jP({id:h.id,operation:h.operation,arguments:h.arguments,value:q})}catch(q){return new jP({id:h.id,operation:h.operation,arguments:h.arguments,value:q instanceof Error?{...q,name:q.name,message:q.message}:q})}}}async function GMn(o,h){const b={connection:o.controller.connection,application:o.controller.application,function:o.function};return o.controller.execute!==void 0?o.controller.execute({...b,arguments:h}):oBt.propagate({...b,input:h})}async function qMn(o,h){const b=o.controller.execute;if(typeof b=="function")return await b({application:o.controller.application,function:o.function,arguments:h});const _=b[o.function.name];return _(h)}async function ZDt(o,h,b,_){var Q,U,nt,at,it;const O=await o.request("call",{messages:[{role:"system",content:Gj.write(o.config)},...o.histories.map(qj.decode).flat(),{role:"user",content:o.prompt.text},{role:"system",content:((nt=(U=(Q=o.config)==null?void 0:Q.systemPrompt)==null?void 0:U.execute)==null?void 0:nt.call(U,o.histories))??ZP.EXECUTE},{role:"assistant",tool_calls:[{type:"function",id:h.id,function:{name:h.operation.name,arguments:JSON.stringify(h.arguments)}}]},{role:"tool",content:typeof _=="string"?_:JSON.stringify(_),tool_call_id:h.id},{role:"system",content:["You A.I. assistant has composed wrong arguments.","","Correct it at the next function calling."].join(`
100
+ `)}]).flat()}const cBt={execute:HMn,cancelFunction:ajt};async function UMn(o){var D,B,q;const h=await o.request("call",{messages:[{role:"system",content:Gj.write(o.config)},...o.histories.map(qj.decode).flat(),{role:"user",content:o.prompt.text},{role:"system",content:((q=(B=(D=o.config)==null?void 0:D.systemPrompt)==null?void 0:B.execute)==null?void 0:q.call(B,o.histories))??ZP.EXECUTE}],tools:o.stack.map(Q=>({type:"function",function:{name:Q.operation.name,description:Q.operation.function.description,parameters:Q.operation.function.separated!==void 0?Q.operation.function.separated.llm??{type:"object",properties:{},required:[],additionalProperties:!1,$defs:{}}:Q.operation.function.parameters}})),tool_choice:"auto",parallel_tool_calls:!1}),b=[],_=await q5.readAll(h),O=m6.merge(_);for(const Q of O.choices){for(const U of Q.message.tool_calls??[])if(U.type==="function"){const nt=o.operations.flat.get(U.function.name);if(nt===void 0)continue;b.push(async()=>{const at=new E7e({id:U.id,operation:nt,arguments:JSON.parse(U.function.arguments)});at.operation.protocol==="http"&&WMn({operation:at.operation,arguments:at.arguments}),await o.dispatch(at);const it=await P7e(o,at,0);return await o.dispatch(new gMn({id:at.id,operation:at.operation,arguments:it.arguments,value:it.value})),await cBt.cancelFunction(o,{name:at.operation.name,reason:"completed"}),await o.dispatch(new T7e({selection:new XP({operation:at.operation,reason:"complete"})})),[it,new ZBt({id:at.id,selections:[new XP({operation:at.operation,reason:"complete"})]})]})}Q.message.role==="assistant"&&Q.message.content!==null&&Q.message.content.length>0&&b.push(async()=>{const U=new Uj({role:"assistant",text:Q.message.content});return await o.dispatch(new ibt({role:"assistant",get:()=>U.text,done:()=>!0,stream:q5.to(U.text),join:async()=>Promise.resolve(U.text)})),[U]})}return(await Promise.all(b.map(async Q=>Q()))).flat()}async function P7e(o,h,b){var _,O,D;if(h.operation.protocol==="http"){const B=h.operation.function.validate(h.arguments);if(B.success===!1&&b++<(((_=o.config)==null?void 0:_.retry)??eT.RETRY)){const q=await ZDt(o,h,b,B.errors);if(q!==null)return q}try{const q=await GMn(h.operation,h.arguments);return(((q.status===400||q.status===404||q.status===422)&&b++<(((O=o.config)==null?void 0:O.retry)??eT.RETRY)&&typeof q.body)===!1===!1?await ZDt(o,h,b,q.body):null)??new jP({operation:h.operation,id:h.id,arguments:h.arguments,value:q})}catch(q){return new jP({operation:h.operation,id:h.id,arguments:h.arguments,value:{status:500,headers:{},body:q instanceof Error?{...q,name:q.name,message:q.message}:q}})}}else{const B=h.operation.function.validate(h.arguments);if(B.success===!1)return(b++<(((D=o.config)==null?void 0:D.retry)??eT.RETRY)?await ZDt(o,h,b,B.errors):null)??new jP({id:h.id,operation:h.operation,arguments:h.arguments,value:{name:"TypeGuardError",message:"Invalid arguments.",errors:B.errors}});try{const q=await qMn(h.operation,h.arguments);return new jP({id:h.id,operation:h.operation,arguments:h.arguments,value:q})}catch(q){return new jP({id:h.id,operation:h.operation,arguments:h.arguments,value:q instanceof Error?{...q,name:q.name,message:q.message}:q})}}}async function GMn(o,h){const b={connection:o.controller.connection,application:o.controller.application,function:o.function};return o.controller.execute!==void 0?o.controller.execute({...b,arguments:h}):oBt.propagate({...b,input:h})}async function qMn(o,h){const b=o.controller.execute;return typeof b=="function"?await b({application:o.controller.application,function:o.function,arguments:h}):b[o.function.name](h)}async function ZDt(o,h,b,_){var Q,U,nt,at,it;const O=await o.request("call",{messages:[{role:"system",content:Gj.write(o.config)},...o.histories.map(qj.decode).flat(),{role:"user",content:o.prompt.text},{role:"system",content:((nt=(U=(Q=o.config)==null?void 0:Q.systemPrompt)==null?void 0:U.execute)==null?void 0:nt.call(U,o.histories))??ZP.EXECUTE},{role:"assistant",tool_calls:[{type:"function",id:h.id,function:{name:h.operation.name,arguments:JSON.stringify(h.arguments)}}]},{role:"tool",content:typeof _=="string"?_:JSON.stringify(_),tool_call_id:h.id},{role:"system",content:["You A.I. assistant has composed wrong arguments.","","Correct it at the next function calling."].join(`
101
101
  `)}],tools:[{type:"function",function:{name:h.operation.name,description:h.operation.function.description,parameters:h.operation.function.separated!==void 0?((at=h.operation.function.separated)==null?void 0:at.llm)??{$defs:{},type:"object",properties:{},additionalProperties:!1,required:[]}:h.operation.function.parameters}}],tool_choice:"auto",parallel_tool_calls:!1}),D=await q5.readAll(O),q=(((it=m6.merge(D).choices[0])==null?void 0:it.message.tool_calls)??[]).find(st=>st.type==="function"&&st.function.name===h.operation.name);return q===void 0?null:P7e(o,new E7e({id:q.id,operation:h.operation,arguments:JSON.parse(q.function.arguments)}),b)}function WMn(o){var b;if(o.operation.protocol!=="http")return;const h=o.operation.function.route();h.body!==null&&((b=h.operation().requestBody)==null?void 0:b.required)===!0&&"body"in o.arguments&&uBt(o.operation.function.parameters.$defs,o.operation.function.parameters.properties.body)&&(o.arguments.body={}),h.query!==null&&"query"in o.arguments&&o.arguments.query===void 0&&(o.arguments.query={})}function uBt(o,h){return I1.isObject(h)||I1.isReference(h)&&uBt(o,o[h.$ref.split("/").at(-1)])||I1.isAnyOf(h)&&h.anyOf.every(b=>uBt(o,b))}const KMn={execute:UMn};class ojt extends zj{constructor(h){super("describe"),this.executes=h.executes,this.text=h.text}toJSON(){return{type:this.type,executes:this.executes.map(h=>h.toJSON()),text:this.text}}}class YMn extends X8{get text(){return this.get_()}get done(){return this.done_()}constructor(h){super("describe"),this.stream=h.stream,this.executes=h.executes,this.done_=h.done,this.get_=h.get,this.join_=h.join}async join(){return this.join_()}toJSON(){return{type:"describe",executes:this.executes.map(h=>h.toJSON()),text:this.text,done:this.done}}toPrompt(){return new ojt({executes:this.executes,text:this.text})}}class VMn{constructor(){this.queue=[],this.resolvers=[],this.closeResolvers=[],this.emptyResolvers=[],this.closed=!1}enqueue(h){var b;this.queue.push(h),this.resolvers.length>0&&((b=this.resolvers.shift())==null||b({value:this.queue.shift(),done:!1}))}async dequeue(){return this.queue.length>0?{value:this.queue.shift(),done:!1}:this.closed?(this.emptyResolvers.length>0&&(this.emptyResolvers.forEach(h=>h()),this.emptyResolvers=[]),{value:void 0,done:!0}):new Promise(h=>this.resolvers.push(h))}isEmpty(){return this.queue.length===0}isClosed(){return this.closed}done(){return this.isClosed()&&this.isEmpty()}close(){var h;for(this.closed=!0;this.resolvers.length>0;)(h=this.resolvers.shift())==null||h({value:void 0,done:!0});this.closeResolvers.forEach(b=>b())}async waitUntilEmpty(){return this.isEmpty()?Promise.resolve():new Promise(h=>{this.emptyResolvers.push(h)})}async waitClosed(){return this.isClosed()?Promise.resolve():new Promise(h=>{this.closeResolvers.push(h)})}}class N7e{constructor(){this.queue=new VMn,this.consumer=new ReadableStream({pull:async h=>{const{value:b,done:_}=await this.queue.dequeue();if(_===!0){h.close();return}h.enqueue(b)}})}produce(h){this.queue.enqueue(h)}close(){this.queue.close()}done(){return this.queue.done()}async waitClosed(){await this.queue.waitClosed()}async waitUntilEmpty(){await this.queue.waitUntilEmpty()}}async function JMn(o,h){var B,q,Q;if(h.length===0)return[];const b=await o.request("describe",{messages:[{role:"system",content:Gj.write(o.config)},...h.map(qj.decode).flat(),{role:"system",content:((Q=(q=(B=o.config)==null?void 0:B.systemPrompt)==null?void 0:q.describe)==null?void 0:Q.call(q,h))??ZP.DESCRIBE}]}),_=[],O=await q5.reduce(b,async(U,nt)=>{const at=await U,it=st=>{for(const tt of st){if(tt.finish_reason!=null){_[tt.index].mpsc.close();continue}if(tt.delta.content==null)continue;if(_[tt.index]!=null){_[tt.index].content+=tt.delta.content,_[tt.index].mpsc.produce(tt.delta.content);continue}const St=new N7e;_[tt.index]={content:tt.delta.content,mpsc:St},St.produce(tt.delta.content),o.dispatch(new YMn({executes:h,stream:St.consumer,done:()=>St.done(),get:()=>{var Mt;return((Mt=_[tt.index])==null?void 0:Mt.content)??""},join:async()=>(await St.waitClosed(),_[tt.index].content)}))}};return at.object==="chat.completion.chunk"?(it([at,nt].flatMap(st=>st.choices)),m6.merge([at,nt])):(it(nt.choices),m6.accumulate(at,nt))});if(O==null)throw new Error("No completion received");return O.choices.map(U=>U.message.role==="assistant"?U.message.content:null).filter(U=>U!==null).map(U=>new ojt({executes:h,text:U}))}const XMn={execute:JMn},omt=[{name:"getApiFunctions",parameters:{type:"object",properties:{},required:[],additionalProperties:!1,$defs:{RecordstringIChatGptSchema:{description:"Construct a type with a set of properties K of type T",type:"object",properties:{},required:[],additionalProperties:{$ref:"#/$defs/IChatGptSchema"}},IChatGptSchema:{title:"Type schema info of the ChatGPT",description:`Type schema info of the ChatGPT.
102
102
 
103
103
  \`IChatGptSchema\` is a type schema info of the ChatGPT function calling.
@@ -1,4 +1,4 @@
1
- import{j as a,o as B,r as y,T as g}from"../client-BVv4NBtY.js";import{v as T,A as C,e as w,_ as v,f as R,F as S,T as I,R as _,c as x,d as j,B as P}from"../AgenticaChatApplication-B3nZ9UT-.js";import{a as f,_ as b}from"../_isFormatUri-YqTfGpHo.js";import{D as U}from"../Divider-DaLcPLlq.js";class k{constructor(){this.articles=[]}index(){return this.articles}create(o){const l={id:T(),title:o.input.title,body:o.input.body,thumbnail:o.input.thumbnail,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return this.articles.push(l),l}update(o){const l=this.articles.find(d=>d.id===o.id);if(l===void 0)throw new Error("Unable to find the matched article.");o.input.title!==void 0&&(l.title=o.input.title),o.input.body!==void 0&&(l.body=o.input.body),o.input.thumbnail!==void 0&&(l.thumbnail=o.input.thumbnail),l.updated_at=new Date().toISOString()}erase(o){const l=this.articles.findIndex(d=>d.id===o.id);if(l===-1)throw new Error("Unable to find the matched article.");this.articles.splice(l,1)}}const F=u=>{const o=new k,l=new C({model:"chatgpt",vendor:{api:new w({apiKey:u.apiKey,dangerouslyAllowBrowser:!0}),model:u.model??"gpt-4o-mini"},controllers:[{protocol:"class",name:"bbs",application:{model:"chatgpt",options:{reference:!1,strict:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:"Article entity.\n\n`IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).",type:"object",properties:{id:{title:"Primary Key",description:`Primary Key.
1
+ import{j as a,o as B,r as y,T as g}from"../client-BVv4NBtY.js";import{v as T,A as C,e as w,_ as v,f as R,F as S,T as I,R as _,c as x,d as j,B as P}from"../AgenticaChatApplication-CWxfvthA.js";import{a as f,_ as b}from"../_isFormatUri-YqTfGpHo.js";import{D as U}from"../Divider-DaLcPLlq.js";class k{constructor(){this.articles=[]}index(){return this.articles}create(o){const l={id:T(),title:o.input.title,body:o.input.body,thumbnail:o.input.thumbnail,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return this.articles.push(l),l}update(o){const l=this.articles.find(d=>d.id===o.id);if(l===void 0)throw new Error("Unable to find the matched article.");o.input.title!==void 0&&(l.title=o.input.title),o.input.body!==void 0&&(l.body=o.input.body),o.input.thumbnail!==void 0&&(l.thumbnail=o.input.thumbnail),l.updated_at=new Date().toISOString()}erase(o){const l=this.articles.findIndex(d=>d.id===o.id);if(l===-1)throw new Error("Unable to find the matched article.");this.articles.splice(l,1)}}const F=u=>{const o=new k,l=new C({model:"chatgpt",vendor:{api:new w({apiKey:u.apiKey,dangerouslyAllowBrowser:!0}),model:u.model??"gpt-4o-mini"},controllers:[{protocol:"class",name:"bbs",application:{model:"chatgpt",options:{reference:!1,strict:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:"Article entity.\n\n`IBbsArticle` is an entity representing an article in the BBS (Bulletin Board System).",type:"object",properties:{id:{title:"Primary Key",description:`Primary Key.
2
2
 
3
3
 
4
4
  @format uuid`,type:"string"},created_at:{title:"Creation time of the article",description:`Creation time of the article.