-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(vertexai): add json schema support and update schema structure #13378
Conversation
packages/firebase_vertexai/firebase_vertexai/lib/src/vertex_api.dart
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,207 @@ | |||
// Copyright 2024 Google LLC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] I don't think the vertex_
prefix in the file name adds value. Consider renaming this as lib/src/schema.dart
, or lib/src/json_schmea.dar
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm considering to do rename to all internal files in a separate PR
packages/firebase_vertexai/firebase_vertexai/lib/src/vertex_schema.dart
Outdated
Show resolved
Hide resolved
…i.dart Co-authored-by: Nate Bosch <[email protected]>
…tterfire into vertexai/add_schema
…) and can be used in production apps. (#13453) * chore(vertexai): fork vertexai sdk away from generative ai sdk. (#13298) * fix the sdk name and support platform * forking off model and chat class * fork api class * remove some export content since the next vertexai release will be breaking change. * fork function calling * fork off content * fix for analyzer * more analyzer fix * chore(vertexai): Add corresponding unit test for the fork (#13324) * Add corresponding unit test for the fork * fix issues from analyzer * feat(vertexai): add json schema support and update schema structure (#13378) * Add schema support for prompt response * update schema object, replace requiredProperties to optionalProperties * api updates (breaking) * more tweak during api review * Add format for Schema.string * fix test files * Update packages/firebase_vertexai/firebase_vertexai/lib/src/vertex_api.dart Co-authored-by: Nate Bosch <[email protected]> * add review feedback --------- Co-authored-by: Nate Bosch <[email protected]> * feat(vertexai): update function calling and sample (#13395) * Add schema support for prompt response * update schema object, replace requiredProperties to optionalProperties * api updates (breaking) * more tweak during api review * Add format for Schema.string * fix test files * first sample update * remove embedding * api update for function calling * Update sample code to match the new api * more code snippet for toolconfig * apply documentation update * tweak of the tools * remove embed related class * Update packages/firebase_vertexai/firebase_vertexai/example/lib/main.dart Co-authored-by: Nate Bosch <[email protected]> * Update packages/firebase_vertexai/firebase_vertexai/example/lib/main.dart Co-authored-by: Nate Bosch <[email protected]> * address review comments * more fix * keep name consistency * keep using getWeather to keep align with devsite documentation * Update the static name --------- Co-authored-by: Nate Bosch <[email protected]> * feat(vertexai): update enums and citation and DataPart (#13410) * Update SafeRating * Rename citation source * add blocked for SafetyRating parse * Rename DataPart to InlineDataPart * Update readme * apply review comment * feat(vertexai): Error message for service api not enabled. (#13435) * Error message for service api not enabled. * add quota exceed test * Apply suggestions from code review Co-authored-by: Nate Bosch <[email protected]> * Update for review comments --------- Co-authored-by: Nate Bosch <[email protected]> * chore(vertexai): remove vertex_ file name for most of files (#13439) * remove vertex_ file name for most of files * organize import * fix the optional attributes while parsing SafetyRating (#13452) * chore(vertexai): function calling sample update (#13492) * fix the optional attributes while parsing SafetyRating * add doc comments * update function sample * comments * Shorten lines over 80 columns (#13493) Reflow comments and break long strings into adjacent string literals. --------- Co-authored-by: Nate Bosch <[email protected]>
Description
Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.
Related Issues
Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process. Updating the
pubspec.yaml
and changelogs is not required.///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?