import{aa as r,ab as s}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{h as i,c as E}from"./commonut-tangy-colts-beg-30.js";import{f as m}from"./machineh-tangy-colts-beg-366.js";import{s as l}from"./machine.-tangy-colts-beg-869.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,e){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,e),e)}};const T=r(({helpers:n})=>({states:{components:[E(n),{componentName:n.componentName.select,helperText:a("Choose the deepseek model to use here. E.g. Deepseek Chat."),id:"model-id",label:a("Model"),onChange:"SELECT_MODEL",onRefetch:"REFETCH_MODEL",optionFilterProp:"label",options:[],path:"model",placeholder:a("Select a Model"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{componentName:n.componentName.mixInput,helperText:a("Enter the maximum number of tokens that can be generated in the chat completion here. E.g. 2048."),id:"max-tokens",label:a("Max Tokens"),onChange:"HANDLE_MAX_TOKEN",path:"max_tokens",placeholder:a("Enter the token value"),render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:n.componentName.mixInput,helperText:a("Enter the temperature <= 2 here. E.g. 1."),id:"temperature-val",label:a("Temperatures"),onChange:"HANDLE_TEMPERATURE",path:"temperature",placeholder:a("Enter temperature value"),render:"IF_CONNECTION_SELECTED",value:void 0}]},actions:{IF_CONNECTION_SELECTED:({$:e})=>{var o;return s((o=e.getComponent("connection-id"))==null?void 0:o.value)},ON_CHANGE_MESSAGE_FIELD:({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o})},ON_MACHINE_LOAD:async({$:e})=>{l(e,[{db:"connectionId",id:"connection-id"},{db:"modelId",id:"model-id"},{db:"maxTokens",id:"max-tokens"},{db:"temperatureVal",id:"temperature-val"}]),await m(e)},REFETCH_MODEL:async({$:e})=>{await m(e)},SELECT_MODEL:async({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o}),e.setDb(t=>{t.modelId=o})},HANDLE_MAX_TOKEN:async({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o}),e.setDb(t=>{t.maxTokens=o})},HANDLE_TEMPERATURE:async({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o}),e.setDb(t=>{t.temperatureVal=o})},SET_CONNECTION:async({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o}),e.setDb(t=>{t.connectionId=o}),await m(e)},CONNECTION_ADD_CHANGE:i}}));export{T as default};
