Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Schema.number and Schema.integer factories ignoring format field #164

Merged
merged 2 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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