import{b as m,i as a}from"./useflows-BpG3C9m1.js";import{e as t}from"./main-few-lands-burn.js";import{h as i,c as d}from"./commonut-0ul1PEs-.js";import{f as r}from"./machineh-OOc3R6Tc.js";import{s as l,h as n}from"./machine.-BRuqPpdF.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const C=m(({helpers:o})=>({states:{components:[d(o),{componentName:o.componentName.select,helperText:t("Choose the Groq model to use here. E.g. llama-3.3-70b-versatile."),id:"model-id",label:t("Model"),onChange:"HANDLE_MODEL_CHANGE",onRefetch:"REFETCH_MODELS",optionFilterProp:"label",options:[],path:"model",render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:o.componentName.mixInput,helperText:t("The maximum number of tokens that can be generated in the chat completion. If empty, the limit of the model will be used."),id:"max-tokens",label:t("Max Tokens Returned"),onChange:"SET_MAX_TOKENS",path:"max_tokens",render:"IF_MODEL_SELECTED",value:[]},{componentName:o.componentName.switch,fieldType:"config",id:"show-advance-feature",label:t("Show Advanced Settings"),onChange:"SET_FEATURE",path:"advance-feature",render:"IF_MODEL_SELECTED",size:"small",value:!1},{componentName:o.componentName.mixInput,helperText:t("Controls randomness in the response. Higher values (e.g., 0.8) make output more random and creative. Lower values (e.g., 0.2) make it more focused and deterministic. Range: 0-2, Default: 1."),id:"temperature",label:t("Temperature"),onChange:"SET_TEMPERATURE",path:"temperature",render:"IF_ADVANCE_FEATURE_SELECTED",value:[]},{componentName:o.componentName.mixInput,helperText:t("An alternative to temperature for controlling randomness. Top-p sampling considers only the top tokens whose cumulative probability mass is p. For example, 0.1 means only tokens in the top 10% probability are considered. Range: 0-1, Default: 1."),id:"top-p",label:t("Top P"),onChange:"SET_TOP_P",path:"top_p",render:"IF_ADVANCE_FEATURE_SELECTED",value:[]},{componentName:o.componentName.mixInput,helperText:t("Positive values penalize tokens based on their frequency in the text so far, decreasing the likelihood of repeated phrases. Range: -2.0 to 2.0, Default: 0."),id:"frequency-penalty",label:t("Frequency Penalty"),onChange:"SET_FREQUENCY_PENALTY",path:"frequency_penalty",render:"IF_ADVANCE_FEATURE_SELECTED",value:[]},{componentName:o.componentName.mixInput,helperText:t("If specified, the system will attempt to sample deterministically such that repeated requests with the same seed and parameters return the same result. Useful for reproducibility."),id:"seed",label:t("Seed"),onChange:"SET_SEED",path:"seed",render:"IF_ADVANCE_FEATURE_SELECTED",value:[]}]},actions:{CONNECTION_ADD_CHANGE:i,HANDLE_MODEL_CHANGE:n("modelId"),HANDLE_RESPONSE_FORMAT:n("responseFormat"),IF_CONNECTION_SELECTED:({$:e})=>a(e.getComponent("connection-id")?.value),IF_MODEL_SELECTED:({$:e})=>a(e.getComponent("model-id")?.value),REFETCH_MODELS:({$:e})=>r(e),SET_FEATURE:n("showAdvanceFeature"),SET_FREQUENCY_PENALTY:n("frequencyPenalty"),SET_MAX_TOKENS:n("maxTokens"),SET_SEED:n("seed"),SET_TEMPERATURE:n("temperature"),SET_TOP_P:n("topP"),IF_ADVANCE_FEATURE_SELECTED:({$:e})=>a(e.getComponent("connection-id")?.value)&&e.getComponent("show-advance-feature")?.value===!0,SET_CONNECTION:({$:e,e:E})=>{n("connectionId")({$:e,e:E}),r(e)},ON_MACHINE_LOAD:({$:e})=>{l(e,[{db:"connectionId",id:"connection-id"},{db:"modelId",id:"model-id"},{db:"maxTokens",id:"max-tokens"},{db:"contextLength",id:"context-length"},{db:"temperature",id:"temperature"},{db:"topP",id:"top-p"},{db:"frequencyPenalty",id:"frequency-penalty"},{db:"seed",id:"seed"},{db:"showAdvanceFeature",id:"show-advance-feature"}]),r(e)}}}));export{C as default};
