import{b as m,i as l}from"./useflows-BpG3C9m1.js";import{e as a}from"./main-few-lands-burn.js";import{s as r}from"./machine.-BRuqPpdF.js";import{h as i,c as E}from"./commonut-DeDTE7bj.js";import{f as s}from"./machineh-COlen7Tf.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const _=m(({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},{addItemButtonLabel:"Add Message",componentName:n.componentName.repeaterField,fieldsMetaData:[{componentName:n.componentName.select,label:a("Role"),name:"role",options:[{label:a("User"),value:"user"},{label:a("Assistant"),value:"assistant"},{label:a("System"),value:"system"}],showSearch:!0,style:{width:120},value:""},{componentName:n.componentName.mixInput,label:a("Message"),name:"content",value:[],wrapperClassName:"w-100"}],id:"message-field-properties",label:a("Messages"),onChange:"ON_CHANGE_MESSAGE_FIELD",path:"messageFieldProperties",render:"IF_CONNECTION_SELECTED",value:[]}]},actions:{IF_CONNECTION_SELECTED:({$:e})=>l(e.getComponent("connection-id")?.value),ON_CHANGE_MESSAGE_FIELD:({$:e,e:o})=>{e.setThisComponent(t=>{t.value=o}),e.setDb(t=>{t.messageFieldProperties=o})},ON_MACHINE_LOAD:async({$:e})=>{r(e,[{db:"connectionId",id:"connection-id"},{db:"modelId",id:"model-id"},{db:"maxTokens",id:"max-tokens"},{db:"temperatureVal",id:"temperature-val"},{db:"messageFieldProperties",id:"message-field-properties"}]),await s(e)},REFETCH_MODEL:async({$:e})=>{await s(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 s(e)},CONNECTION_ADD_CHANGE:i}}));export{_ as default};
