@ai-sdk/google 4.0.0-canary.75 → 4.0.0-canary.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.d.ts +25 -2
- package/dist/index.js +557 -290
- package/dist/index.js.map +1 -1
- package/docs/15-google.mdx +77 -0
- package/package.json +1 -1
- package/src/google-provider.ts +23 -0
- package/src/google-speech-api.ts +36 -0
- package/src/google-speech-model-options.ts +48 -0
- package/src/google-speech-model.ts +286 -0
- package/src/index.ts +4 -0
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
2
2
|
import { InferSchema, FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
import { ProviderV4, LanguageModelV4, ImageModelV4, EmbeddingModelV4, Experimental_VideoModelV4, FilesV4 } from '@ai-sdk/provider';
|
|
3
|
+
import { ProviderV4, LanguageModelV4, ImageModelV4, EmbeddingModelV4, Experimental_VideoModelV4, SpeechModelV4, FilesV4 } from '@ai-sdk/provider';
|
|
4
4
|
|
|
5
5
|
declare const googleErrorDataSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
6
6
|
error: {
|
|
@@ -265,6 +265,21 @@ type GoogleVideoModelOptions = {
|
|
|
265
265
|
|
|
266
266
|
type GoogleVideoModelId = 'veo-3.1-fast-generate-preview' | 'veo-3.1-generate-preview' | 'veo-3.1-generate' | 'veo-3.1-lite-generate-preview' | 'veo-3.0-generate-001' | 'veo-3.0-fast-generate-001' | 'veo-2.0-generate-001' | (string & {});
|
|
267
267
|
|
|
268
|
+
type GoogleSpeechModelId = 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro-preview-tts' | 'gemini-3.1-flash-tts-preview' | (string & {});
|
|
269
|
+
declare const googleSpeechProviderOptionsSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
270
|
+
multiSpeakerVoiceConfig?: {
|
|
271
|
+
speakerVoiceConfigs: {
|
|
272
|
+
speaker: string;
|
|
273
|
+
voiceConfig: {
|
|
274
|
+
prebuiltVoiceConfig: {
|
|
275
|
+
voiceName: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
}[];
|
|
279
|
+
} | undefined;
|
|
280
|
+
}>;
|
|
281
|
+
type GoogleSpeechModelOptions = InferSchema<typeof googleSpeechProviderOptionsSchema>;
|
|
282
|
+
|
|
268
283
|
type GoogleFilesUploadOptions = {
|
|
269
284
|
displayName?: string | null;
|
|
270
285
|
pollIntervalMs?: number | null;
|
|
@@ -517,6 +532,14 @@ interface GoogleProvider extends ProviderV4 {
|
|
|
517
532
|
* Creates a model for video generation.
|
|
518
533
|
*/
|
|
519
534
|
videoModel(modelId: GoogleVideoModelId): Experimental_VideoModelV4;
|
|
535
|
+
/**
|
|
536
|
+
* Creates a model for speech generation (text-to-speech).
|
|
537
|
+
*/
|
|
538
|
+
speech(modelId: GoogleSpeechModelId): SpeechModelV4;
|
|
539
|
+
/**
|
|
540
|
+
* Creates a model for speech generation (text-to-speech).
|
|
541
|
+
*/
|
|
542
|
+
speechModel(modelId: GoogleSpeechModelId): SpeechModelV4;
|
|
520
543
|
files(): FilesV4;
|
|
521
544
|
/**
|
|
522
545
|
* Creates a language model targeting the Gemini Interactions API
|
|
@@ -574,4 +597,4 @@ declare const google: GoogleProvider;
|
|
|
574
597
|
|
|
575
598
|
declare const VERSION: string;
|
|
576
599
|
|
|
577
|
-
export { type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleFilesUploadOptions, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleProvider as GoogleGenerativeAIProvider, type GoogleProviderMetadata as GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleProviderSettings as GoogleGenerativeAIProviderSettings, type GoogleVideoModelId as GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleInteractionsAgentName, type GoogleInteractionsModelId, type GoogleInteractionsProviderMetadata, type GoogleLanguageModelInteractionsOptions, type GoogleLanguageModelOptions, type GoogleProvider, type GoogleProviderMetadata, type GoogleProviderSettings, type GoogleVideoModelId, type GoogleVideoModelOptions, VERSION, createGoogle, createGoogle as createGoogleGenerativeAI, google };
|
|
600
|
+
export { type GoogleEmbeddingModelOptions, type GoogleErrorData, type GoogleFilesUploadOptions, type GoogleEmbeddingModelOptions as GoogleGenerativeAIEmbeddingProviderOptions, type GoogleImageModelOptions as GoogleGenerativeAIImageProviderOptions, type GoogleProvider as GoogleGenerativeAIProvider, type GoogleProviderMetadata as GoogleGenerativeAIProviderMetadata, type GoogleLanguageModelOptions as GoogleGenerativeAIProviderOptions, type GoogleProviderSettings as GoogleGenerativeAIProviderSettings, type GoogleVideoModelId as GoogleGenerativeAIVideoModelId, type GoogleVideoModelOptions as GoogleGenerativeAIVideoProviderOptions, type GoogleImageModelOptions, type GoogleInteractionsAgentName, type GoogleInteractionsModelId, type GoogleInteractionsProviderMetadata, type GoogleLanguageModelInteractionsOptions, type GoogleLanguageModelOptions, type GoogleProvider, type GoogleProviderMetadata, type GoogleProviderSettings, type GoogleSpeechModelId, type GoogleSpeechModelOptions, type GoogleVideoModelId, type GoogleVideoModelOptions, VERSION, createGoogle, createGoogle as createGoogleGenerativeAI, google };
|