Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Apr 23, 2025

Summary by CodeRabbit

  • New Features
    • Added support for the new speech models "slam-1" (customization-focused) and "universal" (multi-language, high-accuracy, low-latency).
    • Introduced an optional "keyterms_prompt" parameter to improve transcription accuracy using up to 1000 domain-specific terms (supported with "slam-1" model).
  • Deprecations
    • Marked the "word_boost" parameter as deprecated.
    • Added a deprecated "prompt" parameter (no current functionality).
  • Documentation
    • Updated descriptions for speech models to reflect new capabilities.

@coderabbitai
Copy link

coderabbitai bot commented Apr 23, 2025

Walkthrough

The OpenAPI specification for AssemblyAI's API was updated to introduce two new optional parameters, keyterms_prompt and prompt, to transcript-related schemas. The keyterms_prompt parameter allows specifying up to 1000 domain-specific phrases to improve transcription accuracy, but is only supported with the slam-1 speech model. The prompt parameter is now marked as deprecated. The word_boost property has also been deprecated. Additionally, the SpeechModel enum now includes two new values: slam-1 and universal, with updated descriptions for these and the existing best model.

Changes

File(s) Change Summary
src/libs/AssemblyAI/openapi.yaml Added keyterms_prompt and deprecated prompt to transcript schemas; deprecated word_boost; extended SpeechModel enum with slam-1 and universal; updated model descriptions.

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)
Loading

Poem

🐇
New prompts and models hop into play,
With slam-1 and universal, transcripts find their way.
Deprecated boosts and prompts now rest,
While keyterms guide the model to do its best.
The API grows smarter, as specs evolve anew—
Hopping forward, AssemblyAI, we’re rooting for you!


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@HavenDV HavenDV enabled auto-merge April 23, 2025 15:21
@HavenDV HavenDV merged commit 80f31b6 into main Apr 23, 2025
3 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202504231520 branch April 23, 2025 15:22
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Add keyterms_prompt parameter, deprecate prompt and word_boost, update SpeechModel enum Apr 23, 2025
Copy link

@coderabbitai coderabbitai bot left a 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 for keyterms_prompt in 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 in x-fern-enum
The x-fern-enum entries for universal and slam-1 are added appropriately.

For consistency with other model names, consider using all‑caps “SLAM‑1” in the name field.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d75b316 and c3052e5.

⛔ Files ignored due to path filters (3)
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.SpeechModel.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.Transcript.g.cs is excluded by !**/generated/**
  • src/libs/AssemblyAI/Generated/AssemblyAI.Models.TranscriptOptionalParams.g.cs is 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: Mark word_boost as deprecated in OptionalParams
Deprecating word_boost in TranscriptOptionalParams aligns with the feature removal plan—ensure SDK generators and client libraries drop support for this field.


1445-1449: Deprecated prompt parameter
Marking prompt as deprecated in the request schema is correct. Verify that client code and SDKs mark it deprecated and discourage usage.


2747-2753: Deprecate word_boost in Transcript response schema
Consistently deprecating word_boost in the response object ensures consumers will stop relying on it. Make sure response serializers drop this field.


2855-2859: Deprecated prompt in Transcript response schema
Consistent with the request side, deprecate prompt here and ensure client models flag it deprecated.


2169-2172: Extend SpeechModel enum with slam-1 and universal
Introducing these new enum variants is correct—clients will need to regenerate their enums to pick up the new values.

Comment on lines +1435 to +1444
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

Copy link

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 words

to enforce the documented limits.

name: Slam-1
description: A contextual model optimized for customization.
best:
name: Best
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants