@ai-sdk/google
Advanced tools
Comparing version 1.1.6 to 1.1.7
# @ai-sdk/google | ||
## 1.1.7 | ||
### Patch Changes | ||
- d399f25: feat (provider/google-vertex): support public file urls in messages | ||
## 1.1.6 | ||
@@ -4,0 +10,0 @@ |
@@ -484,3 +484,3 @@ "use strict"; | ||
supportsUrl(url) { | ||
return url.toString().startsWith("https://generativelanguage.googleapis.com/v1beta/files/"); | ||
return this.config.isSupportedUrl(url); | ||
} | ||
@@ -865,2 +865,7 @@ async doGenerate(options) { | ||
// src/google-supported-file-url.ts | ||
function isSupportedFileUrl(url) { | ||
return url.toString().startsWith("https://generativelanguage.googleapis.com/v1beta/files/"); | ||
} | ||
// src/google-provider.ts | ||
@@ -885,2 +890,3 @@ function createGoogleGenerativeAI(options = {}) { | ||
generateId: (_a2 = options.generateId) != null ? _a2 : import_provider_utils5.generateId, | ||
isSupportedUrl: isSupportedFileUrl, | ||
fetch: options.fetch | ||
@@ -887,0 +893,0 @@ }); |
@@ -49,4 +49,5 @@ import { LanguageModelV1 } from '@ai-sdk/provider'; | ||
headers: Resolvable<Record<string, string | undefined>>; | ||
fetch?: FetchFunction; | ||
generateId: () => string; | ||
fetch?: FetchFunction; | ||
isSupportedUrl: (url: URL) => boolean; | ||
}; | ||
@@ -53,0 +54,0 @@ declare class GoogleGenerativeAILanguageModel implements LanguageModelV1 { |
@@ -482,3 +482,3 @@ "use strict"; | ||
supportsUrl(url) { | ||
return url.toString().startsWith("https://generativelanguage.googleapis.com/v1beta/files/"); | ||
return this.config.isSupportedUrl(url); | ||
} | ||
@@ -485,0 +485,0 @@ async doGenerate(options) { |
{ | ||
"name": "@ai-sdk/google", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
368735
3942