chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import * as common from '@botpress/common'
|
||||
import { z, InterfaceDefinition } from '@botpress/sdk'
|
||||
|
||||
export default new InterfaceDefinition({
|
||||
name: 'speech-to-text',
|
||||
version: '2.0.2',
|
||||
entities: {
|
||||
speechToTextModelRef: {
|
||||
schema: common.speechToText.schemas.SpeechModelRefSchema,
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
transcribeAudio: {
|
||||
billable: true,
|
||||
cacheable: true,
|
||||
input: {
|
||||
schema: ({ speechToTextModelRef }) =>
|
||||
common.speechToText.schemas.TranscribeAudioInputSchema(speechToTextModelRef),
|
||||
},
|
||||
output: {
|
||||
schema: () => common.speechToText.schemas.TranscribeAudioOutputSchema,
|
||||
},
|
||||
},
|
||||
listSpeechToTextModels: {
|
||||
input: {
|
||||
schema: () => z.object({}),
|
||||
},
|
||||
output: {
|
||||
schema: ({ speechToTextModelRef }) =>
|
||||
z.object({
|
||||
models: z.array(z.intersection(common.speechToText.schemas.SpeechToTextModelSchema, speechToTextModelRef)),
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
__advanced: {
|
||||
useLegacyZuiTransformer: true,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user