import{l as c}from"./main-few-lands-burn.js";const u=async e=>c({headers:{Authorization:["Bearer ",{encryption:"hmac_decrypt",value:e}]},method:"GET",url:"https://api.groq.com/openai/v1/models"}),m=async e=>{e.setComponent("model-id",o=>{e.util.isSelectComponent(o)&&(o.loading=!0)});const i=await e.getConnection();if(i)try{const{data:o,status:n}=await u(i.auth_details.value);if(n!=="success")throw new Error("Invalid response format");const s=e.thisNode.machineSlug,l=o.data.map(t=>({label:`${t.id}`,value:t.id})).filter(t=>{const a=t.value.toLowerCase().includes("vision"),r=t.value.toLowerCase().includes("whisper");return s==="analyzeImage"?a:s==="transcribeAudio"||s==="translateAudio"?r:!a&&!r});e.setComponent("model-id",t=>{e.util.isSelectComponent(t)&&(t.options=l,t.loading=!1)})}catch(o){e.setComponent("model-id",n=>{e.util.isSelectComponent(n)&&(n.loading=!1,n.status="error",n.invalidMessage=o.message)})}};export{m as f};
