@directus-labs/ai-transcription-operation
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -1,1 +0,1 @@ | ||
import{request as r}from"directus:api";var e={id:"directus-labs-ai-transcription",handler:async({apiKey:e,url:t})=>{try{const a=await r("https://api.deepgram.com/v1/listen?model=nova-2&smart_format=true",{method:"POST",headers:{Authorization:`Token ${e}`,"Content-Type":"application/json"},body:JSON.stringify({url:t})});if(200!=a.status)throw new Error("An error occurred when accessing Deepgram");return a.data.results.channels[0].alternatives[0]}catch(r){throw log(r.message),new Error(r.message)}}};export{e as default}; | ||
import{request as r,log as e}from"directus:api";var t={id:"directus-labs-ai-transcription",handler:async({apiKey:t,url:a})=>{try{const e=await r("https://api.deepgram.com/v1/listen?model=nova-2&smart_format=true",{method:"POST",headers:{Authorization:`Token ${t}`,"Content-Type":"application/json"},body:JSON.stringify({url:a})});if(200!=e.status)throw new Error("An error occurred when accessing Deepgram");return e.data.results.channels[0].alternatives[0]}catch(r){throw e(r.message),new Error(r.message)}}};export{t as default}; |
@@ -5,3 +5,3 @@ { | ||
"icon": "extension", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"license": "MIT", | ||
@@ -8,0 +8,0 @@ "keywords": [ |
5320