Skip to content

Commit

Permalink
Fix Schema.number and Schema.integer factories ignoring format field (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz authored May 16, 2024
1 parent be23051 commit c2c968a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/google_generative_ai/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- 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`.

## 0.4.0

Expand Down
2 changes: 2 additions & 0 deletions pkgs/google_generative_ai/lib/src/function_calling.dart
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ final class Schema {
SchemaType.number,
description: description,
nullable: nullable,
format: format,
);

/// Construct a schema for an integer number.
Expand All @@ -224,6 +225,7 @@ final class Schema {
SchemaType.integer,
description: description,
nullable: nullable,
format: format,
);

/// Construct a schema for bool value.
Expand Down

0 comments on commit c2c968a

Please sign in to comment.