mono2: transcribe

This commit is contained in:
bignutty 2024-05-24 00:06:08 +02:00
parent b209c257ec
commit fa50daa2e7
4 changed files with 18 additions and 15 deletions

View file

@ -7,6 +7,8 @@ const ObeliskApi = Object.freeze({
HOST: ObeliskHosts.prod,
// monolith2
AUDIO_TRANSCRIBE: "/audio/v1/transcribe",
LLM_PRIVATE_BARD: "/llm/v1/_private:bard",
LLM_MODELS_GENERATE: "/llm/v1/generate",

View file

@ -40,6 +40,13 @@ async function request(path, type, headers, args, host) {
}
// monolith2
module.exports.AudioTranscribe = async function(context, url){
return await request(ObeliskApi.AUDIO_TRANSCRIBE, "POST", {}, {
url,
type: "VOICE_MESSAGE"
})
}
module.exports.LlmPrivateBard = async function(context, prompt){
return await request(ObeliskApi.LLM_PRIVATE_BARD, "POST", {}, {
prompt