@agentica/chat 0.19.1 → 0.20.0

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.
@@ -1,4 +1,4 @@
1
- import{j as m,o as v,r as f,T as b}from"../client-B3aq8qpT.js";import{v as I,A as B,d as T,_ as y,V as g,c as C,F as A,T as j,B as w}from"../VendorConfigurationMovie-CbbeSd9L.js";import{a as u,_ as p}from"../_isFormatUri-YqTfGpHo.js";import{D as x}from"../Divider-DX1xhf0M.js";class R{constructor(){this.articles=[]}index(){return this.articles}create(c){const d={id:I(),title:c.input.title,body:c.input.body,thumbnail:c.input.thumbnail,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return this.articles.push(d),d}update(c){const d=this.articles.find(s=>s.id===c.id);if(d===void 0)throw new Error("Unable to find the matched article.");c.input.title!==void 0&&(d.title=c.input.title),c.input.body!==void 0&&(d.body=c.input.body),c.input.thumbnail!==void 0&&(d.thumbnail=c.input.thumbnail),d.updated_at=new Date().toISOString()}erase(c){const d=this.articles.findIndex(s=>s.id===c.id);if(d===-1)throw new Error("Unable to find the matched article.");this.articles.splice(d,1)}}const U={chatgpt:{model:"chatgpt",options:{reference:!1,strict:!1,separate:null},functions:[{name:"index",parameters:{description:"",type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
1
+ import{j as y,o as v,r as f,T as b}from"../client-B3aq8qpT.js";import{v as I,A as B,d as T,_ as m,V as g,c as C,F as A,T as j,B as w}from"../VendorConfigurationMovie-DpMbpY09.js";import{a as u,_ as p}from"../_isFormatUri-YqTfGpHo.js";import{D as x}from"../Divider-DX1xhf0M.js";class R{constructor(){this.articles=[]}index(){return this.articles}create(c){const d={id:I(),title:c.input.title,body:c.input.body,thumbnail:c.input.thumbnail,created_at:new Date().toISOString(),updated_at:new Date().toISOString()};return this.articles.push(d),d}update(c){const d=this.articles.find(s=>s.id===c.id);if(d===void 0)throw new Error("Unable to find the matched article.");c.input.title!==void 0&&(d.title=c.input.title),c.input.body!==void 0&&(d.body=c.input.body),c.input.thumbnail!==void 0&&(d.thumbnail=c.input.thumbnail),d.updated_at=new Date().toISOString()}erase(c){const d=this.articles.findIndex(s=>s.id===c.id);if(d===-1)throw new Error("Unable to find the matched article.");this.articles.splice(d,1)}}const U={chatgpt:{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:`Description of the current {@link IBbsArticle} type:
2
2
 
3
3
  > Article entity.
4
4
  >
@@ -22,7 +22,7 @@ Thumbnail image URI which can represent the article.
22
22
  If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
23
23
  @contentMediaType image/*`}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
24
24
 
25
- List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
25
+ List up every articles archived in the BBS DB.`,validate:l=>({success:!0,data:l})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
26
26
 
27
27
  ------------------------------
28
28
 
@@ -69,7 +69,7 @@ Thumbnail image URI which can represent the article.
69
69
  If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
70
70
  @contentMediaType image/*`}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
71
71
 
72
- Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:`Target article's {@link IBbsArticle.id}.
72
+ Writes a new article and archives it into the DB.`,validate:(()=>{const l=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:`Target article's {@link IBbsArticle.id}.
73
73
 
74
74
 
75
75
  @format uuid`,type:"string"},input:{description:`New content to update.
@@ -89,12 +89,12 @@ Thumbnail image URI which can represent the article.
89
89
  If configured as \`null\`, it means that no thumbnail image in the article.`,anyOf:[{type:"null"},{type:"string",description:`@format uri
90
90
  @contentMediaType image/*`}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
91
91
 
92
- Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:`Target article's {@link IBbsArticle.id}.
92
+ Updates an article with new content.`,validate:(()=>{const l=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:`Target article's {@link IBbsArticle.id}.
93
93
 
94
94
 
95
95
  @format uuid`,type:"string"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
96
96
 
97
- Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},claude:{model:"claude",options:{reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
97
+ Erases an article from the DB.`,validate:(()=>{const l=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||o(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||o(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&l(n);let s,o;return n=>{if(d(n)===!1){s=[],o=m(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||o(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||o(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},claude:{model:"claude",options:{reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
98
98
 
99
99
  > Article entity.
100
100
  >
@@ -108,7 +108,7 @@ Thumbnail image URI which can represent the article.
108
108
 
109
109
  If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
110
110
 
111
- List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
111
+ List up every articles archived in the BBS DB.`,validate:l=>({success:!0,data:l})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
112
112
 
113
113
  ------------------------------
114
114
 
@@ -144,7 +144,7 @@ Thumbnail image URI which can represent the article.
144
144
 
145
145
  If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
146
146
 
147
- Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
147
+ Writes a new article and archives it into the DB.`,validate:(()=>{const l=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
148
148
 
149
149
  ------------------------------
150
150
 
@@ -160,9 +160,77 @@ Thumbnail image URI which can represent the article.
160
160
 
161
161
  If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
162
162
 
163
- Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
163
+ Updates an article with new content.`,validate:(()=>{const l=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
164
164
 
165
- Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},gemini:{model:"gemini",options:{recursive:3,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},required:[]},output:{type:"array",items:{type:"object",properties:{id:{type:"string",description:`Primary Key.
165
+ Erases an article from the DB.`,validate:(()=>{const l=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||o(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||o(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&l(n);let s,o;return n=>{if(d(n)===!1){s=[],o=m(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||o(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||o(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},deepseek:{model:"deepseek",options:{reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
166
+
167
+ > Article entity.
168
+ >
169
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:"Primary Key.",type:"string",format:"uuid"},created_at:{title:"Creation time of the article",description:"Creation time of the article.",type:"string",format:"date-time"},updated_at:{title:"Last updated time of the article",description:"Last updated time of the article.",type:"string",format:"date-time"},title:{title:"Title of the article",description:`Title of the article.
170
+
171
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
172
+
173
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
174
+
175
+ Thumbnail image URI which can represent the article.
176
+
177
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
178
+
179
+ List up every articles archived in the BBS DB.`,validate:l=>({success:!0,data:l})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
180
+
181
+ ------------------------------
182
+
183
+ Description of the current {@link IBbsArticle.ICreate} type:
184
+
185
+ > Information of the article to create.
186
+
187
+ ------------------------------
188
+
189
+ Description of the parent {@link IBbsArticle} type:
190
+
191
+ > Article entity.
192
+ >
193
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
194
+
195
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
196
+
197
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
198
+
199
+ Thumbnail image URI which can represent the article.
200
+
201
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["title","body","thumbnail"]}},required:["input"],additionalProperties:!1,$defs:{}},output:{description:`Description of the current {@link IBbsArticle} type:
202
+
203
+ > Article entity.
204
+ >
205
+ > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,type:"object",properties:{id:{title:"Primary Key",description:"Primary Key.",type:"string",format:"uuid"},created_at:{title:"Creation time of the article",description:"Creation time of the article.",type:"string",format:"date-time"},updated_at:{title:"Last updated time of the article",description:"Last updated time of the article.",type:"string",format:"date-time"},title:{title:"Title of the article",description:`Title of the article.
206
+
207
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
208
+
209
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
210
+
211
+ Thumbnail image URI which can represent the article.
212
+
213
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
214
+
215
+ Writes a new article and archives it into the DB.`,validate:(()=>{const l=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
216
+
217
+ ------------------------------
218
+
219
+ Description of the current {@link PartialIBbsArticle.ICreate} type:
220
+
221
+ > Make all properties in T optional`,type:"object",properties:{title:{title:"Title of the article",description:`Title of the article.
222
+
223
+ Representative title of the article.`,type:"string"},body:{title:"Content body",description:`Content body.
224
+
225
+ Content body of the article writtn in the markdown format.`,type:"string"},thumbnail:{title:"Thumbnail image URI",description:`Thumbnail image URI.
226
+
227
+ Thumbnail image URI which can represent the article.
228
+
229
+ If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
230
+
231
+ Updates an article with new content.`,validate:(()=>{const l=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
232
+
233
+ Erases an article from the DB.`,validate:(()=>{const l=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||o(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||o(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&l(n);let s,o;return n=>{if(d(n)===!1){s=[],o=m(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||o(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||o(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},gemini:{model:"gemini",options:{recursive:3,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},required:[]},output:{type:"array",items:{type:"object",properties:{id:{type:"string",description:`Primary Key.
166
234
 
167
235
 
168
236
  @format uuid`},created_at:{type:"string",description:`Creation time of the article.
@@ -189,7 +257,7 @@ If configured as \`null\`, it means that no thumbnail image in the article.
189
257
  >
190
258
  > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`},description:"List of every articles"},description:`Get all articles.
191
259
 
192
- List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{type:"object",properties:{input:{type:"object",properties:{title:{type:"string",description:`Title of the article.
260
+ List up every articles archived in the BBS DB.`,validate:l=>({success:!0,data:l})},{name:"create",parameters:{type:"object",properties:{input:{type:"object",properties:{title:{type:"string",description:`Title of the article.
193
261
 
194
262
  Representative title of the article.`},body:{type:"string",description:`Content body.
195
263
 
@@ -242,7 +310,7 @@ If configured as \`null\`, it means that no thumbnail image in the article.
242
310
  >
243
311
  > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`},description:`Create a new article.
244
312
 
245
- Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{type:"object",properties:{id:{type:"string",description:`Target article's {@link IBbsArticle.id}.
313
+ Writes a new article and archives it into the DB.`,validate:(()=>{const l=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{type:"object",properties:{id:{type:"string",description:`Target article's {@link IBbsArticle.id}.
246
314
 
247
315
 
248
316
  @format uuid`},input:{type:"object",properties:{title:{type:"string",description:`Title of the article.
@@ -265,12 +333,12 @@ Description of the current {@link PartialIBbsArticle.ICreate} type:
265
333
 
266
334
  > Make all properties in T optional`}},required:["id","input"],description:" Properties of update function"},description:`Update an article.
267
335
 
268
- Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{type:"object",properties:{id:{type:"string",description:`Target article's {@link IBbsArticle.id}.
336
+ Updates an article with new content.`,validate:(()=>{const l=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{type:"object",properties:{id:{type:"string",description:`Target article's {@link IBbsArticle.id}.
269
337
 
270
338
 
271
339
  @format uuid`}},required:["id"],description:" Properties of erase function"},description:`Erase an article.
272
340
 
273
- Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},llama:{model:"llama",options:{reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
341
+ Erases an article from the DB.`,validate:(()=>{const l=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||o(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||o(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&l(n);let s,o;return n=>{if(d(n)===!1){s=[],o=m(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||o(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||o(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},llama:{model:"llama",options:{reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
274
342
 
275
343
  > Article entity.
276
344
  >
@@ -284,7 +352,7 @@ Thumbnail image URI which can represent the article.
284
352
 
285
353
  If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
286
354
 
287
- List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
355
+ List up every articles archived in the BBS DB.`,validate:l=>({success:!0,data:l})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
288
356
 
289
357
  ------------------------------
290
358
 
@@ -320,7 +388,7 @@ Thumbnail image URI which can represent the article.
320
388
 
321
389
  If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
322
390
 
323
- Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
391
+ Writes a new article and archives it into the DB.`,validate:(()=>{const l=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
324
392
 
325
393
  ------------------------------
326
394
 
@@ -336,9 +404,9 @@ Thumbnail image URI which can represent the article.
336
404
 
337
405
  If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
338
406
 
339
- Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
407
+ Updates an article with new content.`,validate:(()=>{const l=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
340
408
 
341
- Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},"3.0":{model:"3.0",options:{constraint:!0,recursive:3,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[]},output:{type:"array",items:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Primary Key",description:"Primary Key."},created_at:{type:"string",format:"date-time",title:"Creation time of the article",description:"Creation time of the article."},updated_at:{type:"string",format:"date-time",title:"Last updated time of the article",description:"Last updated time of the article."},title:{type:"string",title:"Title of the article",description:`Title of the article.
409
+ Erases an article from the DB.`,validate:(()=>{const l=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||o(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||o(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&l(n);let s,o;return n=>{if(d(n)===!1){s=[],o=m(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||o(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||o(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},"3.0":{model:"3.0",options:{constraint:!0,recursive:3,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[]},output:{type:"array",items:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Primary Key",description:"Primary Key."},created_at:{type:"string",format:"date-time",title:"Creation time of the article",description:"Creation time of the article."},updated_at:{type:"string",format:"date-time",title:"Last updated time of the article",description:"Last updated time of the article."},title:{type:"string",title:"Title of the article",description:`Title of the article.
342
410
 
343
411
  Representative title of the article.`},body:{type:"string",title:"Content body",description:`Content body.
344
412
 
@@ -352,7 +420,7 @@ If configured as \`null\`, it means that no thumbnail image in the article.`}},r
352
420
  >
353
421
  > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,additionalProperties:!1},description:"List of every articles"},description:`Get all articles.
354
422
 
355
- List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{type:"object",properties:{input:{type:"object",properties:{title:{type:"string",title:"Title of the article",description:`Title of the article.
423
+ List up every articles archived in the BBS DB.`,validate:l=>({success:!0,data:l})},{name:"create",parameters:{type:"object",properties:{input:{type:"object",properties:{title:{type:"string",title:"Title of the article",description:`Title of the article.
356
424
 
357
425
  Representative title of the article.`},body:{type:"string",title:"Content body",description:`Content body.
358
426
 
@@ -388,7 +456,7 @@ If configured as \`null\`, it means that no thumbnail image in the article.`}},r
388
456
  >
389
457
  > \`IBbsArticle\` is an entity representing an article in the BBS (Bulletin Board System).`,additionalProperties:!1},description:`Create a new article.
390
458
 
391
- Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}."},input:{type:"object",properties:{title:{type:"string",title:"Title of the article",description:`Title of the article.
459
+ Writes a new article and archives it into the DB.`,validate:(()=>{const l=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}."},input:{type:"object",properties:{title:{type:"string",title:"Title of the article",description:`Title of the article.
392
460
 
393
461
  Representative title of the article.`},body:{type:"string",title:"Content body",description:`Content body.
394
462
 
@@ -404,9 +472,9 @@ Description of the current {@link PartialIBbsArticle.ICreate} type:
404
472
 
405
473
  > Make all properties in T optional`,additionalProperties:!1}},required:["id","input"],description:" Properties of update function",additionalProperties:!1},description:`Update an article.
406
474
 
407
- Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}."}},required:["id"],description:" Properties of erase function",additionalProperties:!1},description:`Erase an article.
475
+ Updates an article with new content.`,validate:(()=>{const l=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{type:"object",properties:{id:{type:"string",format:"uuid",title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}."}},required:["id"],description:" Properties of erase function",additionalProperties:!1},description:`Erase an article.
408
476
 
409
- Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},"3.1":{model:"3.1",options:{constraint:!0,reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
477
+ Erases an article from the DB.`,validate:(()=>{const l=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||o(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||o(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&l(n);let s,o;return n=>{if(d(n)===!1){s=[],o=m(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||o(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||o(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]},"3.1":{model:"3.1",options:{constraint:!0,reference:!1,separate:null},functions:[{name:"index",parameters:{type:"object",properties:{},additionalProperties:!1,required:[],$defs:{}},output:{description:"List of every articles",type:"array",items:{description:`Description of the current {@link IBbsArticle} type:
410
478
 
411
479
  > Article entity.
412
480
  >
@@ -420,7 +488,7 @@ Thumbnail image URI which can represent the article.
420
488
 
421
489
  If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]}},description:`Get all articles.
422
490
 
423
- List up every articles archived in the BBS DB.`,validate:o=>({success:!0,data:o})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
491
+ List up every articles archived in the BBS DB.`,validate:l=>({success:!0,data:l})},{name:"create",parameters:{description:" Properties of create function",type:"object",properties:{input:{description:`Information of the article to create
424
492
 
425
493
  ------------------------------
426
494
 
@@ -456,7 +524,7 @@ Thumbnail image URI which can represent the article.
456
524
 
457
525
  If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:["id","created_at","updated_at","title","body","thumbnail"]},description:`Create a new article.
458
526
 
459
- Writes a new article and archives it into the DB.`,validate:(()=>{const o=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
527
+ Writes a new article and archives it into the DB.`,validate:(()=>{const l=e=>typeof e.input=="object"&&e.input!==null&&c(e.input),c=e=>typeof e.title=="string"&&typeof e.body=="string"&&(e.thumbnail===null||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[(typeof e.input=="object"&&e.input!==null||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"IBbsArticle.ICreate",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[typeof e.title=="string"||r(i,{path:t+".title",expected:"string",value:e.title}),typeof e.body=="string"||r(i,{path:t+".body",expected:"string",value:e.body}),e.thumbnail===null||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"update",parameters:{description:" Properties of update function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"},input:{description:`New content to update.
460
528
 
461
529
  ------------------------------
462
530
 
@@ -472,6 +540,6 @@ Thumbnail image URI which can represent the article.
472
540
 
473
541
  If configured as \`null\`, it means that no thumbnail image in the article.`,oneOf:[{type:"null"},{type:"string",format:"uri",contentMediaType:"image/*"}]}},required:[]}},required:["id","input"],additionalProperties:!1,$defs:{}},description:`Update an article.
474
542
 
475
- Updates an article with new content.`,validate:(()=>{const o=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),l=e=>typeof e=="object"&&e!==null&&o(e);let n,r;return e=>{if(l(e)===!1){n=[],r=y(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
543
+ Updates an article with new content.`,validate:(()=>{const l=e=>typeof e.id=="string"&&p(e.id)&&typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1&&c(e.input),c=e=>(e.title===void 0||typeof e.title=="string")&&(e.body===void 0||typeof e.body=="string")&&(e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&u(e.thumbnail)),d=(e,t,i=!0)=>[typeof e.id=="string"&&(p(e.id)||r(i,{path:t+".id",expected:'string & Format<"uuid">',value:e.id}))||r(i,{path:t+".id",expected:'(string & Format<"uuid">)',value:e.id}),(typeof e.input=="object"&&e.input!==null&&Array.isArray(e.input)===!1||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input}))&&s(e.input,t+".input",i)||r(i,{path:t+".input",expected:"Partial<IBbsArticle.ICreate>",value:e.input})].every(a=>a),s=(e,t,i=!0)=>[e.title===void 0||typeof e.title=="string"||r(i,{path:t+".title",expected:"(string | undefined)",value:e.title}),e.body===void 0||typeof e.body=="string"||r(i,{path:t+".body",expected:"(string | undefined)",value:e.body}),e.thumbnail===null||e.thumbnail===void 0||typeof e.thumbnail=="string"&&(u(e.thumbnail)||r(i,{path:t+".thumbnail",expected:'string & Format<"uri">',value:e.thumbnail}))||r(i,{path:t+".thumbnail",expected:'((string & Format<"uri"> & ContentMediaType<"image/*">) | null | undefined)',value:e.thumbnail})].every(a=>a),o=e=>typeof e=="object"&&e!==null&&l(e);let n,r;return e=>{if(o(e)===!1){n=[],r=m(n),((i,a,h=!0)=>(typeof i=="object"&&i!==null||r(!0,{path:a+"",expected:"__type",value:i}))&&d(i,a+"",!0)||r(!0,{path:a+"",expected:"__type",value:i}))(e,"$input",!0);const t=n.length===0;return t?{success:t,data:e}:{success:t,errors:n,data:e}}return{success:!0,data:e}}})()},{name:"erase",parameters:{description:" Properties of erase function",type:"object",properties:{id:{title:"Target article's {@link IBbsArticle.id}",description:"Target article's {@link IBbsArticle.id}.",type:"string",format:"uuid"}},required:["id"],additionalProperties:!1,$defs:{}},description:`Erase an article.
476
544
 
477
- Erases an article from the DB.`,validate:(()=>{const o=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||l(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||l(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&o(n);let s,l;return n=>{if(d(n)===!1){s=[],l=y(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||l(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||l(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]}};function k(o){const c=new R,d=new B({model:"chatgpt",vendor:{api:o.api,model:o.vendorModel},controllers:[{protocol:"class",name:"bbs",application:U[o.schemaModel],execute:c}],config:{locale:o.locale,timezone:o.timezone,executor:{initialize:null}}});return m.jsx(T,{agent:d})}function P(){const[o,c]=f.useState(g.defaultConfig()),[d,s]=f.useState(window.navigator.language),[l,n]=f.useState(!1);return m.jsx("div",{style:{width:"100%",height:"100%",overflow:l===!0?void 0:"auto"},children:l===!0?m.jsx(k,{api:new C({apiKey:o.apiKey,baseURL:o.baseURL,dangerouslyAllowBrowser:!0}),vendorModel:o.vendorModel,schemaModel:o.schemaModel,locale:d}):m.jsxs(A,{style:{width:"calc(100% - 60px)",padding:15,margin:15},children:[m.jsx(b,{variant:"h6",children:"BBS AI Chatbot"}),m.jsx("br",{}),m.jsx(x,{}),m.jsx("br",{}),"Demonstration of Agentica with TypeScript Controller Class.",m.jsx("br",{}),m.jsx("br",{}),m.jsx(b,{variant:"h6",children:" OpenAI Configuration "}),m.jsx("br",{}),m.jsx(g,{config:o,onChange:c}),m.jsx("br",{}),m.jsx(b,{variant:"h6",children:" Membership Information "}),m.jsx("br",{}),m.jsx(j,{onChange:r=>s(r.target.value),defaultValue:d,label:"Locale",variant:"outlined",error:d.length===0}),m.jsx("br",{}),m.jsx("br",{}),m.jsx(w,{component:"a",fullWidth:!0,variant:"contained",color:"info",size:"large",disabled:o.apiKey.length===0||o.vendorModel.length===0||o.schemaModel.length===0||d.length===0,onClick:()=>n(!0),children:"Start AI Chatbot"})]})})}v(window.document.getElementById("root")).render(m.jsx(P,{}));
545
+ Erases an article from the DB.`,validate:(()=>{const l=n=>typeof n.id=="string"&&p(n.id),c=(n,r,e=!0)=>[typeof n.id=="string"&&(p(n.id)||o(e,{path:r+".id",expected:'string & Format<"uuid">',value:n.id}))||o(e,{path:r+".id",expected:'(string & Format<"uuid">)',value:n.id})].every(t=>t),d=n=>typeof n=="object"&&n!==null&&l(n);let s,o;return n=>{if(d(n)===!1){s=[],o=m(s),((e,t,i=!0)=>(typeof e=="object"&&e!==null||o(!0,{path:t+"",expected:"__type",value:e}))&&c(e,t+"",!0)||o(!0,{path:t+"",expected:"__type",value:e}))(n,"$input",!0);const r=s.length===0;return r?{success:r,data:n}:{success:r,errors:s,data:n}}return{success:!0,data:n}}})()}]}};function k(l){const c=new R,d=new B({model:"chatgpt",vendor:{api:l.api,model:l.vendorModel},controllers:[{protocol:"class",name:"bbs",application:U[l.schemaModel],execute:c}],config:{locale:l.locale,timezone:l.timezone,executor:{initialize:null}}});return y.jsx(T,{agent:d})}function P(){const[l,c]=f.useState(g.defaultConfig()),[d,s]=f.useState(window.navigator.language),[o,n]=f.useState(!1);return y.jsx("div",{style:{width:"100%",height:"100%",overflow:o===!0?void 0:"auto"},children:o===!0?y.jsx(k,{api:new C({apiKey:l.apiKey,baseURL:l.baseURL,dangerouslyAllowBrowser:!0}),vendorModel:l.vendorModel,schemaModel:l.schemaModel,locale:d}):y.jsxs(A,{style:{width:"calc(100% - 60px)",padding:15,margin:15},children:[y.jsx(b,{variant:"h6",children:"BBS AI Chatbot"}),y.jsx("br",{}),y.jsx(x,{}),y.jsx("br",{}),"Demonstration of Agentica with TypeScript Controller Class.",y.jsx("br",{}),y.jsx("br",{}),y.jsx(b,{variant:"h6",children:" OpenAI Configuration "}),y.jsx("br",{}),y.jsx(g,{config:l,onChange:c}),y.jsx("br",{}),y.jsx(b,{variant:"h6",children:" Membership Information "}),y.jsx("br",{}),y.jsx(j,{onChange:r=>s(r.target.value),defaultValue:d,label:"Locale",variant:"outlined",error:d.length===0}),y.jsx("br",{}),y.jsx("br",{}),y.jsx(w,{component:"a",fullWidth:!0,variant:"contained",color:"info",size:"large",disabled:l.apiKey.length===0||l.vendorModel.length===0||l.schemaModel.length===0||d.length===0,onClick:()=>n(!0),children:"Start AI Chatbot"})]})})}v(window.document.getElementById("root")).render(y.jsx(P,{}));