import{y as i,W as n,o as g,l,b as t,w as o,C as f,p as d,a0 as p,F as u,Z as h,E as v,G as k,e as C,t as x}from"./index-0402391a.js";import{A as j,W as V}from"./AstrBotConfig-c8cf30e7.js";import{_ as b}from"./_plugin-vue_export-helper-c27b6911.js";import"./common-d886a048.js";const y={name:"AtriProject",components:{AstrBotConfig:j,WaitingForRestart:V},data(){return{project_atri_config:{},fetched:!1,project_atri_config_metadata:{},save_message_snack:!1,save_message:"",save_message_success:""}},mounted(){this.getConfig()},methods:{getConfig(){i.get("/api/config/get").then(e=>{this.project_atri_config=e.data.data.config,this.fetched=!0,this.project_atri_config_metadata=e.data.data.metadata}).catch(e=>{save_message=e,save_message_snack=!0,save_message_success="error"})},updateConfig(){this.fetched&&i.post("/api/config/astrbot/update",this.project_atri_config).then(e=>{e.data.status==="ok"?(this.save_message=e.data.message,this.save_message_snack=!0,this.save_message_success="success",this.$refs.wfr.check()):(this.save_message=e.data.message,this.save_message_snack=!0,this.save_message_success="error")}).catch(e=>{this.save_message=e,this.save_message_snack=!0,this.save_message_success="error"})}}};function A(e,r,B,F,s,c){const _=n("AstrBotConfig"),m=n("WaitingForRestart");return g(),l(u,null,[t(h,{style:{"margin-bottom":"16px"},text:"这是一个长期实验性功能，目标是实现更具人类机能的 LLM 对话。推荐使用 gpt-4o-mini 作为文本生成和视觉理解模型，成本很低。推荐使用 text-embedding-3-small 作为 Embedding 模型，成本忽略不计。",title:"💡实验性功能",type:"info",variant:"tonal"}),t(f,null,{default:o(()=>[t(v,null,{default:o(()=>[t(k,{fluid:""},{default:o(()=>{var a;return[t(_,{metadata:s.project_atri_config_metadata,iterable:(a=s.project_atri_config)==null?void 0:a.project_atri,metadataKey:"project_atri"},null,8,["metadata","iterable"])]}),_:1})]),_:1})]),_:1}),t(d,{icon:"mdi-content-save",size:"x-large",style:{position:"fixed",right:"52px",bottom:"52px"},color:"darkprimary",onClick:c.updateConfig},null,8,["onClick"]),t(p,{timeout:3e3,elevation:"24",color:s.save_message_success,modelValue:s.save_message_snack,"onUpdate:modelValue":r[0]||(r[0]=a=>s.save_message_snack=a)},{default:o(()=>[C(x(s.save_message),1)]),_:1},8,["color","modelValue"]),t(m,{ref:"wfr"},null,512)],64)}const T=b(y,[["render",A]]);export{T as default};
