diff --git a/packages/firebase_snippets_app/lib/snippets/vertex_ai.dart b/packages/firebase_snippets_app/lib/snippets/vertex_ai.dart new file mode 100644 index 0000000..fe98287 --- /dev/null +++ b/packages/firebase_snippets_app/lib/snippets/vertex_ai.dart @@ -0,0 +1,330 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ignore_for_file: avoid_print, unused_local_variable + +import 'dart:io'; + +import 'package:firebase_core/firebase_core.dart'; +import 'package:firebase_vertexai/firebase_vertexai.dart'; +import 'package:firebase_snippets_app/snippets/snippet_base.dart'; + +class VertexAISnippets extends DocSnippet { + late final GenerativeModel model; + + @override + void runAll() { + initializeModel(); + configureModel(); + safetySetting(); + multiSafetySetting(); + textGenTextOnlyPromptStream(); + textGenTextOnlyPrompt(); + textGenMultimodalOneImagePromptStream(); + textGenMultimodalOneImagePrompt(); + textGenMultiModalMultiImagePromptStreaming(); + textGenMultiModalMultiImagePrompt(); + textGenMultiModalVideoPromptStreaming(); + textGenMultiModalVideoPrompt(); + countTokensText(); + countTokensTextImage(); + chatStream(); + chat(); + setSystemInstructions(); + } + + void initializeModel() async { + // [START initialize_model] + // Initialize FirebaseApp + await Firebase.initializeApp(); + // Initialize the {{vertexai}} service and the generative model + // Specify a model that supports your use case + // Gemini 1.5 models are versatile and can be used with all API capabilities + final model = FirebaseVertexAI.instance + .generativeModel(model: 'gemini-1.5-flash'); + // [END initialize_model] + } + + void configureModel() { + // [START configure_model] + // ... + + final generationConfig = GenerationConfig( + maxOutputTokens: 200, + stopSequences: ["red"], + temperature: 0.9, + topP: 0.1, + topK: 16, + ); + final model = FirebaseVertexAI.instance.generativeModel( + model: 'gemini-1.5-flash', + generationConfig: generationConfig, + ); + + // ... + // [END configure_model] + } + + void safetySetting() { + // [START safety_setting] + // ... + + final safetySettings = [ + SafetySetting(HarmCategory.harassment, HarmBlockThreshold.high) + ]; + final model = FirebaseVertexAI.instance.generativeModel( + model: 'gemini-1.5-flash', + safetySettings: safetySettings, + ); + + // ... + // [END safety_setting] + } + + void multiSafetySetting() { + // [START multi_safety_setting] + // ... + + final safetySettings = [ + SafetySetting(HarmCategory.harassment, HarmBlockThreshold.high), + SafetySetting(HarmCategory.hateSpeech, HarmBlockThreshold.high), + ]; + final model = FirebaseVertexAI.instance.generativeModel( + model: 'gemini-1.5-flash', + safetySettings: safetySettings, + ); + + // ... + // [END multi_safety_setting] + } + + void textGenTextOnlyPromptStream() async { + // [START text_gen_text_only_prompt_streaming] + // Provide a prompt that contains text + final prompt = [Content.text('Write a story about a magic backpack.')]; + + // To stream generated text output, call generateContentStream with the text input + final response = model.generateContentStream(prompt); + await for (final chunk in response) { + print(chunk.text); + } + // [END text_gen_text_only_prompt_streaming] + } + + void textGenTextOnlyPrompt() async { + // [START text_gen_text_only_prompt] + // Provide a prompt that contains text + final prompt = [Content.text('Write a story about a magic backpack.')]; + + // To generate text output, call generateContent with the text input + final response = await model.generateContent(prompt); + print(response.text); + // [END text_gen_text_only_prompt] + } + + void textGenMultimodalOneImagePromptStream() async { + // [START text_gen_multimodal_one_image_prompt_streaming] + // Provide a text prompt to include with the image + final prompt = TextPart("What's in the picture?"); + // Prepare images for input + final image = await File('image0.jpg').readAsBytes(); + final imagePart = DataPart('image/jpeg', image); + + // To stream generated text output, call generateContentStream with the text and image + final response = await model.generateContentStream([ + Content.multi([prompt, imagePart]) + ]); + await for (final chunk in response) { + print(chunk.text); + } + // [END text_gen_multimodal_one_image_prompt_streaming] + } + + void textGenMultimodalOneImagePrompt() async { + // [START text_gen_multimodal_one_image_prompt] + // Provide a text prompt to include with the image + final prompt = TextPart("What's in the picture?"); + // Prepare images for input + final image = await File('image0.jpg').readAsBytes(); + final imagePart = DataPart('image/jpeg', image); + + // To generate text output, call generateContent with the text and image + final response = await model.generateContent([ + Content.multi([prompt, imagePart]) + ]); + print(response.text); + // [END text_gen_multimodal_one_image_prompt] + } + + void textGenMultiModalMultiImagePromptStreaming() async { + // [START text_gen_multimodal_multi_image_prompt_streaming] + final (firstImage, secondImage) = await ( + File('image0.jpg').readAsBytes(), + File('image1.jpg').readAsBytes() + ).wait; + // Provide a text prompt to include with the images + final prompt = TextPart("What's different between these pictures?"); + // Prepare images for input + final imageParts = [ + DataPart('image/jpeg', firstImage), + DataPart('image/jpeg', secondImage), + ]; + + // To stream generated text output, call generateContentStream with the text and images + final response = model.generateContentStream([ + Content.multi([prompt, ...imageParts]) + ]); + await for (final chunk in response) { + print(chunk.text); + } + // [END text_gen_multimodal_multi_image_prompt_streaming] + } + + void textGenMultiModalMultiImagePrompt() async { + // [START text_gen_multimodal_multi_image_prompt] + final (firstImage, secondImage) = await ( + File('image0.jpg').readAsBytes(), + File('image1.jpg').readAsBytes() + ).wait; + // Provide a text prompt to include with the images + final prompt = TextPart("What's different between these pictures?"); + // Prepare images for input + final imageParts = [ + DataPart('image/jpeg', firstImage), + DataPart('image/jpeg', secondImage), + ]; + + // To generate text output, call generateContent with the text and images + final response = await model.generateContent([ + Content.multi([prompt, ...imageParts]) + ]); + print(response.text); + // [END text_gen_multimodal_multi_image_prompt] + } + + void textGenMultiModalVideoPromptStreaming() async { + // [START text_gen_multimodal_video_prompt_streaming] + // Provide a text prompt to include with the video + final prompt = TextPart("What's in the video?"); + + // Prepare video for input + final video = await File('video0.mp4').readAsBytes(); + + // Provide the video as `Data` with the appropriate mimetype + final videoPart = DataPart('video/mp4', video); + + // To stream generated text output, call generateContentStream with the text and image + final response = model.generateContentStream([ + Content.multi([prompt, videoPart]) + ]); + await for (final chunk in response) { + print(chunk.text); + } + // [END text_gen_multimodal_video_prompt_streaming] + } + + void textGenMultiModalVideoPrompt() async { + // [START text_gen_multimodal_video_prompt] + // Provide a text prompt to include with the video + final prompt = TextPart("What's in the video?"); + + // Prepare video for input + final video = await File('video0.mp4').readAsBytes(); + + // Provide the video as `Data` with the appropriate mimetype + final videoPart = DataPart('video/mp4', video); + + // To generate text output, call generateContent with the text and images + final response = await model.generateContent([ + Content.multi([prompt, videoPart]) + ]); + print(response.text); + // [END text_gen_multimodal_video_prompt] + } + + void countTokensText() async { + // [START count_tokens_text] + // Provide a prompt that contains text + final prompt = [Content.text('Write a story about a magic backpack.')]; + + // Count tokens and billable characters before calling generateContent + final tokenCount = await model.countTokens(prompt); + print('Token count: ${tokenCount.totalTokens}'); + print('Billable characters: ${tokenCount.totalBillableCharacters}'); + + // To generate text output, call generateContent with the text input + final response = await model.generateContent(prompt); + print(response.text); + // [END count_tokens_text] + } + + void countTokensTextImage() async { + // [START count_tokens_text_image] + // Provide a text prompt to include with the image + final prompt = TextPart("What's in the picture?"); + // Prepare image for input + final image = await File('image0.jpg').readAsBytes(); + final imagePart = DataPart('image/jpeg', image); + + // Count tokens and billable characters before calling generateContent + final tokenCount = await model.countTokens([ + Content.multi([prompt, imagePart]) + ]); + print('Token count: ${tokenCount.totalTokens}'); + print('Billable characters: ${tokenCount.totalBillableCharacters}'); + + // To generate text output, call generateContent with the text and image + final response = await model.generateContent([ + Content.multi([prompt, imagePart]) + ]); + print(response.text); + // [END count_tokens_text_image] + } + + void chatStream() async { + // [START chat_streaming] + final chat = model.startChat(); + // Provide a prompt that contains text + final prompt = Content.text('Write a story about a magic backpack.'); + + final response = chat.sendMessageStream(prompt); + await for (final chunk in response) { + print(chunk.text); + } + // [END chat_streaming] + } + + void chat() async { + // [START chat] + final chat = model.startChat(); + // Provide a prompt that contains text + final prompt = Content.text('Write a story about a magic backpack.'); + + final response = await chat.sendMessage(prompt); + print(response.text); + // [END chat] + } + + void setSystemInstructions() async { + // [START system_instructions_text] + await Firebase.initializeApp(); + // Initialize the Vertex AI service and the generative model + // Specify a model that supports system instructions, like a Gemini 1.5 model + final model = FirebaseVertexAI.instance.generativeModel( + model: 'gemini-1.5-flash-preview-0514', + systemInstruction: Content.system('You are a cat. Your name is Neko.'), + ); + // [END system_instructions_text] + } +} diff --git a/packages/firebase_snippets_app/pubspec.lock b/packages/firebase_snippets_app/pubspec.lock index 27b8cc8..2e0c166 100644 --- a/packages/firebase_snippets_app/pubspec.lock +++ b/packages/firebase_snippets_app/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "405666cd3cf0ee0a48d21ec67e65406aad2c726d9fa58840d3375e7bdcd32a07" + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "60.0.0" + version: "67.0.0" _flutterfire_internals: dependency: transitive description: @@ -21,18 +21,18 @@ packages: dependency: transitive description: name: analyzer - sha256: "1952250bd005bacb895a01bf1b4dc00e3ba1c526cf47dca54dfe24979c65f5b3" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "5.12.0" + version: "6.4.1" args: dependency: transitive description: name: args - sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.5.0" async: dependency: transitive description: @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: build - sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" build_config: dependency: transitive description: @@ -69,34 +69,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.2" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "220ae4553e50d7c21a17c051afc7b183d28a24a420502e842f303f8e4e6edced" + sha256: "1414d6d733a85d8ad2f1dfcb3ea7945759e35a123cb99ccfac75d0758f75edfa" url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.4.10" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "30859c90e9ddaccc484f56303931f477b1f1ba2bab74aa32ed5d6ce15870f8cf" + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" url: "https://pub.dev" source: hosted - version: "7.2.8" + version: "7.3.0" built_collection: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: built_value - sha256: "2f17434bd5d52a26762043d6b43bb53b3acd029b4d9071a329f46d67ef297e6d" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.5.0" + version: "8.9.2" characters: dependency: transitive description: @@ -149,18 +149,18 @@ packages: dependency: "direct main" description: name: cloud_firestore_odm - sha256: eaa7d9fe017768b04d36a4a5f6dc68cd22b6a85dabdb6a9c084849699eb6da35 + sha256: e0d07eb2a89988cfa379ce58027a72b36483d6ec3c57281035ad3e3f149e9682 url: "https://pub.dev" source: hosted - version: "1.0.0-dev.59" + version: "1.0.0-dev.84" cloud_firestore_odm_generator: dependency: "direct dev" description: name: cloud_firestore_odm_generator - sha256: b57fd7f1201ab4b60caa13ec750f490e81b02f95cf4d99cf0ea68d26fb1e1e09 + sha256: "1be5131e1d1b41c6d63bd5fec8b1a49f5fc5ee455815a07f490029a609089abc" url: "https://pub.dev" source: hosted - version: "1.0.0-dev.58" + version: "1.0.0-dev.85" cloud_firestore_platform_interface: dependency: transitive description: @@ -205,10 +205,10 @@ packages: dependency: transitive description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.10.0" collection: dependency: transitive description: @@ -237,10 +237,10 @@ packages: dependency: transitive description: name: dart_style - sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.6" facebook_auth_desktop: dependency: transitive description: @@ -261,10 +261,10 @@ packages: dependency: transitive description: name: ffi - sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.2" file: dependency: transitive description: @@ -297,6 +297,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.7+7" + firebase_app_check: + dependency: transitive + description: + name: firebase_app_check + sha256: aac3b42cdf804b10cb1085c9902e5d1ef2f30e7cfc0c504e6f47519713d86829 + url: "https://pub.dev" + source: hosted + version: "0.2.2+7" + firebase_app_check_platform_interface: + dependency: transitive + description: + name: firebase_app_check_platform_interface + sha256: d0b9e4676ee7a272160b989a9a899d6469e336fe3624b3935cdae77a476f00d1 + url: "https://pub.dev" + source: hosted + version: "0.1.0+29" + firebase_app_check_web: + dependency: transitive + description: + name: firebase_app_check_web + sha256: f5359ba62111e4b28e5f1477b7c5c560dcfabe1ccc9e02e65ebdb428eda204ad + url: "https://pub.dev" + source: hosted + version: "0.1.2+7" firebase_auth: dependency: "direct main" description: @@ -513,6 +537,14 @@ packages: url: "https://pub.dev" source: hosted version: "3.9.7" + firebase_vertexai: + dependency: "direct main" + description: + name: firebase_vertexai + sha256: "6eb4a201238198de74d54d465fd7b8f54e43c6bf714ff46440947a80d19adfec" + url: "https://pub.dev" + source: hosted + version: "0.1.1" fixnum: dependency: transitive description: @@ -625,18 +657,18 @@ packages: dependency: transitive description: name: freezed_annotation - sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338 + sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.1" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" fuchsia_remote_debug_protocol: dependency: transitive description: flutter @@ -650,6 +682,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.2" + google_generative_ai: + dependency: transitive + description: + name: google_generative_ai + sha256: "35072cb63e4c0b0bab11735b60d9d2335c2b463b60358fd6c456a7286e649a5e" + url: "https://pub.dev" + source: hosted + version: "0.4.1" google_identity_services_web: dependency: transitive description: @@ -662,34 +702,34 @@ packages: dependency: "direct main" description: name: google_sign_in - sha256: "776a4c988dc179c3b8e9201de0ad61bf350a4e75d378ff9d94c76880378c7bca" + sha256: "0b8787cb9c1a68ad398e8010e8c8766bfa33556d2ab97c439fb4137756d7308f" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.2.1" google_sign_in_android: dependency: transitive description: name: google_sign_in_android - sha256: "2a8b90b766ce00b03e7543f4ffeec97b6eb51fb6c3f31ce2a364bd1f1b9dd7fc" + sha256: "8f2606fffd912ff8c23e8d94da106764c116112ce65fb18c78123331ae628eb3" url: "https://pub.dev" source: hosted - version: "6.1.14" + version: "6.1.24" google_sign_in_ios: dependency: transitive description: name: google_sign_in_ios - sha256: "6ec0e13a4c5c646471b9f6a25ceb3ae76d339889d4c0f79b729bf0714215a63e" + sha256: a058c9880be456f21e2e8571c1126eaacd570bdc5b6c6d9d15aea4bdf22ca9fe url: "https://pub.dev" source: hosted - version: "5.6.2" + version: "5.7.6" google_sign_in_platform_interface: dependency: transitive description: name: google_sign_in_platform_interface - sha256: "95a9e0a8701b5485f2ca330fd1fc6f918f5ce088042ce1019c5e389d8574ae4c" + sha256: "1f6e5787d7a120cc0359ddf315c92309069171306242e181c09472d1b00a2971" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.5" google_sign_in_web: dependency: transitive description: @@ -702,10 +742,10 @@ packages: dependency: transitive description: name: graphs - sha256: "772db3d53d23361d4ffcf5a9bb091cf3ee9b22f2be52cd107cd7a2683a89ba0e" + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.1" http: dependency: transitive description: @@ -755,18 +795,18 @@ packages: dependency: "direct main" description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "4.9.0" json_serializable: dependency: "direct dev" description: name: json_serializable - sha256: "61a60716544392a82726dd0fa1dd6f5f1fd32aec66422b6e229e7b90d52325c4" + sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b url: "https://pub.dev" source: hosted - version: "6.7.0" + version: "6.8.0" leak_tracker: dependency: transitive description: @@ -803,10 +843,10 @@ packages: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" matcher: dependency: transitive description: @@ -835,10 +875,10 @@ packages: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" package_config: dependency: transitive description: @@ -859,50 +899,50 @@ packages: dependency: "direct main" description: name: path_provider - sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" + sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.1.3" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" + sha256: "9c96da072b421e98183f9ea7464898428e764bc0ce5567f27ec8693442e72514" url: "https://pub.dev" source: hosted - version: "2.0.27" + version: "2.2.5" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.2.3" + version: "2.4.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.10" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: "1cb68ba4cd3a795033de62ba1b7b4564dace301f952de6bfb3cd91b202b6ee96" + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.2.1" platform: dependency: transitive description: @@ -915,10 +955,10 @@ packages: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.8" pool: dependency: transitive description: @@ -947,18 +987,10 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" - quiver: - dependency: transitive - description: - name: quiver - sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 - url: "https://pub.dev" - source: hosted - version: "3.2.1" + version: "1.3.0" recase: dependency: transitive description: @@ -979,10 +1011,10 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" sign_in_with_apple: dependency: "direct main" description: @@ -1016,18 +1048,18 @@ packages: dependency: transitive description: name: source_gen - sha256: "373f96cf5a8744bc9816c1ff41cf5391bbdbe3d7a96fe98c622b6738a8a7bd33" + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.5.0" source_helper: dependency: transitive description: name: source_helper - sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "1.3.4" source_span: dependency: transitive description: @@ -1148,14 +1180,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" + url: "https://pub.dev" + source: hosted + version: "0.1.5" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "3.0.0" webdriver: dependency: transitive description: @@ -1168,10 +1208,10 @@ packages: dependency: transitive description: name: win32 - sha256: f2add6fa510d3ae152903412227bda57d0d5a8da61d2c39c1fb022c9429a41c0 + sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4 url: "https://pub.dev" source: hosted - version: "5.0.6" + version: "5.5.1" xdg_directories: dependency: transitive description: @@ -1189,5 +1229,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/packages/firebase_snippets_app/pubspec.yaml b/packages/firebase_snippets_app/pubspec.yaml index 835e1eb..284d1c0 100644 --- a/packages/firebase_snippets_app/pubspec.yaml +++ b/packages/firebase_snippets_app/pubspec.yaml @@ -45,6 +45,7 @@ dependencies: crypto: ^3.0.1 firebase_crashlytics: ^3.3.0 firebase_auth_platform_interface: ^7.3.0 + firebase_vertexai: ^0.1.1 dev_dependencies: flutter_test: