Skip to content

Commit

Permalink
Update AI api schema (#2326)
Browse files Browse the repository at this point in the history
Need to include a new return_timestamps field for audio-to-text
  • Loading branch information
mjh1 authored Nov 8, 2024
1 parent 49ac859 commit a5cbf75
Showing 1 changed file with 35 additions and 18 deletions.
53 changes: 35 additions & 18 deletions packages/api/src/schema/ai-api-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,14 @@ paths:
oneOf:
- $ref: '#/components/schemas/HTTPError'
- $ref: '#/components/schemas/studio-api-error'
'415':
description: Unsupported Media Type
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/HTTPError'
- $ref: '#/components/schemas/studio-api-error'
'422':
description: Validation Error
content:
Expand Down Expand Up @@ -452,6 +460,15 @@ components:
title: Model Id
description: Hugging Face model ID used for transcription.
default: openai/whisper-large-v3
return_timestamps:
type: string
title: Return Timestamps
description: >-
Return timestamps for the transcribed text. Supported values:
'sentence', 'word', or a string boolean ('true' or 'false'). Default
is 'true' ('sentence'). 'false' means no timestamps. 'word' means
word-based timestamps.
default: 'true'
type: object
required:
- audio
Expand Down Expand Up @@ -735,6 +752,23 @@ components:
- image
title: Body_genUpscale
additionalProperties: false
Chunk:
properties:
timestamp:
items: {}
type: array
title: Timestamp
description: The timestamp of the chunk.
text:
type: string
title: Text
description: The text of the chunk.
type: object
required:
- timestamp
- text
title: Chunk
description: A chunk of text with a timestamp.
HTTPError:
properties:
detail:
Expand Down Expand Up @@ -831,7 +865,7 @@ components:
description: The generated text.
chunks:
items:
$ref: '#/components/schemas/chunk'
$ref: '#/components/schemas/Chunk'
type: array
title: Chunks
description: The generated text chunks.
Expand Down Expand Up @@ -948,23 +982,6 @@ components:
- images
title: VideoResponse
description: Response model for image generation.
chunk:
properties:
timestamp:
items: {}
type: array
title: Timestamp
description: The timestamp of the chunk.
text:
type: string
title: Text
description: The text of the chunk.
type: object
required:
- timestamp
- text
title: chunk
description: A chunk of text with a timestamp.
studio-api-error:
type: object
properties:
Expand Down

0 comments on commit a5cbf75

Please sign in to comment.