import{y as i,a2 as n,o as g,k as l,b as t,w as o,C as f,p as d,a8 as p,F as u,a5 as h,E as v,G as k,e as C,t as x}from"./index-733aa71a.js";import{A as j}from"./AstrBotConfig-dd214966.js";import{W as V}from"./WaitingForRestart-ed54cd7e.js";import{_ as b}from"./_plugin-vue_export-helper-c27b6911.js";import"./common-8ef9a0d2.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,a,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 s;return[t(_,{metadata:a.project_atri_config_metadata,iterable:(s=a.project_atri_config)==null?void 0:s.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:a.save_message_success,modelValue:a.save_message_snack,"onUpdate:modelValue":r[0]||(r[0]=s=>a.save_message_snack=s)},{default:o(()=>[C(x(a.save_message),1)]),_:1},8,["color","modelValue"]),t(m,{ref:"wfr"},null,512)],64)}const L=b(y,[["render",A]]);export{L as default};
