From 89855cfc81a32cf7e93e9da7a0681c0cba46a777 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 21 May 2024 23:47:56 +0000 Subject: [PATCH] Export UsageMetadata from the main library This is a public field in `GenerateContentResponse` and was missed in the export in #143. Resolves the missing API for vertex in #165. --- pkgs/google_generative_ai/CHANGELOG.md | 1 + pkgs/google_generative_ai/lib/google_generative_ai.dart | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/google_generative_ai/CHANGELOG.md b/pkgs/google_generative_ai/CHANGELOG.md index 5990962..416a7f5 100644 --- a/pkgs/google_generative_ai/CHANGELOG.md +++ b/pkgs/google_generative_ai/CHANGELOG.md @@ -3,6 +3,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`. +- Export `UsageMetadata`. ## 0.4.0 diff --git a/pkgs/google_generative_ai/lib/google_generative_ai.dart b/pkgs/google_generative_ai/lib/google_generative_ai.dart index 545fc12..7a6256a 100644 --- a/pkgs/google_generative_ai/lib/google_generative_ai.dart +++ b/pkgs/google_generative_ai/lib/google_generative_ai.dart @@ -57,7 +57,8 @@ export 'src/api.dart' PromptFeedback, SafetyRating, SafetySetting, - TaskType; + TaskType, + UsageMetadata; export 'src/chat.dart' show ChatSession, StartChatExtension; export 'src/content.dart' show