@google/generative-ai
Advanced tools
Changelog
0.14.1
CodeExecutionTool
to Tool
type.Changelog
0.14.0
cachedContentTokenCount
field to the UsageMetadata
interface returned by generateContent
responses.Changelog
0.13.0
countTokens
method to alternatively accept a GenerateContentRequest
.GoogleAICacheManager
utility to allow caching large content to be used in inference. This class is exported from the @google/generative-ai/server
subpath. Breaking change: The GoogleAIFileManager
class has been moved to be exported from this subpath as well instead of the /files
subpath.model
field from the internally formatted payload of countToken
requests as it was unnecessary.Changelog
0.12.0
responseSchema
to GenerationConfig
to allow user to provide a JSON schema when responseMimeType
is set to JSON.Changelog
0.11.5
Changelog
0.11.4
videoMetadata
and error
to FileMetadataResponse
type.Changelog
0.11.3
FileState
enum values to be strings.Changelog
0.11.2
Changelog
0.11.1
Changelog
0.11.0
text()
did not handle multiple TextPart
s in a single candidate. Added state
field to FileMetadataResponse
.