-
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat:Add new audio processing endpoints for transcriptions and translations #85
Conversation
WalkthroughThe changes introduce two new endpoints to the OpenAPI specification for audio processing: Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
src/libs/DeepInfra/openapi.yaml (3)
1467-1501
: Consider enhancing the transcription endpoint specification.The endpoint definition could be improved with:
- Specify the response content type and schema for 200 status
- Add rate limiting headers
- Document file size limits and supported audio formats
/v1/openai/audio/transcriptions: post: summary: Openai Audio Transcriptions + description: Transcribe audio files to text with optional language detection and formatting options. operationId: openai_audio_transcriptions_v1_openai_audio_transcriptions_post parameters: - name: x-deepinfra-source in: header schema: title: X-Deepinfra-Source type: string + - name: x-ratelimit-limit + in: header + schema: + type: integer + description: Request limit per hour responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AudioTranscriptionResponse' + '413': + description: Payload Too Large + content: + application/json: + schema: + $ref: '#/components/schemas/DeepError'
2693-2765
: Enhance request body schemas with better documentation.The request body schemas could be improved with:
- Better documentation for supported file formats and size limits
- Clearer descriptions for parameters like temperature and response_format
- Examples for each parameter
Body_openai_audio_transcriptions_v1_openai_audio_transcriptions_post: title: Body_openai_audio_transcriptions_v1_openai_audio_transcriptions_post required: - file - model type: object properties: file: title: File type: string format: binary + description: | + The audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm. + Maximum file size: 25MB. model: title: Model type: string + description: ID of the model to use. Only whisper-1 is currently available. + example: whisper-1 temperature: title: Temperature type: number default: 0 + description: | + The sampling temperature, between 0 and 1. + Higher values like 0.8 will make the output more random, + while lower values like 0.2 will make it more focused and deterministic.
4645-4646
: Consider grouping related schema variant keys.The schema variant keys could be better organized by grouping related functionality together.
SchemaVariantKey: title: SchemaVariantKey enum: - - openai-completions - - openai-chat-completions - - openai-embeddings - - openai-speech-to-text + # Text generation + - openai-completions + - openai-chat-completions + # Embeddings + - openai-embeddings + # Audio processing + - openai-speech-to-text
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (25)
src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranscriptions.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioTranslations.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranscriptions.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.OpenaiAudioTranslations.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.Json.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPost.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.Json.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPost.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.ModelDocBlockKey.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.Json.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponse.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.Json.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.OpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponse.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/DeepInfra.Models.SchemaVariantKey.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormat.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostResponseFormatNullable.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitie.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranscriptionsV1OpenaiAudioTranscriptionsPostTimestampGranularitieNullable.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormat.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/JsonConverters.BodyOpenaiAudioTranslationsV1OpenaiAudioTranslationsPostResponseFormatNullable.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/JsonSerializerContext.g.cs
is excluded by!**/generated/**
src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs
is excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/DeepInfra/openapi.yaml
(4 hunks)
Summary by CodeRabbit
/v1/openai/audio/transcriptions
for audio transcription./v1/openai/audio/translations
for audio translation.