import{l as i,a7 as n,m as g,b as t,w as o,E as l,v as f,ae as d,F as p,o as u,Z as h,H as v,I as k,e as x,t as C}from"./index-809c946b.js";import{A as j}from"./AstrBotConfig-b6194601.js";import{W as V}from"./WaitingForRestart-f77d905b.js";import{_ as b}from"./_plugin-vue_export-helper-c27b6911.js";import"./common-a3b3ada7.js";const A={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 y(e,r,B,F,s,c){const _=n("AstrBotConfig"),m=n("WaitingForRestart");return u(),g(p,null,[t(h,{style:{"margin-bottom":"16px"},text:"这是一个长期实验性功能，目标是实现更具人类机能的 LLM 对话。推荐使用 gpt-4o-mini 作为文本生成和视觉理解模型，成本很低。推荐使用 text-embedding-3-small 作为 Embedding 模型，成本忽略不计。",title:"💡实验性功能",type:"info",variant:"tonal"}),t(l,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(f,{icon:"mdi-content-save",size:"x-large",style:{position:"fixed",right:"52px",bottom:"52px"},color:"darkprimary",onClick:c.updateConfig},null,8,["onClick"]),t(d,{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(()=>[x(C(s.save_message),1)]),_:1},8,["color","modelValue"]),t(m,{ref:"wfr"},null,512)],64)}const I=b(A,[["render",y]]);export{I as default};
