@ai-sdk/google
Advanced tools
Comparing version 0.0.9 to 0.0.10
@@ -160,3 +160,3 @@ "use strict"; | ||
this.specificationVersion = "v1"; | ||
this.defaultObjectGenerationMode = void 0; | ||
this.defaultObjectGenerationMode = "json"; | ||
this.modelId = modelId; | ||
@@ -200,14 +200,11 @@ this.settings = settings; | ||
} | ||
const baseArgs = { | ||
generationConfig: { | ||
// model specific settings: | ||
topK: this.settings.topK, | ||
// standardized settings: | ||
maxOutputTokens: maxTokens, | ||
temperature, | ||
topP | ||
}, | ||
// prompt: | ||
contents: convertToGoogleGenerativeAIMessages(prompt) | ||
const generationConfig = { | ||
// model specific settings: | ||
topK: this.settings.topK, | ||
// standardized settings: | ||
maxOutputTokens: maxTokens, | ||
temperature, | ||
topP | ||
}; | ||
const contents = convertToGoogleGenerativeAIMessages(prompt); | ||
switch (type) { | ||
@@ -225,3 +222,4 @@ case "regular": { | ||
args: { | ||
...baseArgs, | ||
generationConfig, | ||
contents, | ||
tools: functionDeclarations == null ? void 0 : { functionDeclarations } | ||
@@ -233,5 +231,12 @@ }, | ||
case "object-json": { | ||
throw new import_provider2.UnsupportedFunctionalityError({ | ||
functionality: "object-json mode" | ||
}); | ||
return { | ||
args: { | ||
generationConfig: { | ||
...generationConfig, | ||
response_mime_type: "application/json" | ||
}, | ||
contents | ||
}, | ||
warnings | ||
}; | ||
} | ||
@@ -238,0 +243,0 @@ case "object-tool": { |
@@ -23,3 +23,3 @@ import { LanguageModelV1 } from '@ai-sdk/provider'; | ||
readonly specificationVersion = "v1"; | ||
readonly defaultObjectGenerationMode: undefined; | ||
readonly defaultObjectGenerationMode = "json"; | ||
readonly modelId: GoogleGenerativeAIModelId; | ||
@@ -26,0 +26,0 @@ readonly settings: GoogleGenerativeAISettings; |
@@ -160,3 +160,3 @@ "use strict"; | ||
this.specificationVersion = "v1"; | ||
this.defaultObjectGenerationMode = void 0; | ||
this.defaultObjectGenerationMode = "json"; | ||
this.modelId = modelId; | ||
@@ -200,14 +200,11 @@ this.settings = settings; | ||
} | ||
const baseArgs = { | ||
generationConfig: { | ||
// model specific settings: | ||
topK: this.settings.topK, | ||
// standardized settings: | ||
maxOutputTokens: maxTokens, | ||
temperature, | ||
topP | ||
}, | ||
// prompt: | ||
contents: convertToGoogleGenerativeAIMessages(prompt) | ||
const generationConfig = { | ||
// model specific settings: | ||
topK: this.settings.topK, | ||
// standardized settings: | ||
maxOutputTokens: maxTokens, | ||
temperature, | ||
topP | ||
}; | ||
const contents = convertToGoogleGenerativeAIMessages(prompt); | ||
switch (type) { | ||
@@ -225,3 +222,4 @@ case "regular": { | ||
args: { | ||
...baseArgs, | ||
generationConfig, | ||
contents, | ||
tools: functionDeclarations == null ? void 0 : { functionDeclarations } | ||
@@ -233,5 +231,12 @@ }, | ||
case "object-json": { | ||
throw new import_provider2.UnsupportedFunctionalityError({ | ||
functionality: "object-json mode" | ||
}); | ||
return { | ||
args: { | ||
generationConfig: { | ||
...generationConfig, | ||
response_mime_type: "application/json" | ||
}, | ||
contents | ||
}, | ||
warnings | ||
}; | ||
} | ||
@@ -238,0 +243,0 @@ case "object-tool": { |
{ | ||
"name": "@ai-sdk/google", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"license": "Apache-2.0", | ||
@@ -22,3 +22,3 @@ "sideEffects": false, | ||
"@ai-sdk/provider": "0.0.3", | ||
"@ai-sdk/provider-utils": "0.0.5" | ||
"@ai-sdk/provider-utils": "0.0.6" | ||
}, | ||
@@ -25,0 +25,0 @@ "devDependencies": { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114067
1559
+ Added@ai-sdk/provider-utils@0.0.6(transitive)
- Removed@ai-sdk/provider-utils@0.0.5(transitive)
Updated@ai-sdk/provider-utils@0.0.6