-
-
Notifications
You must be signed in to change notification settings - Fork 1
feat:Add keyterms_prompt parameter, deprecate prompt and word_boost, update SpeechModel enum #72
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
Conversation
WalkthroughThe OpenAPI specification for AssemblyAI's API was updated to introduce two new optional parameters, Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
Client->>API: Create Transcript (with keyterms_prompt, speech_model)
Note right of API: If speech_model == slam-1,<br>keyterms_prompt is used
API-->>Client: Transcript response (includes new fields, deprecated fields marked)
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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: 2
🧹 Nitpick comments (2)
src/libs/AssemblyAI/openapi.yaml (2)
2846-2853: Add validation constraints forkeyterms_promptin response
As with the request schema, the response should reflect the 1000-item max and any per‑item length restrictions.
2173-2178: Define mappings for new models inx-fern-enum
Thex-fern-enumentries foruniversalandslam-1are added appropriately.For consistency with other model names, consider using all‑caps “SLAM‑1” in the
namefield.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeechModel.g.csis excluded by!**/generated/**src/libs/AssemblyAI/Generated/AssemblyAI.Models.Transcript.g.csis excluded by!**/generated/**src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParams.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/AssemblyAI/openapi.yaml(5 hunks)
🔇 Additional comments (5)
src/libs/AssemblyAI/openapi.yaml (5)
1340-1347: Markword_boostas deprecated in OptionalParams
Deprecatingword_boostinTranscriptOptionalParamsaligns with the feature removal plan—ensure SDK generators and client libraries drop support for this field.
1445-1449: Deprecatedpromptparameter
Markingpromptas deprecated in the request schema is correct. Verify that client code and SDKs mark it deprecated and discourage usage.
2747-2753: Deprecateword_boostinTranscriptresponse schema
Consistently deprecatingword_boostin the response object ensures consumers will stop relying on it. Make sure response serializers drop this field.
2855-2859: DeprecatedpromptinTranscriptresponse schema
Consistent with the request side, deprecateprompthere and ensure client models flag it deprecated.
2169-2172: ExtendSpeechModelenum withslam-1anduniversal
Introducing these new enum variants is correct—clients will need to regenerate their enums to pick up the new values.
| keyterms_prompt: | ||
| x-label: Keyterms prompt | ||
| description: | | ||
| <Warning>`keyterms_prompt` is only supported when the `speech_model` is specified as `slam-1`</Warning> | ||
| Improve accuracy with up to 1000 domain-specific words or phrases (maximum 6 words per phrase). | ||
| type: array | ||
| items: | ||
| x-label: Keyterm | ||
| type: string | ||
|
|
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.
🛠️ Refactor suggestion
Add validation constraints for keyterms_prompt
The description calls out “up to 1000 domain-specific words or phrases (maximum 6 words per phrase)” but the schema lacks any maxItems or per-item length constraints.
Consider adding:
keyterms_prompt:
type: array
maxItems: 1000
items:
type: string
# optionally enforce maxLength or pattern to limit to 6 wordsto enforce the documented limits.
| name: Slam-1 | ||
| description: A contextual model optimized for customization. | ||
| best: | ||
| name: Best |
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.
Fix typo in model description
There is a spelling mistake: “mutli-language” should be “multi-language.”
- description: The model optimized for accuracy, low latency, ease of use, and mutli-language support.
+ description: The model optimized for accuracy, low latency, ease of use, and multi-language support.Committable suggestion skipped: line range outside the PR's diff.
Summary by CodeRabbit