@google/generative-ai
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -203,3 +203,3 @@ 'use strict'; | ||
*/ | ||
const PACKAGE_VERSION = "0.3.0"; | ||
const PACKAGE_VERSION = "0.3.1"; | ||
const PACKAGE_LOG_HEADER = "genai-js"; | ||
@@ -750,2 +750,5 @@ var Task; | ||
} | ||
if (!Array.isArray(parts)) { | ||
throw new GoogleGenerativeAIError("Content should have 'parts' property with an array of Parts"); | ||
} | ||
if (parts.length === 0) { | ||
@@ -776,3 +779,3 @@ throw new GoogleGenerativeAIError("Each Content should have at least one part"); | ||
if (!validPreviousContentRoles.includes(prevContent.role)) { | ||
throw new GoogleGenerativeAIError(`Content with role '${role}' can't follow '${prevContent.role}'`); | ||
throw new GoogleGenerativeAIError(`Content with role '${role}' can't follow '${prevContent.role}'. Valid previous roles: ${JSON.stringify(VALID_PREVIOUS_CONTENT_ROLES)}`); | ||
} | ||
@@ -779,0 +782,0 @@ } |
{ | ||
"name": "@google/generative-ai", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Google AI JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
146908
3747