diff --git a/api-report/genai-node.api.md b/api-report/genai-node.api.md index 03e4d03ad0..de5dcd7bba 100644 --- a/api-report/genai-node.api.md +++ b/api-report/genai-node.api.md @@ -2533,7 +2533,7 @@ export interface LiveConnectConfig { seed?: number; sessionResumption?: SessionResumptionConfig; speechConfig?: SpeechConfig; - streamTranslationConfig?: StreamTranslationConfig; + streamingTranslationConfig?: StreamingTranslationConfig; systemInstruction?: ContentUnion; temperature?: number; thinkingConfig?: ThinkingConfig; @@ -3604,7 +3604,7 @@ export interface StreamableHttpTransport { } // @public -export interface StreamTranslationConfig { +export interface StreamingTranslationConfig { echoTargetLanguage?: boolean; targetLanguageCode?: string; } diff --git a/api-report/genai-web.api.md b/api-report/genai-web.api.md index 03e4d03ad0..de5dcd7bba 100644 --- a/api-report/genai-web.api.md +++ b/api-report/genai-web.api.md @@ -2533,7 +2533,7 @@ export interface LiveConnectConfig { seed?: number; sessionResumption?: SessionResumptionConfig; speechConfig?: SpeechConfig; - streamTranslationConfig?: StreamTranslationConfig; + streamingTranslationConfig?: StreamingTranslationConfig; systemInstruction?: ContentUnion; temperature?: number; thinkingConfig?: ThinkingConfig; @@ -3604,7 +3604,7 @@ export interface StreamableHttpTransport { } // @public -export interface StreamTranslationConfig { +export interface StreamingTranslationConfig { echoTargetLanguage?: boolean; targetLanguageCode?: string; } diff --git a/api-report/genai.api.md b/api-report/genai.api.md index 03e4d03ad0..de5dcd7bba 100644 --- a/api-report/genai.api.md +++ b/api-report/genai.api.md @@ -2533,7 +2533,7 @@ export interface LiveConnectConfig { seed?: number; sessionResumption?: SessionResumptionConfig; speechConfig?: SpeechConfig; - streamTranslationConfig?: StreamTranslationConfig; + streamingTranslationConfig?: StreamingTranslationConfig; systemInstruction?: ContentUnion; temperature?: number; thinkingConfig?: ThinkingConfig; @@ -3604,7 +3604,7 @@ export interface StreamableHttpTransport { } // @public -export interface StreamTranslationConfig { +export interface StreamingTranslationConfig { echoTargetLanguage?: boolean; targetLanguageCode?: string; } diff --git a/src/converters/_live_converters.ts b/src/converters/_live_converters.ts index f8706fca8d..0b9547fe29 100644 --- a/src/converters/_live_converters.ts +++ b/src/converters/_live_converters.ts @@ -1218,14 +1218,14 @@ export function liveConnectConfigToMldev( ); } - const fromStreamTranslationConfig = common.getValueByPath(fromObject, [ - 'streamTranslationConfig', + const fromStreamingTranslationConfig = common.getValueByPath(fromObject, [ + 'streamingTranslationConfig', ]); - if (parentObject !== undefined && fromStreamTranslationConfig != null) { + if (parentObject !== undefined && fromStreamingTranslationConfig != null) { common.setValueByPath( parentObject, - ['setup', 'generationConfig', 'streamTranslationConfig'], - fromStreamTranslationConfig, + ['setup', 'generationConfig', 'streamingTranslationConfig'], + fromStreamingTranslationConfig, ); } @@ -1473,10 +1473,11 @@ export function liveConnectConfigToVertex( } if ( - common.getValueByPath(fromObject, ['streamTranslationConfig']) !== undefined + common.getValueByPath(fromObject, ['streamingTranslationConfig']) !== + undefined ) { throw new Error( - 'streamTranslationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.', + 'streamingTranslationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.', ); } diff --git a/src/converters/_tokens_converters.ts b/src/converters/_tokens_converters.ts index 21f58bc3cb..0b055d7dd4 100644 --- a/src/converters/_tokens_converters.ts +++ b/src/converters/_tokens_converters.ts @@ -558,14 +558,14 @@ export function liveConnectConfigToMldev( ); } - const fromStreamTranslationConfig = common.getValueByPath(fromObject, [ - 'streamTranslationConfig', + const fromStreamingTranslationConfig = common.getValueByPath(fromObject, [ + 'streamingTranslationConfig', ]); - if (parentObject !== undefined && fromStreamTranslationConfig != null) { + if (parentObject !== undefined && fromStreamingTranslationConfig != null) { common.setValueByPath( parentObject, - ['setup', 'generationConfig', 'streamTranslationConfig'], - fromStreamTranslationConfig, + ['setup', 'generationConfig', 'streamingTranslationConfig'], + fromStreamingTranslationConfig, ); } diff --git a/src/types.ts b/src/types.ts index 07c526872a..e2368fad21 100644 --- a/src/types.ts +++ b/src/types.ts @@ -7529,7 +7529,7 @@ export declare interface LiveClientMessage { } /** Config for stream translation. */ -export declare interface StreamTranslationConfig { +export declare interface StreamingTranslationConfig { /** If true, the model will generate audio when the target language is spoken, essentially it will parrot the input. If false, we will not produce audio for the target language. */ @@ -7635,8 +7635,8 @@ If included the server will send SessionResumptionUpdate messages. */ response. */ safetySettings?: SafetySetting[]; - /** Config for stream translation. */ - streamTranslationConfig?: StreamTranslationConfig; + /** Config for streaming translation. */ + streamingTranslationConfig?: StreamingTranslationConfig; } /** Parameters for connecting to the live API. */