@ai-sdk/google
Advanced tools
Comparing version 0.0.41 to 0.0.42
@@ -174,3 +174,3 @@ "use strict"; | ||
this.supportsImageUrls = false; | ||
this.modelId = modelId; | ||
this.modelId = modelId.startsWith("models/") ? modelId.substring(7) : modelId; | ||
this.settings = settings; | ||
@@ -290,3 +290,3 @@ this.config = config; | ||
const { responseHeaders, value: response } = await (0, import_provider_utils3.postJsonToApi)({ | ||
url: `${this.config.baseURL}/${this.modelId}:generateContent`, | ||
url: `${this.config.baseURL}/models/${this.modelId}:generateContent`, | ||
headers: (0, import_provider_utils3.combineHeaders)(this.config.headers(), options.headers), | ||
@@ -325,3 +325,3 @@ body: args, | ||
const { responseHeaders, value: response } = await (0, import_provider_utils3.postJsonToApi)({ | ||
url: `${this.config.baseURL}/${this.modelId}:streamGenerateContent?alt=sse`, | ||
url: `${this.config.baseURL}/models/${this.modelId}:streamGenerateContent?alt=sse`, | ||
headers: (0, import_provider_utils3.combineHeaders)(this.config.headers(), options.headers), | ||
@@ -328,0 +328,0 @@ body: args, |
import { LanguageModelV1, EmbeddingModelV1 } from '@ai-sdk/provider'; | ||
import { FetchFunction } from '@ai-sdk/provider-utils'; | ||
type GoogleGenerativeAIModelId = 'models/gemini-1.5-flash-latest' | 'models/gemini-1.5-pro-latest' | 'models/gemini-pro' | 'models/gemini-pro-vision' | (string & {}); | ||
type GoogleGenerativeAIModelId = 'gemini-1.5-flash-latest' | 'gemini-1.5-flash' | 'gemini-1.5-pro-latest' | 'gemini-1.5-pro' | 'gemini-1.0-pro' | 'gemini-pro' | (string & {}); | ||
interface GoogleGenerativeAISettings { | ||
@@ -6,0 +6,0 @@ /** |
@@ -174,3 +174,3 @@ "use strict"; | ||
this.supportsImageUrls = false; | ||
this.modelId = modelId; | ||
this.modelId = modelId.startsWith("models/") ? modelId.substring(7) : modelId; | ||
this.settings = settings; | ||
@@ -290,3 +290,3 @@ this.config = config; | ||
const { responseHeaders, value: response } = await (0, import_provider_utils3.postJsonToApi)({ | ||
url: `${this.config.baseURL}/${this.modelId}:generateContent`, | ||
url: `${this.config.baseURL}/models/${this.modelId}:generateContent`, | ||
headers: (0, import_provider_utils3.combineHeaders)(this.config.headers(), options.headers), | ||
@@ -325,3 +325,3 @@ body: args, | ||
const { responseHeaders, value: response } = await (0, import_provider_utils3.postJsonToApi)({ | ||
url: `${this.config.baseURL}/${this.modelId}:streamGenerateContent?alt=sse`, | ||
url: `${this.config.baseURL}/models/${this.modelId}:streamGenerateContent?alt=sse`, | ||
headers: (0, import_provider_utils3.combineHeaders)(this.config.headers(), options.headers), | ||
@@ -328,0 +328,0 @@ body: args, |
{ | ||
"name": "@ai-sdk/google", | ||
"version": "0.0.41", | ||
"version": "0.0.42", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
@@ -28,3 +28,3 @@ # Vercel AI SDK - Google Generative AI Provider | ||
const { text } = await generateText({ | ||
model: google('models/gemini-1.5-pro-latest'), | ||
model: google('gemini-1.5-pro-latest'), | ||
prompt: 'Write a vegetarian lasagna recipe for 4 people.', | ||
@@ -31,0 +31,0 @@ }); |
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
165047