google_generative_ai version 0.4.1
natebosch
released this
23 May 21:49
·
21 commits
to main
since this release
- Concatenate multiple
TextPart
into thetext
String in case the model
replies with more than one part. - Fix handling of
format
argument toSchema.number
andSchema.integer
. - Export
UsageMetadata
. - Include the full
GenerateContentRequest
(previously omitted
safetySettings
,generationConfig
,tools
,toolConfig
, and
systemInstruction
) incountTokens
requests. This aligns the token count
with the token count the backend will see in practice for a
generateContent
request. - Add a
text
getter onCandidate
to make it easer to retrieve the text from
candidates other than the first in a response.