import{aa as i,ab as m}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{s as r}from"./machine.-tangy-colts-beg-869.js";import{h as p,a as l,c as s}from"./commonut-tangy-colts-beg-674.js";import{f as E}from"./machineh-tangy-colts-beg-25.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(a,t){return this.cache.has(a)?this.cache.get(a):(this.cache.set(a,t),t)}};const C=i(({helpers:a})=>({states:{components:[s(a),{componentName:a.componentName.select,helperText:e("Choose the gemini model to use here."),id:"model-id",label:e("Model"),onChange:"SELECT_MODEL",onRefetch:"REFETCH_MODEL",optionFilterProp:"label",options:[],path:"model",placeholder:e("Select a Model"),render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{componentName:a.componentName.mixInput,helperText:e("Write the message"),id:"message-id",label:e("Message"),onChange:"SELECT_MESSAGE",path:"message",placeholder:e("Enter message"),render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:a.componentName.switch,fieldType:"config",id:"show-advance-feature",label:e("Show Advance Feature"),onChange:"SET_FEATURE",render:"IF_CONNECTION_SELECTED",value:!1},{componentName:a.componentName.mixInput,helperText:e("Enter the The maximum number of tokens to include in an output. Default is 1024."),id:"max-token",label:e("Max Token"),onChange:"SET_MAX_TOKEN",path:"max_token",placeholder:e("Enter the token value"),render:"IF_ADVANCE_FEATURE_SELECTED",value:void 0},{componentName:a.componentName.mixInput,helperText:e(" Controls the randomness of the output. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model. "),id:"temperature-val",path:"temperature",label:e("Temperatures"),onChange:"SET_TEMPERATURE",placeholder:e("Enter temperature value"),render:"IF_ADVANCE_FEATURE_SELECTED",value:void 0},{componentName:a.componentName.mixInput,helperText:e("The maximum cumulative probability of tokens to consider when sampling. Enter the sampling value between 0.0 to 1.0"),id:"topP-val",path:"topP",label:e("topP Sampling Value"),onChange:"SET_TOP_P",placeholder:e("Enter topP value"),render:"IF_ADVANCE_FEATURE_SELECTED",value:void 0},{componentName:a.componentName.mixInput,helperText:e("The maximum number of tokens to consider when sampling. Enter the sampling value between 1 to 100"),id:"topK-val",path:"topK",label:e("topK Sampling Value"),onChange:"SET_TOP_K",placeholder:e("Enter topK value"),render:"IF_ADVANCE_FEATURE_SELECTED",value:void 0},{componentName:a.componentName.mixInput,helperText:e("The set of character sequence that will stop output generation. If specified, the API will stop at the first appearance of a stop sequence."),path:"stop_sequence",id:"stop-sequence",label:e("Stop Sequence"),onChange:"SET_STOP_SEQUENCE",placeholder:e("Enter stop sequences"),render:"IF_ADVANCE_FEATURE_SELECTED",value:void 0}]},actions:{IF_ADVANCE_FEATURE_SELECTED:({$:t})=>{var o;return((o=t.getComponent("show-advance-feature"))==null?void 0:o.value)===!0},IF_CONNECTION_SELECTED:({$:t})=>{var o;return m((o=t.getComponent("connection-id"))==null?void 0:o.value)},ON_MACHINE_LOAD:async({$:t})=>{r(t,[{db:"connectionId",id:"connection-id"},{db:"modelId",id:"model-id"},{db:"maxToken",id:"max-token"},{db:"temperatureVal",id:"temperature-val"},{db:"topPVal",id:"topP-val"},{db:"topKVal",id:"topK-val"},{db:"stopSequence",id:"stop-sequence"},{db:"showAdvanceFeature",id:"show-advance-feature"},{db:"messageId",id:"message-id"}]),await E(t)},REFETCH_MODEL:async({$:t})=>{await E(t)},SELECT_MESSAGE:l("messageId"),SELECT_MODEL:l("modelId"),SET_MAX_TOKEN:l("maxToken"),SET_STOP_SEQUENCE:l("stopSequence"),SET_TEMPERATURE:l("temperatureVal"),SET_TOP_K:l("topKVal"),SET_TOP_P:l("topPVal"),SET_FEATURE:async({$:t,e:o})=>{t.setThisComponent(n=>{n.value=o}),t.setDb(n=>{n.showAdvanceFeature=o})},SET_CONNECTION:async({$:t,e:o})=>{t.setThisComponent(n=>{n.value=o}),t.setDb(n=>{n.connectionId=o}),await E(t)},CONNECTION_ADD_CHANGE:p}}));export{C as default};
