-
Notifications
You must be signed in to change notification settings - Fork 63
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
fix: keyterms to keyterm #363
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ interface TranscriptionSchema extends Record<string, unknown> { | |
/** | ||
* @see https://developers.deepgram.com/docs/keyterm | ||
*/ | ||
keyterms?: string[] | string; | ||
keyterm?: string[] | string; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify breaking change impact. The renaming of Run the following script to find all usages of the old property name: 🏁 Script executed: #!/bin/bash
# Description: Find any remaining usages of the old property name.
rg -i "keyterms" --type ts Length of output: 384 Action: Update error messages and documentation for the property rename The change from
Please verify that these error messages are either updated to reflect the new property name or that they clearly communicate the intended behavior. Also, ensure that the changelog documents this breaking change and that the major version is bumped accordingly. |
||
|
||
/** | ||
* @see https://developers.deepgram.com/docs/tagging | ||
|
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.
💡 Verification agent
🧩 Analysis chain
Verify array syntax with renamed property.
The property has been renamed from
keyterms
tokeyterm
, but it still accepts an array value. Let's verify this is the intended behavior.Also applies to: 33-33
🌐 Web query:
💡 Result:
The correct syntax for keyword boosting in Deepgram API v2 involves using multiple
keywords
parameters with optional weight modifiers. Here's how to implement it:Basic Syntax
For standard keyword boosting without custom weights:
This sends two keywords as separate parameters[1][4].
Weighted Syntax
To assign importance levels (weights):
The colon separates keyword from its weight (1-10 scale)[10].
Key Implementation Details
For API v2 specifically:
The keyword parameter remains consistent across API versions but requires using appropriate SDK methods for each version[7][9].
Note: While called "keyword boosting" in documentation[4], the actual parameter name is
keywords
(plural)[10]. Avoid confusing it with non-existentkeyterm
parameter mentioned in some third-party implementations[3].Citations:
Update property name to match Deepgram API v2 requirements.
The Deepgram API v2 documentation specifies using the
keywords
(plural) parameter with an array value for keyword boosting, notkeyterm
orkeyterms
. Although the array syntax is correct, please update the property name in the example code accordingly.examples/node-prerecorded/index.js
keywords
instead ofkeyterm
.