@@ -717,6 +717,15 @@ class CustomFormattingResponse(BaseModel):
717717 "Status of the custom formatting feature"
718718
719719
720+ class KeytermsPromptOptions (BaseModel ):
721+ """Keyterms prompt options for controlling keyterms boosting behavior"""
722+
723+ keyterms_match_strength : Optional [Literal ["high" , "standard" ]] = Field (
724+ None ,
725+ description = "Level of match strength for keyterms boosting ('high' or 'standard')" ,
726+ )
727+
728+
720729class TranslationResponse (BaseModel ):
721730 """
722731 Translation response containing status
@@ -931,6 +940,9 @@ class RawTranscriptionConfig(BaseModel):
931940 keyterms_prompt : Optional [List [str ]] = None
932941 "The list of key terms used to generate the transcript with the Slam-1 speech model. Can't be used together with `prompt`."
933942
943+ keyterms_prompt_options : Optional [KeytermsPromptOptions ] = None
944+ "Options for controlling keyterms boosting behavior when using `keyterms_prompt`."
945+
934946 language_codes : Optional [List [Union [str , LanguageCode ]]] = None
935947 """
936948 A list of language codes associated with the transcript.
@@ -996,6 +1008,7 @@ def __init__(
9961008 prompt : Optional [str ] = None ,
9971009 temperature : Optional [float ] = None ,
9981010 keyterms_prompt : Optional [List [str ]] = None ,
1011+ keyterms_prompt_options : Optional [KeytermsPromptOptions ] = None ,
9991012 speech_understanding : Optional [SpeechUnderstandingRequest ] = None ,
10001013 ) -> None :
10011014 """
@@ -1041,6 +1054,7 @@ def __init__(
10411054 raw_transcription_config: Create the config from a `RawTranscriptionConfig`
10421055 speech_understanding: Speech understanding configuration for LLM Gateway features (speaker identification, translation, custom formatting)
10431056 temperature: Change how deterministic the response is, with 0 being the most deterministic and 1 being the least deterministic.
1057+ keyterms_prompt_options: Options for controlling keyterms boosting behavior when using `keyterms_prompt`.
10441058 """
10451059 self ._raw_transcription_config = (
10461060 raw_transcription_config
@@ -1096,6 +1110,7 @@ def __init__(
10961110 self .prompt = prompt
10971111 self .temperature = temperature
10981112 self .keyterms_prompt = keyterms_prompt
1113+ self .keyterms_prompt_options = keyterms_prompt_options
10991114 self .speech_understanding = speech_understanding
11001115
11011116 @property
@@ -1165,6 +1180,20 @@ def keyterms_prompt(self, keyterms_prompt: Optional[List[str]]) -> None:
11651180 "Sets the prompt to use for the transcription."
11661181 self ._raw_transcription_config .keyterms_prompt = keyterms_prompt
11671182
1183+ @property
1184+ def keyterms_prompt_options (self ) -> Optional [KeytermsPromptOptions ]:
1185+ "The keyterms_prompt_options to use for the transcription."
1186+
1187+ return self ._raw_transcription_config .keyterms_prompt_options
1188+
1189+ @keyterms_prompt_options .setter
1190+ def keyterms_prompt_options (
1191+ self , keyterms_prompt_options : Optional [KeytermsPromptOptions ]
1192+ ) -> None :
1193+ "Sets the keyterms_prompt_options to use for the transcription."
1194+
1195+ self ._raw_transcription_config .keyterms_prompt_options = keyterms_prompt_options
1196+
11681197 @property
11691198 def speech_understanding (self ) -> Optional [SpeechUnderstandingRequest ]:
11701199 "The speech understanding configuration for LLM Gateway features."
0 commit comments