import{b as r,i as E}from"./useflows-BpG3C9m1.js";import{e}from"./main-few-lands-burn.js";import{s as _,h as t}from"./machine.-BRuqPpdF.js";import{h as d,c as s}from"./commonut-BBfXq81f.js";import{f as a,a as i}from"./machineh-F5S5pxBI.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const u=r(({helpers:o})=>({states:{components:[s(o),{componentName:o.componentName.mixInput,helperText:e("Enter the name for the agent."),id:"name",label:e("Name"),onChange:"SET_NAME",path:"name",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:o.componentName.select,helperText:e("Select the voice for the agent."),id:"voice-id",isMappable:!0,label:e("Voice"),onChange:"HANDLE_VOICE_CHANGE",onRefetch:"REFETCH_VOICES",optionFilterProp:"label",options:[],path:"conversation_config.tts.voice_id",render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:o.componentName.mixInput,helperText:e("Enter the prompt/system message for the agent."),id:"prompt",label:e("Prompt"),onChange:"SET_PROMPT",path:"conversation_config.agent.prompt.prompt",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:o.componentName.mixInput,helperText:e("Select the LLM (Large Language Model) to use."),id:"llm",label:e("LLM"),onChange:"HANDLE_LLM_CHANGE",path:"conversation_config.llm.model_id",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:o.componentName.mixInput,helperText:e("Controls randomness in responses. Range: 0.0 to 2.0. Default: 1.0."),id:"temperature",label:e("Temperature"),onChange:"SET_TEMPERATURE",path:"conversation_config.llm.temperature",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:o.componentName.mixInput,helperText:e("The first message the agent will say."),id:"first-message",label:e("First Message"),onChange:"SET_FIRST_MESSAGE",path:"conversation_config.agent.first_message",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:o.componentName.mixInput,helperText:e('Language code for the agent (e.g., "en" for English, "es" for Spanish).'),id:"language-code",label:e("Language Code"),onChange:"SET_LANGUAGE_CODE",path:"conversation_config.asr.language",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:o.componentName.select,helperText:e("Select the model to use for the agent."),id:"model-id",isMappable:!0,label:e("Model"),onChange:"HANDLE_MODEL_CHANGE",onRefetch:"REFETCH_MODELS",optionFilterProp:"label",options:[],path:"conversation_config.tts.model_id",render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{componentName:o.componentName.mixInput,helperText:e("Maximum duration for agent responses in seconds."),id:"max-duration-seconds",label:e("Max Duration Seconds"),onChange:"SET_MAX_DURATION_SECONDS",path:"conversation_config.max_duration_seconds",render:"IF_CONNECTION_SELECTED",value:[]}]},actions:{CONNECTION_ADD_CHANGE:d,HANDLE_LLM_CHANGE:t("llm"),HANDLE_MODEL_CHANGE:t("model_id"),HANDLE_VOICE_CHANGE:t("voice_id"),IF_CONNECTION_SELECTED:({$:n})=>E(n.getComponent("connection-id")?.value),REFETCH_MODELS:({$:n})=>a(n),REFETCH_VOICES:({$:n})=>i(n),SET_FIRST_MESSAGE:t("first_message"),SET_LANGUAGE_CODE:t("language_code"),SET_MAX_DURATION_SECONDS:t("max_duration_seconds"),SET_NAME:t("name"),SET_PROMPT:t("prompt"),SET_TEMPERATURE:t("temperature"),SET_CONNECTION:({$:n,e:m})=>{t("connectionId")({$:n,e:m}),Promise.all([a(n),i(n)])},ON_MACHINE_LOAD:({$:n})=>{_(n,[{db:"connectionId",id:"connection-id"},{db:"name",id:"name"},{db:"prompt",id:"prompt"},{db:"llm",id:"llm"},{db:"temperature",id:"temperature"},{db:"first_message",id:"first-message"},{db:"language_code",id:"language-code"},{db:"model_id",id:"model-id"},{db:"voice_id",id:"voice-id"},{db:"max_duration_seconds",id:"max-duration-seconds"}]),Promise.all([a(n),i(n)])}}}));export{u as default};
