Skip to content

Releases: google-gemini/generative-ai-dart

google_generative_ai version 0.4.5

27 Aug 21:03
6082f2f
Compare
Choose a tag to compare
  • Add support for model side Code Execution. Enable code execution by
    configuring Tools with a codeExecution argument.
  • Use a default role 'model' when a chat response comes back with no role.

google_generative_ai version 0.4.2

30 May 16:35
209225b
Compare
Choose a tag to compare
  • Add support for GenerationConfig.responseSchema for constraining JSON mime
    type output formats.
  • Require Dart 3.1.

google_generative_ai version 0.4.1

23 May 21:49
d4cbba8
Compare
Choose a tag to compare
  • Concatenate multiple TextPart into the text String in case the model
    replies with more than one part.
  • Fix handling of format argument to Schema.number and Schema.integer.
  • Export UsageMetadata.
  • Include the full GenerateContentRequest (previously omitted
    safetySettings, generationConfig, tools, toolConfig, and
    systemInstruction) in countTokens requests. This aligns the token count
    with the token count the backend will see in practice for a
    generateContent request.
  • Add a text getter on Candidate to make it easer to retrieve the text from
    candidates other than the first in a response.

google_generative_ai-v0.4.0: Add Content.functionResponses utility (#159)

10 May 22:33
a9ebd46
Compare
Choose a tag to compare
  • Add support for parsing Vertex AI specific fields in CountTokensResponse.
  • Add named constructors on Schema for each value type.
  • Add GenerationConfig.responseMimeType which supports setting
    'application/json' to force the model to reply with JSON parseable output.
  • Add outputDimensionality argument support for embedContent and
    batchEmbedContent.
  • Add Content.functionResponses utility to reply to multiple function calls in
    parallel.
  • Breaking The Part class is no longer sealed. Exhaustive switches over
    a Part instance will need to add a wildcard case.

google_generative_ai-v0.3.3: Add usageMetadata to GenerateContentResponse (#143)

07 May 00:49
c3d87ab
Compare
Choose a tag to compare
Add `UsageMetadata` and relevante parsing. Add a `usageMetadata` field
on `GenerateContentResponse`.

Add usage of the new field to the advanced text sample.

Refactor the `GenerateContentResponse` parse method to handled each
field individually at the top level. There is a behavior change for an
error case, but it is not visible through the message formats that are
returned from the backend in practice.

Prepare to publish.

google_generative_ai-v0.3.2

27 Apr 00:39
467d8c1
Compare
Choose a tag to compare
  • Use API version v1beta by default.
  • Add note to README warning about leaking API keys.

google_generative_ai-v0.3.1

18 Apr 21:05
f3be7bb
Compare
Choose a tag to compare
  • Add support on content generating methods for overriding "tools" passed when
    the generative model was instantiated.
  • Add support for forcing the model to use or not use function calls to generate
    content.

google_generative_ai-v0.2.1

22 Feb 23:48
632bc74
Compare
Choose a tag to compare
  • Fix an issue parsing generateContent() responses that do not include content (this can occur for some finishReasons).
  • Fix an issue parsing generateContent() responses that include citation sources with unpopulated fields
  • Add link to ai.google.dev docs.