import{b as d,i as a}from"./useflows-BpG3C9m1.js";import{e as n}from"./main-few-lands-burn.js";import{s as i,h as t}from"./machine.-BRuqPpdF.js";import{f as E}from"./machineh-Bi3Utrxo.js";import{h as l,c as p}from"./openrout-FNcGqTWz.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const N=d(({helpers:o})=>({states:{components:[p(o),{componentName:o.componentName.select,helperText:n("Select the AI model to use for generating the completion."),id:"model-id",label:n("Model"),onChange:"HANDLE_MODEL_CHANGE",onRefetch:"REFETCH_MODELS",optionFilterProp:"label",options:[],path:"model",placeholder:n("Select a Model"),render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:o.componentName.switch,id:"show-advance-feature",label:n("Show Advance Feature"),onChange:"SET_FEATURE",path:"advance-feature",render:"IF_MODEL_SELECTED",size:"small",value:!1},{componentName:o.componentName.mixInput,helperText:n("Controls randomness: 0 is focused and deterministic, 1 is more creative. Range: 0-2"),id:"temperature",label:n("Temperature"),onChange:"SET_TEMPERATURE",path:"temperature",render:"IF_ADVANCE_FEATURE_SELECTED",required:!1,value:[]},{componentName:o.componentName.mixInput,helperText:n("Nucleus sampling: consider only tokens with top_p probability mass. Range: 0-1"),id:"top-p",label:n("Top P"),onChange:"SET_TOP_P",path:"top_p",render:"IF_ADVANCE_FEATURE_SELECTED",required:!1,value:[]},{componentName:o.componentName.mixInput,helperText:n("Penalty for repeated tokens. Positive values discourage repetition. Range: -2 to 2"),id:"frequency-penalty",label:n("Frequency Penalty"),onChange:"SET_FREQUENCY_PENALTY",path:"frequency_penalty",render:"IF_ADVANCE_FEATURE_SELECTED",required:!1,value:[]},{componentName:o.componentName.mixInput,helperText:n("Penalty for new topics. Positive values encourage new topics. Range: -2 to 2"),id:"presence-penalty",label:n("Presence Penalty"),onChange:"SET_PRESENCE_PENALTY",path:"presence_penalty",render:"IF_ADVANCE_FEATURE_SELECTED",required:!1,value:[]},{componentName:o.componentName.mixInput,helperText:n("Random seed for deterministic sampling. Use the same seed to get consistent results."),id:"seed",label:n("Seed"),onChange:"SET_SEED",path:"seed",render:"IF_ADVANCE_FEATURE_SELECTED",required:!1,value:[]}]},actions:{CONNECTION_ADD_CHANGE:l,HANDLE_MODEL_CHANGE:t("modelId"),HANDLE_RESPONSE_FORMAT:t("responseFormat"),IF_CONNECTION_SELECTED:({$:e})=>a(e.getComponent("connection-id")?.value),IF_MODEL_SELECTED:({$:e})=>a(e.getComponent("model-id")?.value),REFETCH_MODELS:({$:e})=>E(e),SET_FEATURE:t("showAdvanceFeature"),SET_FREQUENCY_PENALTY:t("frequencyPenalty"),SET_PRESENCE_PENALTY:t("presencePenalty"),SET_SEED:t("seed"),SET_TEMPERATURE:t("temperature"),SET_TOP_P:t("topP"),IF_MEMORY_KEY_SWITCH:({$:e})=>a(e.getComponent("connection-id")?.value)&&e.getComponent("memory-key-switch")?.value===!0,IF_ADVANCE_FEATURE_SELECTED:({$:e})=>a(e.getComponent("connection-id")?.value)&&e.getComponent("show-advance-feature")?.value===!0,SET_CONNECTION:({$:e,e:r})=>{t("connectionId")({$:e,e:r}),E(e)},ON_MACHINE_LOAD:({$:e})=>{i(e,[{db:"connectionId",id:"connection-id"},{db:"modelId",id:"model-id"},{db:"temperature",id:"temperature"},{db:"topP",id:"top-p"},{db:"frequencyPenalty",id:"frequency-penalty"},{db:"presencePenalty",id:"presence-penalty"},{db:"seed",id:"seed"},{db:"showAdvanceFeature",id:"show-advance-feature"}]),E(e)}}}));export{N as default};
