import{b as E,i as r}from"./useflows-BpG3C9m1.js";import{e as n}from"./main-few-lands-burn.js";import{h as l,c as s}from"./commonut-DeDTE7bj.js";import{f as m}from"./machineh-COlen7Tf.js";import{s as i}from"./machine.-BRuqPpdF.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const _=E(({helpers:a})=>({states:{components:[s(a),{componentName:a.componentName.select,helperText:n("Choose the deepseek model to use here. E.g. Deepseek Chat."),id:"model-id",label:n("Model"),onChange:"SELECT_MODEL",onRefetch:"REFETCH_MODEL",optionFilterProp:"label",options:[],path:"model",placeholder:n("Select a Model"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{componentName:a.componentName.mixInput,helperText:n("Enter the maximum number of tokens that can be generated in the chat completion here. E.g. 2048."),id:"max-tokens",label:n("Max Tokens"),onChange:"HANDLE_MAX_TOKEN",path:"max_tokens",placeholder:n("Enter the token value"),render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:a.componentName.mixInput,helperText:n("Enter the temperature <= 2 here. E.g. 1."),id:"temperature-val",label:n("Temperatures"),onChange:"HANDLE_TEMPERATURE",path:"temperature",placeholder:n("Enter temperature value"),render:"IF_CONNECTION_SELECTED",value:void 0}]},actions:{IF_CONNECTION_SELECTED:({$:e})=>r(e.getComponent("connection-id")?.value),ON_CHANGE_MESSAGE_FIELD:({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o})},ON_MACHINE_LOAD:async({$:e})=>{i(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:l}}));export{_ as default};
