Build generative AI agents with Vertex AI Agent Builder and Flutter

Google Cloud Tech
16 May 202440:04

Summary

TLDRAt Google I/O, the Dart and Flutter team introduced a generative AI-powered Flutter app that enhances user photographs by providing deeper insights. The app uses the Gemini API to identify subjects in photos and offer detailed descriptions. It also features an AI agent for interactive learning and a chat interface for user inquiries. The talk covered building the app with Vertex AI for Firebase Dart SDK, integrating AI agents with Vertex AI agent Builder for external data integration, and optimizing the Flutter app for multiple platforms. The result is an adaptive, cross-platform app that enriches user experience through generative AI.

Takeaways

  • πŸ“Έ Khan, a developer relations engineer at Google, introduced a generative AI-powered Flutter app that enhances photos by providing detailed information about the subjects within them.
  • 🌐 The app leverages the Gemini API, Google's advanced AI model, which supports multimodal understanding, including text, images, videos, and audio.
  • πŸ” Users can interact with the app by selecting a photo, which the app uses to identify the subject and provide a description, as well as answer follow-up questions through an AI chat interface.
  • πŸ›οΈ The app can also identify Google merchandise, providing information on pricing and offering direct links for purchase.
  • πŸ› οΈ The talk covered the technical aspects of building the app, including using the Vertex AI for Firebase Dart SDK to send prompts and photos to the Gemini API.
  • πŸ€– The importance of AI agents was discussed, with the introduction of Vertex AI Agent Builder for creating chat agents that can reason and orchestrate tasks with external tools.
  • πŸ”— The concept of 'rag' (retrieval augmented generation) was explained, highlighting how it connects language models with external data sources to provide up-to-date and accurate information.
  • πŸ“š The app development process included creating a data model, implementing camera and image selection features, and using various Flutter packages to enhance functionality.
  • 🎨 Flutter's capabilities for building adaptive and responsive apps across multiple platforms were demonstrated, ensuring a consistent user experience on different devices.
  • πŸ”„ The talk emphasized the efficiency of Flutter's hot reload feature, which allows for rapid development cycles and a great developer experience.
  • 🌟 The combination of Flutter and Google Cloud provides developers with powerful tools to build, scale, and reach more users with their applications.

Q & A

  • What is the main theme of the talk at Google I/O?

    -The main theme of the talk is about building a generative AI-powered Flutter app that helps users learn more about their photographs using the Gemini API and Google Cloud's Vertex AI.

  • Who are the speakers at the Google I/O talk?

    -The speakers are Khan, a developer relations engineer on the Dart and Flutter team at Google, and Cass, a developer advocate for the Cloud AI team.

  • What does the app developed in the talk allow users to do?

    -The app allows users to select a photo, identify the subject within the photo, get a description of the subject, and chat with an AI agent to ask questions and learn more about the subject.

  • How does the app identify the subject in a photo?

    -The app uses the Gemini API to identify the subject in the photo. It sends a prompt along with the user's photo to the API, which then returns the subject and a description.

  • What is the role of the Vertex AI for Firebase Dart SDK in the app?

    -The Vertex AI for Firebase Dart SDK is used to call the Gemini API. It handles the configuration and setup needed to communicate with the API, making the process easier for the developers.

  • Why is the Gemini 1.5 Pro model significant according to the talk?

    -The Gemini 1.5 Pro model is significant because it features a mixture of expert (MoE) architecture for efficiency and lower latency, supports a large context window of up to 2 million tokens, and has multimodal understanding, capable of processing text, images, videos, and audio.

  • What is the purpose of the AI agent in the generative AI app?

    -The AI agent serves to provide a chat interface for users to interact with, ask questions, and receive more information about the subject of their photos. It uses reasoning and orchestration to dynamically integrate with various external tools and data sources.

  • How does the app handle user requests for information not available in Wikipedia?

    -The app uses an AI agent that can access multiple data sources. For example, if the user asks about a Google merchandise item, the agent can use the Google Shop data set to provide information such as pricing and a purchase link.

  • What is the significance of the 'tell me more' feature in the app?

    -The 'tell me more' feature enhances user engagement by providing a chat interface where users can ask questions about the subject in their photo. It allows for a more interactive and informative experience.

  • How does the app ensure it works well across different platforms and devices?

    -The app uses Flutter, which allows for a single code base to run on multiple platforms. It also implements responsive and adaptive design principles to optimize the user interface and experience for different devices like mobile phones, tablets, and desktops.

  • What are some of the Flutter packages used in the app development?

    -Some of the Flutter packages used include 'permission_handler' for device permissions, 'image_picker' for selecting images and launching the camera, 'image_gallery_saver' for saving images, and 'flutter_chat_ui' for the chat interface.

  • How does the app handle the potential issue of outdated or 'hallucinated' information from the AI?

    -The app addresses this by using an AI agent that can connect to external data sources, ensuring that the information provided is up-to-date and accurate. This approach, known as retrieval-augmented generation (RAG), combines the AI model with a retrieval system to fetch the latest information.

  • What is the role of Vertex AI Agent Builder in building the app?

    -Vertex AI Agent Builder provides a suite of tools for building AI agents with orchestration and grounding capabilities. It allows developers to easily design, deploy, and manage AI agents that can reason and interact with various external tools and data sources.

  • How does the app ensure a consistent and less random output from the Gemini API?

    -The app sets the temperature to zero when calling the Gemini API. This minimizes randomness and ensures more consistent output from the API for each request.

  • What is the importance of the JSON format support in Gemini 1.5 Pro model?

    -The JSON format support in the Gemini 1.5 Pro model allows for easier extraction of information by the Flutter app. It enables developers to use Dart's pattern matching to efficiently parse and utilize the data returned by the API.

  • What are some considerations for deploying a generative AI app in a production environment?

    -When deploying a generative AI app in production, considerations include ensuring the information provided is up-to-date, grounding the model with external data sources for accuracy, and handling user requests in a way that maps to the appropriate functions and tools.

  • How does the app provide a good developer experience while building with Flutter?

    -The app provides a good developer experience by leveraging Flutter's capabilities for writing a single code base that runs on multiple platforms, using official packages for common functionalities, and adhering to best practices for responsive and adaptive design.

Outlines

00:00

πŸ“Έ Building a Generative AI-Powered Flutter App

The speaker, Khan, introduces the concept of a generative AI-powered Flutter app that enhances the understanding of photographs. The app allows users to take a photo, which the system identifies and provides information about. It also offers a chat interface with an AI agent to ask questions about the subject. The talk will cover the development process, including building a prompt for the Gemini API, using the Vertex AI for Firebase Dart SDK, and integrating AI agents with the app. The app is designed to be adaptive across all Flutter's target platforms.

05:01

🌟 Introducing the Gemini Family of Models

Cass, a developer advocate for the Cloud AI team, introduces the Gemini models, emphasizing the capabilities of Gemini 1.5 Pro. The model features a mixture of expert (MoE) architecture for efficiency, a large context window supporting up to 2 million tokens, and multimodal understanding for text, video, and images. The talk demonstrates how to use the Gemini model with Google Cloud's AI platform, including uploading images and receiving information in JSON format for easy app integration.

10:03

πŸ› οΈ Constructing the Flutter App for Photo Identification

The session focuses on building a Flutter app that integrates with the Gemini API. The app's data model maps the JSON response from the API, and a quick ID feature allows users to take or select a photo, which is then sent to the Gemini API for identification. The app utilizes various Flutter packages for permissions, image selection, and camera functionality. The Firebase Vertex AI package simplifies the process of calling the Gemini API and handling responses.

15:03

πŸ€– Enhancing the App with AI Agents and External Data Sources

Cass discusses considerations for deploying a generative AI app, such as ensuring information accuracy and connecting to external data sources. The concept of AI agents is introduced, which combines reasoning and orchestration with external tools to provide up-to-date and relevant information. The talk outlines the benefits of using AI agents and how they can be integrated into the app to enhance user experience and information accuracy.

20:06

πŸ”§ Building and Integrating AI Agents with Vertex AI Agent Builder

The talk delves into building AI agents using Vertex AI Agent Builder, focusing on the reasoning engine based on the open-source tool called Langchain. The process involves defining tools with Python functions, creating an agent with these tools, and deploying the agent to a reasoning engine runtime. The agent can then be accessed via the Vertex AI SDK or REST API, providing a scalable and fully managed platform for AI agents.

25:07

πŸ’¬ Integrating AI Agents with Flutter for a Rich User Experience

The session covers integrating the AI agent into the Flutter app using a chat interface, allowing users to interact with the agent for more information about the photo subject. The app uses the HTTP package to make network calls to a Cloud Run endpoint, which communicates with the reasoning engine runtime. The Flutter Chat UI package is utilized to create a chat interface, and the app is designed to be adaptive to different devices, ensuring a consistent user experience.

30:09

πŸ“± Making the App Responsive and Adaptive Across Devices

The talk addresses making the Flutter app responsive and adaptive for various devices. The app layout is adjusted for larger displays, and a navigation rail replaces the navigation bar on larger screens. The app uses an abstract measure and Branch framework for responsive designs and a capabilities class to determine device features like camera and keyboard presence. The app also introduces a keyboard shortcut for chat UI and implements dark mode for visual consistency.

35:11

πŸš€ Recap and Conclusion: Building with Gemini and Flutter

The speakers recap the talk, highlighting the introduction of the Gemini 1.5 Pro model, the concept of AI agents, and the use of Vertex AI Agent Builder. They also emphasize the benefits of building with Flutter for multi-platform availability and the scalability offered by Google Cloud. The talk concludes with resources for learning more about Gemini and Flutter, and an invitation to explore the possibilities of building projects with these technologies.

Mindmap

Keywords

πŸ’‘Google IO

Google IO is an annual developer conference held by Google, where the company announces new products, updates to existing products, and discusses the future of technology. In the script, it is the event where the speaker, Khan, is presenting their project to an audience of developers and technology enthusiasts.

πŸ’‘Dart and Flutter team

The Dart and Flutter team at Google is responsible for the development and maintenance of the Dart programming language and the Flutter framework. Dart is used for building web, server, and mobile apps, while Flutter is an open-source UI software development kit used for creating natively compiled applications for mobile, web, and desktop from a single codebase. Khan is a developer relations engineer on this team, indicating his role in building relationships with developers using these technologies.

πŸ’‘Gemini API

The Gemini API refers to a family of models developed by Google that are capable of understanding and processing large amounts of data, including text, images, videos, and audio. In the context of the video, the Gemini API is used to identify subjects in photographs and provide detailed information about them. The API is a key component in the app that the speakers are discussing, which allows users to learn more about their photos.

πŸ’‘Vertex AI

Vertex AI is a suite of machine learning tools provided by Google Cloud that enables developers to build, train, and deploy AI models. In the script, Vertex AI is used in conjunction with the Firebase Dart SDK to facilitate the interaction between the Flutter app and the Gemini API, allowing the app to send prompts and user-selected images to the API for processing.

πŸ’‘AI Agents

AI Agents, as discussed in the video, are applications that use the power of language models for reasoning and orchestration with external tools to achieve specific goals. They are capable of determining the best external data source or tool to use in response to a user's query and can dynamically integrate with various systems to provide up-to-date and relevant information. In the context of the app, AI agents enhance the user experience by providing additional information and functionalities beyond what the core model can offer.

πŸ’‘Multimodal Understanding

Multimodal understanding refers to the ability of a system to process and comprehend information from multiple types of data inputs, such as text, images, audio, and video. The Gemini 1.5 Pro model mentioned in the script supports multimodal understanding, allowing it to analyze and provide insights on various media types, which is crucial for the app's functionality in identifying and describing subjects in photographs.

πŸ’‘Firebase

Firebase is a platform developed by Google for creating mobile and web applications. It provides various services such as real-time databases, authentication, and analytics. In the script, Firebase is used in the form of the Vertex AI for Firebase Dart SDK, which simplifies the process of making REST calls to the Gemini API by handling most of the configuration and setup.

πŸ’‘Responsive and Adaptive Design

Responsive design is an approach to web design that makes web pages render well on a variety of devices and window or screen sizes. Adaptive design, on the other hand, goes a step further by not only adjusting the layout but also changing the app's functionality based on the device's capabilities. In the video, the speakers discuss how they made their Flutter app responsive to different screen sizes and adaptive to different device configurations to provide an optimal user experience across various platforms.

πŸ’‘Flutter

Flutter is an open-source UI software development kit created by Google for building natively compiled applications for mobile, web, and desktop from a single codebase. It is used in the video to develop a cross-platform app that can run on Android, iOS, web, macOS, Windows, and Linux. Flutter's flexibility and the ability to write once and deploy across multiple platforms are highlighted as key benefits for developers.

πŸ’‘JSON Format

JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write and easy for machines to parse and generate. In the context of the video, the Gemini 1.5 Pro model supports JSON format output, which allows the Flutter app to easily process and extract information about the object in the photo, such as the name, description, and suggested questions.

πŸ’‘Cloud Run

Cloud Run is a managed platform by Google Cloud that enables developers to deploy containerized applications. In the script, Cloud Run is used to create an endpoint for the Flutter app to communicate with the AI agent. This allows the app to send user requests to the agent and receive responses, facilitating the 'tell me more' feature where users can ask for additional information about the subject in their photos.

Highlights

Introduction of a generative AI-powered Flutter app that enables users to learn more about their photographs by identifying and providing information on the subjects within them.

Demonstration of the app's functionality to identify a photo's subject, such as the Lone Cypress tree in Monterey, California, and provide a description through an AI agent.

The app's ability to recognize Google merchandise, provide pricing information, and offer a direct link for purchase, enhancing the shopping experience for users.

Explanation of the four-part talk structure covering the building of a prompt for the Gemini API, Flutter app development, AI agents, and chat UI integration.

Introduction of the Gemini family of models, highlighting their capabilities and the latest version's features, such as the mixture of expert (MoE) architecture and large context window support.

Showcasing the multimodal understanding of the Gemini model, which supports text, images, videos, and audio, allowing for complex tasks like summarizing videos or suggesting code improvements.

The ease of getting started with the Gemini model through Google Cloud's Vertex AI, where users can build prompts and receive responses in JSON format for app integration.

Flutter's role as an open-source, multiplatform app development framework allowing code reuse across Android, iOS, web, Mac OS, Windows, and Linux.

Building the quick ID feature in the Flutter app that sends a user's photo and prompt to the Gemini API, utilizing the Firebase Vertex AI package for simplified API calls.

The importance of considering the limitations of generative AI, such as potential outdated information or 'hallucinations', and the need to ground models with external data sources.

Introduction of the concept of AI agents and their role in improving generative AI apps by reasoning and orchestrating with external tools and data sources.

Google's Vertex AI agent Builder and its capabilities for building AI agents with reasoning engines like Longchain, which integrates with Google Cloud services for easy deployment.

The process of defining tools for the AI agent using Python functions with proper signatures and comments, allowing the agent to understand how to use these tools to answer user requests.

Integration of the AI agent with the Flutter app using a chat interface, enabling users to interact with the agent and receive more information about their photos' subjects.

Adaptive design considerations for Flutter apps to ensure optimal user experiences across different devices, including responsive layouts and device capability checks.

The use of Flutter's widgets and packages to help optimize apps for both responsive and adaptive designs, allowing for code reuse and efficient development.

Final app presentation showcasing its ability to help users learn more about their photographs through Flutter and Vertex AI, accessible on various devices.

Recap of the talk's content, emphasizing the capabilities of Gemini 1.5 Pro, AI agents with Vertex AI agent Builder, and the flexibility of Flutter for multiplatform app development.

Transcripts

play00:04

morning everyone we are so happy to be

play00:07

here at Google IO with y'all today I'm

play00:10

Khan I'm a developer relations engineer

play00:12

on the dart and flutter team at

play00:14

[Applause]

play00:18

Google thank you so there's the saying

play00:21

that a picture is worth a thousand words

play00:24

as an amateur photographer myself I tend

play00:26

to agree with the statement whether I

play00:28

whenever I travel somewhere new I love

play00:30

to take photos to capture the moment and

play00:32

remember that place sort of like a

play00:35

souvenir in fact I took all the photos

play00:38

that you see on screen right now so over

play00:41

the years I found myself in this habit

play00:42

of taking these photos coming home going

play00:46

through them one by one editing them and

play00:48

then somehow I end up in this Wikipedia

play00:51

Rabbit Hole reading page after page

play00:54

learning about the location that I just

play00:56

captured on my camera quite a bit more

play00:59

than a thousand words I'd say as Cass

play01:02

and I were talking about this project we

play01:04

wondered what if we had an app for this

play01:07

an app that lets you dive deeper and

play01:09

understand more about the photos that

play01:10

you've just

play01:12

taken so in this talk we're going to

play01:14

walk you through our journey building a

play01:16

gen powered flutter app that lets users

play01:18

dive deeper and learn more about their

play01:20

photographs let's take a

play01:23

look so you can select a photo uh here

play01:27

I'll pick a photo that I took in

play01:28

Monterey California

play01:30

give it a moment and it will identify

play01:33

the subject in this case the lone

play01:35

cypress tree and gets a description of

play01:37

that subject as well you want to learn

play01:39

more tap tell me more and here you can

play01:42

chat with con your AI agent and ask her

play01:44

questions about the subject of that

play01:50

photo and if you happen to be wandering

play01:52

around Mountain View and come across

play01:54

some cool Google merch like our favorite

play01:56

Chrome Dino pin you can take a photo

play01:59

with the app and it'll identify the

play02:01

product whether it's official Google

play02:04

merch and how much it costs and if

play02:07

you're an imple Shopper like me it'll

play02:09

even give you a direct link to purchase

play02:11

the product as

play02:13

well now that you've seen the app we'll

play02:16

show you how it was built this talk is

play02:18

broken down into four

play02:20

parts first we'll walk you through the

play02:22

Journey building a prompt for the Gemini

play02:25

API then we'll show you how we built a

play02:27

flutter app that sends a prompt along

play02:29

with the user Ed photo to the Gemini API

play02:32

using the vertex AI for Firebase Dart

play02:35

SDK after that we'll tell you why you

play02:37

should be using AI agents and show you

play02:40

how you can build one with vertex AI

play02:42

agent Builder and finally we'll show you

play02:45

how we added the chat UI to our app that

play02:47

lets users chat with the agent and how

play02:50

we can make the app adaptive across all

play02:51

six of flutters Target platforms as you

play02:54

can see we cover a little bit of

play02:56

everything in this talk if you're

play02:58

interested in learning about gen we've

play03:00

got you covered if you're a cloud

play03:02

engineer you'll get to see some of the

play03:03

cool new tooling that we have at Google

play03:04

cloud and if you're an app developer

play03:07

we've got some flutter code for you as

play03:08

well ultimately we're bringing all these

play03:10

skill sets together to build something

play03:12

awesome whether you're interested in

play03:14

flutter Cloud app development or

play03:16

generative AI by the end of this talk

play03:18

you're going to have a good idea of what

play03:20

the process looks like for building a

play03:22

generative AI agent powered app with

play03:25

vertex AI agent Builder and flutter from

play03:27

beginning to end Cass would you like to

play03:30

kick us off thank you

play03:33

K hi uh I'm Cass I'm developer advocate

play03:36

for the croud AI team and I'd like to

play03:39

introduce the uh the first introduce the

play03:42

Gemini

play03:44

models the G the Gemini family of the

play03:47

models the Gemini family of models the

play03:49

most capable and uh the models we have

play03:53

ever built and that is a result of the

play03:55

large scale collaboration across Google

play03:57

including Google Deep Mind and Google

play03:59

research

play04:01

the ratest version the Gina 1.5 pro has

play04:05

three major features the first one is

play04:08

the mixture of expert or Moe

play04:10

architecture that means we are not using

play04:12

the entire L rage model for the every

play04:15

request of prediction rather than that

play04:18

for the each specific the tasks we use

play04:21

the only part of the models the

play04:23

so-called exper networks so that you can

play04:26

get much higher efficiency and much

play04:28

shorter latency especially you can see

play04:30

you can experience on that with the

play04:32

latest model uh j9 1.5

play04:35

Flash and the second the it support a

play04:38

very large context window yesterday we

play04:42

announced that the this model supports

play04:44

now up to 2 million tokens how long is

play04:48

that how large is that you can just

play04:50

approach twice the document that has the

play04:53

twice the size of the entire load of the

play04:55

Ring series as a single prompt and you

play04:58

can ask any things any event or any

play05:01

people anything about the the

play05:04

story and also you can upload the mle

play05:07

the documents multiple videos or many

play05:10

tens or hundreds of the images in a

play05:11

single prompt and ask anything on about

play05:15

about

play05:16

them the third multimodal understanding

play05:19

reasonings as I mentioned it doesn't

play05:21

support only text it supports your also

play05:24

the videos and images and audios as well

play05:27

so for for example you can let the

play05:30

the Gemini uh taking the all the the

play05:33

tens of minutes of the video and

play05:34

summarize what happened inside the video

play05:38

or you can ask the uh the Gemini to take

play05:40

the very long complex intricate

play05:44

programming code and ask uh make some

play05:47

any suggestions on the improvements on

play05:50

the

play05:51

code in this example you are seeing at

play05:53

the right we have apped 44 minutes of

play05:56

the video Bast Kon movie and with with

play06:00

an illustration of the water tower and a

play06:04

person

play06:05

underneath and asked what happens when

play06:09

it happens then the Gemini replies that

play06:13

this happens at 15 minutes 32

play06:18

seconds and you can get started with the

play06:21

gini model by using the Google Cloud Pro

play06:24

C

play06:25

Studio it's so easy as you can see

play06:28

seeing on the video right now now you

play06:30

can just open the console this OB the

play06:33

studio and choose the model you can

play06:35

choose gini 1.5 Pro or maybe you can try

play06:38

out 1.5 flash that is announced

play06:42

yesterday and the build a prompt you can

play06:45

write the text prompt and also you can

play06:47

upload the image like a image of the

play06:50

Chrome D

play06:51

dyin and press submit and you'll be

play06:54

seeing the result within the

play06:56

seconds that's so easy so we have tried

play07:00

the uh uploading the photos K take took

play07:03

like this one this is a very beautiful

play07:06

photo taken by K uh of the falling water

play07:10

so you can upload this image to the uh

play07:13

the the console and ask what is this

play07:16

then you get response like this this is

play07:18

a falling water a house designed by

play07:21

Frank Ro right the popular the famous

play07:23

architect in in 1935 and blah blah blah

play07:27

and the response already looks so great

play07:29

great the model understand deeply about

play07:31

the house but as we are building the

play07:35

geni app you have to ask some other

play07:38

things to the

play07:40

gini uh especially you want to read the

play07:43

response in the machine readable

play07:45

format so we need to tweak this uh

play07:49

prompt a bit here we have added V

play07:52

request uh in the prompt first name of

play07:56

the object the second description

play07:59

the third suggested questions for the

play08:01

object so the user can explore more

play08:04

about the object and also as a final

play08:06

request we asked the uh the Gemini to

play08:10

Output the response in Json

play08:14

format then you will get response like

play08:17

this now gini gini 1.5 pro model

play08:20

supports the Json format output so that

play08:24

the flatter app can easily proceed and

play08:27

extract any element from it

play08:31

now we have the prompt to get the

play08:32

informations about the building or the

play08:34

object in the port I directly pass the

play08:37

stage back to cam so she can share how

play08:39

we can incorporate this prompt in her FL

play08:43

app thank you

play08:45

Cass cool let's talk about building a

play08:47

flutter app before we jump in for the

play08:49

folks who aren't familiar what is

play08:51

flutter well flutter is a an open source

play08:54

multiplatform app development framework

play08:56

let you write one code base that runs on

play08:57

Android iOS web Mac OS windows and

play09:02

Linux so once we had the structure of

play09:04

the data that was coming back from the

play09:05

Gemini API we could jump into building

play09:08

the app the first thing that we did was

play09:10

create a data model that Maps the Json

play09:12

that we'd be getting back from the

play09:14

Gemini API you can see the metadata

play09:16

object has an image name description and

play09:20

a list of suggested

play09:22

questions from there we started building

play09:24

the quick ID feature this feature

play09:26

presents the user with the option to

play09:28

take a photo or s an existing image

play09:30

sends it along with a prompt with to the

play09:33

Gemini API and identifies the subject of

play09:36

that image you'll see throughout this

play09:38

talk we lean heavily on pub. flutter and

play09:41

darts official package repository to

play09:43

bring this app to

play09:44

life to implement the camera and image

play09:47

selection we use three packages

play09:48

permission Handler image picker and

play09:50

image gallery saver permission handler

play09:53

was used to request the necessary device

play09:55

permissions for accessing the camera and

play09:56

camera roll image picker provided

play09:59

functionality for selecting the image

play10:01

from the camera roll now there's an

play10:02

added perk here if users are on Android

play10:05

it'll trigger the default Android photo

play10:07

picker which has built-in Google photos

play10:09

inte creation so you can actually pick

play10:11

from photos that have been shared you

play10:13

through Google photos but aren't

play10:15

necessarily directly on your camera

play10:17

roll image pricker also provides

play10:20

functionality to launch the camera and

play10:21

take a new photo as well the only thing

play10:24

that changed in our code between picking

play10:26

a photo from the camera roll and taking

play10:28

a new photo was the image picker Source

play10:31

parameter regardless of the source image

play10:33

picker gives us the image file and we

play10:35

can decide what to do with it if it's a

play10:37

new photo we'll use image gallery saver

play10:38

to save it to the camera roll and then

play10:40

call the send vertex message

play10:43

method speaking of to call the Gemini

play10:46

API in order to identify the subject in

play10:48

the photo we use the Firebase vertex AI

play10:51

package also known as the vertex AI for

play10:53

Firebase D SDK which is now officially

play10:56

in public

play10:58

preview calling the vertex AI Gemini API

play11:01

is essentially making a rest call

play11:03

however trust me when I say that the SDK

play11:06

makes the process much easier since it

play11:08

handles most of the configuration and

play11:10

setup that you need to

play11:12

do so to start we initialized the model

play11:15

instance and specified the specific

play11:17

Gemini model that we want to use Gemini

play11:19

1.5 Pro we also added configurations

play11:23

like setting the temperature to zero so

play11:25

that we can minimize the randomness and

play11:26

get more consistent output from the

play11:28

Gemini API each time and since we're

play11:31

using gem 1.5 Pro we also get to set the

play11:33

response type to Json so no more

play11:36

checking for and removing those back

play11:38

ticks uh in the

play11:41

response then we Define the method to

play11:43

send the prompt to the API called send

play11:45

vert text message this message packages

play11:47

up the prompt that cash shared earlier

play11:49

along with the user selected image and

play11:51

it sends it to the Gemini API if you

play11:54

want to optimize for faster response

play11:55

times you can resize the image to be

play11:57

smaller as well when response comes back

play12:00

it gets decoded and stored as a metadata

play12:04

State object and here's a pro Tip since

play12:07

the Gemini API is returning the data in

play12:09

Json format we use darts pattern

play12:11

matching for a less Rose way of pulling

play12:13

out all the information that we needed

play12:15

here it's taking the Json map and

play12:17

grabbing the values for the keys name

play12:19

description suggested questions and

play12:21

assigns it to local variables as someone

play12:23

who came from a language without pattern

play12:25

matching I love it and by the way we

play12:28

just introduced experiment Al support

play12:29

for macros in Dart so I'm looking

play12:32

forward to a future where we don't even

play12:34

have to write these

play12:36

methods

play12:39

W fantastic job by the dart team by the

play12:42

way so once we have the metadata objects

play12:44

representing the response we pass it to

play12:46

our custom card widget to display it on

play12:48

the screen you can see we also provided

play12:50

a loading State variable which triggers

play12:52

that Shimmer P placeholder that you see

play12:57

there and if you're familiar with the

play12:59

Google gener of AI package you're

play13:01

probably thinking that this code looks

play13:03

really really familiar that's because

play13:05

vertex AI for Firebase DSD is built on

play13:09

top of the Google gener of AI package

play13:11

different endpoints but similar

play13:13

structure the best part is if you're

play13:15

already familiar with the Google gener

play13:16

of AI package you'll be right at home

play13:18

with vertex AI for Firebase start

play13:21

SDK and there you have it a mobile app

play13:24

with a fully built quick ID feature that

play13:27

that identifies the subject of the photo

play13:30

now Cass what are some of the

play13:31

considerations that we have to think

play13:33

about when we're building a gener AI app

play13:35

like this one

play13:40

okay so let's think about how you can

play13:43

improve this app uh when you want to uh

play13:46

deploy this app to the as a production

play13:49

app for the corporation and Enterprises

play13:52

or you want to use this app for any wide

play13:55

variety of the use cases first we have

play13:58

to real that informations LM any LM

play14:01

generates could not be the latest

play14:03

informations because LM is trained with

play14:06

the data uh that can have with the data

play14:10

when they have the trained uh the the

play14:13

model so it could not be the latest

play14:16

informations you have right now there

play14:18

could be the cases where the up show

play14:19

some outdate informations or so-called

play14:23

hallucination so the you could get those

play14:26

the hallucinated answer that is not

play14:28

based on the the the

play14:30

facts so you may want to connect the

play14:32

model to the external data source if a

play14:34

users are expecting for example some the

play14:37

Enterprise data source uh that is

play14:39

proprietary to the a specific company uh

play14:41

then you need to have a way to connect

play14:44

the model to those data sources or

play14:47

so-called grounding the models but how

play14:50

would you do that if you write a prompt

play14:53

uh you want to write a promp to extract

play14:55

what would be the U most important

play14:57

keyword from the entire user request or

play14:59

prompt to build an SQL query or search

play15:03

query for the uh the uh search engines

play15:06

or the vector

play15:07

database and what if you have the

play15:09

multiple data sources not only a single

play15:12

data source but a multiple like a five

play15:14

servers or the the documents or anything

play15:17

or maybe the internet the the web pages

play15:21

then how you can choose the right data

play15:23

source for for solving a problem

play15:25

requested by the specific user

play15:27

request for example in our apps use case

play15:31

we have two different the images one is

play15:34

the falling water images that could be

play15:36

maybe found in the Wikipedia The another

play15:38

one is the Chrome din pin and Wikipedia

play15:41

doesn't have the information how much

play15:43

does it cost so how would you solve this

play15:47

problem to solve these problems we'd

play15:49

like to introduce the concept of the AI

play15:51

agents to our flatter

play15:54

up why do we need AI agent

play15:59

in the early early days of the

play16:01

generative AI many people have been

play16:03

using the LM models alone without any

play16:07

external data data store or anything so

play16:10

they could be possibly get the outdate

play16:12

informations don't have any access to

play16:15

the corporate the propi data or maybe

play16:18

you could be seeing any hallucinated

play16:20

answers so that's the reason why we are

play16:23

starting to hear the new buzzword called

play16:25

rag or retrieval augmented generation

play16:29

that is all about connecting or

play16:31

grounding the the LM model with the

play16:33

external data set with r you can combine

play16:37

the L models with the back and retrial

play16:39

system this could be anything you have

play16:42

right it could be a vector database

play16:44

somehow the vector database is the most

play16:46

popular choice right now but you can

play16:47

even use the SQL database or usual

play16:50

search engine like elastic search as the

play16:52

retriever back end so every user request

play16:55

you can take some important query from

play16:59

that and make the query against those

play17:01

the the search engines or databases to

play17:04

find most relevant information and embed

play17:08

that documentation or informations as a

play17:11

part of the prompt for the the Gemini or

play17:13

LM models so that you can feed the

play17:16

latest informations or company's propri

play17:18

informations as a part of the the prompt

play17:21

to to to reduce the risk of the halation

play17:25

and get the latest informations as the

play17:27

response from the llm

play17:30

so that was Rag and uh now we have ai

play17:33

agent this is a natural Evolution from

play17:36

rag in this architecture you you have

play17:39

you would deploy an application called

play17:41

Agent to the runtime environment this

play17:44

agent as a capability of the reasoning

play17:47

and orchestration to the rck

play17:49

system orchestration with agent Works in

play17:52

two ways first it takes an user request

play17:55

and determines which external data

play17:57

source were we call the them as tools we

play18:00

could provide the best way to find

play18:02

relevant information for example if you

play18:04

get your query on the falling water

play18:07

maybe the model thinks Wikipedia could

play18:09

be the right place to find

play18:11

it and or using request can involve some

play18:14

actions rather than the query for

play18:17

example the users may want to reserve a

play18:19

ticket or make a some purchase on the

play18:22

the product or items then you can also

play18:26

access the other apis to make those

play18:28

transactions if POS if you

play18:30

want that's the first one the second

play18:34

aspect of the orchestration is that the

play18:36

agent determines how to convert the user

play18:39

request to the function code of the tool

play18:42

with AI agent you don't have to take

play18:44

care of the any converting the user

play18:47

request taking out the any important

play18:50

keywords and put into the uh SQL or the

play18:53

vector database

play18:54

query in later section I will explain

play18:57

how this reasoning and orchestration

play19:00

work so AI agent works just like a human

play19:04

agent for the user but it running inside

play19:07

runtime and who knows what does the user

play19:09

request mean and also that knows the

play19:13

best tool to answer your question and it

play19:16

knows also knows how to map the user

play19:18

request to the function CS with those

play19:20

multiple

play19:22

tools that is AI agent so in short the

play19:25

AI agent is an application that uses the

play19:28

power of LM for reasoning and

play19:30

orchestration with external tools to

play19:33

achieve the goal it inherits all the

play19:36

benefits of R such as gring with the

play19:39

external data source to get the latest

play19:41

informations and the lower the risk of

play19:43

the HM plus it add the flexibility like

play19:46

a human agent for choosing the right

play19:48

tool or trying the multiple tools to

play19:51

satisfy the

play19:52

request AI agent is a new way of

play19:55

dynamically on and semantically

play19:57

integrate the loose Capital to

play19:59

distribute the system with the power of

play20:03

LM last April Google announced a new

play20:05

suite of products called verx AI agent

play20:08

uh verx AI agent Builder which is a site

play20:12

contains multiple products and tools for

play20:14

building AI agent with orchestration

play20:17

tool and grounding with search

play20:20

engines with vertx AI agent Builder

play20:22

there are different approaches and

play20:24

projects for building AI agents in this

play20:26

session we'd like to focus on a

play20:29

reasoning engine that is also called as

play20:31

longchain

play20:33

vertic that is as it name suggest it

play20:36

it's a b product based on the most

play20:38

popular open source tool called rank

play20:40

chain that is used for the the building

play20:43

chat Bo and R the r systems with the

play20:46

flexibility and existem of the rank

play20:49

chain reing engine tightly integrates it

play20:51

with the Google croud services with a

play20:54

fully managed uh runtime for the AI

play20:56

agents

play20:59

reasoning engine let's developers

play21:00

transparently access the benefit of the

play21:02

another service called function calling

play21:05

which works like a magic oneand to

play21:07

easily map the LM output to your python

play21:10

function also we will use the vertic AI

play21:13

search for retrieving data from external

play21:16

data

play21:17

source so let's see how to build AI

play21:20

agent this reasoning

play21:23

engine first you start defining your

play21:27

tool by writing python code WR this this

play21:30

function uses Wikipedia API to find the

play21:33

relevant Wikipedia page for specified

play21:36

object and the return returns a full

play21:37

text of the page this tool could be used

play21:40

to feed the facts and the latest

play21:42

information on the any popular object on

play21:45

your on your

play21:46

photos and now the most interesting part

play21:49

is here you don't have to write any

play21:51

other metadata or based on the open API

play21:54

the

play21:55

specification no no more writing

play21:58

metadata for for the the

play22:01

function instead you can just write yet

play22:03

another usual python function with the

play22:06

uh the proper uh function signature and

play22:09

the comment this is the most important

play22:11

part so that the uh function coding can

play22:15

read those comments and function

play22:16

signature and find out how to now when

play22:20

this function should be used to to

play22:23

answer to the the user request and how

play22:26

to map the user request to the

play22:28

parameters of this function in this

play22:31

example the comment explains that this

play22:33

is this function uh will search for a

play22:36

Wikipedia page for a specified object so

play22:39

if the agent received an an user request

play22:42

that is likely to be solved by Wikipedia

play22:44

Pages then the agent CA this

play22:48

function then what about the Google shop

play22:51

items like a chrome dyo pin you saw area

play22:55

Wikipedia page cannot solve this problem

play22:58

so we need another

play23:00

tool to show the flexibility of AI agent

play23:03

we have added another tool for searching

play23:05

with Google merchandise shop data set

play23:08

this tool can feed the product name

play23:11

description pricing and the page link on

play23:14

any Google shop

play23:17

products this function uses vtic AI

play23:19

search end point that runs a query on

play23:22

The Google Shop data set v v search is a

play23:27

search engine that as the cut engage

play23:29

search search technology with Google

play23:31

search packaged as the outof the Box

play23:34

fully managed uh service if you have any

play23:37

Enterprise data on big quy cloud storage

play23:39

CSV or Json file or any other popular

play23:42

data sources data format then you can

play23:45

easily import them into the verc search

play23:48

and build an index and leun a query on

play23:51

them in my case when I was building this

play23:54

demo it took only a couple of hours for

play23:57

importing the entire data set set from

play23:58

The Google Shop data set to the V search

play24:01

building index and Define this function

play24:05

as a tool for the reasoning engine thata

play24:08

so

play24:09

quick now we have two tools Wikipedia

play24:12

search tool and Google shop Search

play24:16

tool so next thing we have to do is

play24:19

create an agent with the two tools when

play24:23

this this agent receives as user request

play24:25

function calling checks what kind of

play24:27

functions are available with these tools

play24:29

and then pick a tool that should provide

play24:31

the best way to satisfy the user request

play24:34

and for the request to its

play24:36

function this is how the reing and

play24:39

orchestration work inside the reing

play24:42

engine lastly you can deploy the agent

play24:45

to the reasoning engine runtime it

play24:47

creates a container image that

play24:49

encapsulate the agent and tools the run

play24:53

time provides a scalable fully managed

play24:55

platform for the agent without effort of

play24:58

designing building and operating your

play25:00

own infrastructure for providing AI

play25:04

agents and that's it you can start using

play25:06

the agent with the verx AI SDK or rest

play25:09

API from your app by specifying the

play25:12

which agent you want to use and passing

play25:14

the

play25:15

request with the flat we are building

play25:18

now we used Cloud round for a simple

play25:21

Ender point for receiving the request

play25:23

from the app and pass them to the

play25:26

reasoning engine runtime this agent

play25:29

running on one time does the reasoning

play25:31

and orchestration with the two tools for

play25:34

example if the request is related to any

play25:36

popular objects and landmarks then the

play25:39

agent Calls Wikipedia tool that calls

play25:41

the Wikipedia

play25:43

API or if the user request is related to

play25:47

any Google shop items like Chrome G Pin

play25:50

then agent calls The Google Shop tool

play25:53

that uses the vertic search to looking

play25:55

for the the Chrome ding in in Google

play25:58

shop data set so that's how the back end

play26:02

works now it's ready to integrate this

play26:04

agent with the flat app back toam thanks

play26:08

H all right let's talk about integrating

play26:10

the AI agent with flutter we'll

play26:12

integrate the AI agent into our app

play26:14

using a chat interface this tell me more

play26:17

feature presents a user with a chat UI

play26:20

where they can ask their AI agent con

play26:22

for more information about the subject

play26:23

in the photo we'll surface Gemini's

play26:25

suggested questions here as well to

play26:28

start off we use the HTTP package to

play26:31

make our Network calls so we defined the

play26:34

ask agent method to reach out and hit

play26:36

that cloud run endpoint that Cass have

play26:38

put together we construct a URI

play26:40

including a query string which includes

play26:42

the subject name description and the

play26:45

user's question depending on the tools

play26:47

available in the vertex agent you could

play26:49

specify a particular data source or tool

play26:52

but the agent has been good at deciding

play26:54

the right tool for us so we left that up

play26:55

to the agent to decide send the reest

play26:58

the endpoint and finally decode the

play27:01

response as and return it as a

play27:03

string one of my first projects as a

play27:06

flutter developer was building a chat UI

play27:09

I was just learning so I thought I had

play27:11

to build everything from scratch I mean

play27:13

flutter is meant for putting pixels on

play27:15

the screen it's been a few years now and

play27:18

I know that there's many devs out there

play27:19

who've already built fantastic chat uis

play27:22

and chat apps with flutter so instead of

play27:24

Reinventing the wheel I reached for the

play27:26

flutter chat UI package

play27:28

out of the box the package gives you

play27:30

essentially everything that you need to

play27:32

create a chat it handles most of the

play27:34

chat boiler plate and you can configure

play27:36

it how you want it you can see I

play27:38

constructed the chat object and then

play27:39

configured a theme determined whether it

play27:42

should display avatars and

play27:44

names specify the current user so that

play27:47

it knows which messages came from you

play27:49

the current user on the device some more

play27:52

interesting configurations the typing

play27:54

indicator the last thing that you want

play27:55

is for the user to send a question and

play27:57

then wonder is anything really happening

play27:59

on the back end right now so the typing

play28:02

indicator shows the three bouncing dots

play28:04

indicating that the agent is currently

play28:05

typing uh based on loading State the

play28:08

list bottom widget is a convenient place

play28:10

to surface Gemini suggested questions so

play28:12

that when the chat is first shown the

play28:14

user can pick from a list of suggested

play28:17

questions or just use it as

play28:19

inspiration and last but not least we

play28:21

also provided a list of messages and an

play28:24

on send call

play28:25

back the handle send pressed a method

play28:28

constructs a new

play28:30

message adds it to the messages list and

play28:33

sends it off to the agent by calling

play28:34

well send message to agent send message

play28:37

to agent sets the state to loading calls

play28:40

our ask agent method from earlier to hit

play28:42

the cloud run API gets the result back

play28:44

and constructs a new message adds that

play28:47

to list of messages and sets the loading

play28:49

State back to false to clear that agent

play28:51

is typing status and there you have it

play28:54

with the tell me more feature users can

play28:55

now ask for more information about the

play28:57

subject in their photo that's great

play29:00

we've completed our app since we built

play29:02

with flutter we can just package it up

play29:04

and ship it to all the platforms

play29:08

right not yet sorry to burst your bubble

play29:12

there so because we know better than

play29:14

that we know that different devices can

play29:17

provide very different user experiences

play29:19

using a mobile app on a desktop doesn't

play29:22

feel too great so if you're a developer

play29:24

building multiplatform apps you want to

play29:26

optimize your apps so that users can

play29:28

benefit from the user experience for

play29:30

their particular device a phone a tablet

play29:33

a laptop and desktop they all have very

play29:36

different configurations and user

play29:38

experiences touchcreen or keyboard how

play29:40

big is a display is there a camera so

play29:43

there's a lot to think about as a

play29:45

developer especially when you start

play29:46

considering all the various capabilities

play29:48

for every single device so I like to

play29:51

break down these user device

play29:52

considerations into two categories

play29:55

responsive and adaptive responsive is is

play29:58

a change in how your app looks based on

play30:00

screen or window size and adaptive is

play30:03

based on your app's features uh based on

play30:06

the device configuration flutter has

play30:08

widgets and packages to help with

play30:10

optimizing for both so let's look into a

play30:13

few of the modifications that we made to

play30:14

the mobile app so that it's responsive

play30:17

and adaptive for the best experience

play30:18

across different

play30:20

devices let's start by looking at how we

play30:23

made our app

play30:24

responsive first we adjusted the layout

play30:26

to be horizontal on wider displays this

play30:29

lets users get full use out of their

play30:31

nice large monitors and minimizes the

play30:33

need to scroll we didn't have to change

play30:36

anything about the card containing

play30:37

metadata we only rearranged how the

play30:40

widgets were laid out it's a column on

play30:42

mobile But a row on wider screens Plus

play30:46

instead of pushing the new chat window

play30:47

as a new screen on larger displays we

play30:49

can make it pop up as an overlay window

play30:52

in the main screen again we use the same

play30:55

exact chat widget regardless of device

play30:57

with flutter we can reuse a lot of the

play30:59

components like buttons cards and even

play31:01

in this case the chat widget across

play31:03

devices so that minimizes the amount of

play31:05

new code that we have to write as we

play31:07

expand on our Target uh devices while

play31:10

we're on the topic of reusing code

play31:12

here's a little fun fact Google's first

play31:14

party flutter apps have an average of

play31:16

97% code share as said by one of my

play31:19

favorite TV show hosts you don't have to

play31:21

take my word for it the classroom team

play31:24

for example saw a 3X increase in

play31:26

velocity from a mixture of of only

play31:28

writing each feature once or at most one

play31:30

and a half times in scenarios where

play31:32

there were heavy native components among

play31:34

other benefits talk about

play31:38

efficiency so then when we're moving

play31:40

from Mobile to larger devices again like

play31:42

tablet desktop or web another change you

play31:44

often see is the navigation bar don't

play31:47

get me wrong I love a navigation bar on

play31:49

mobile but have you ever seen a

play31:51

navigation bar on a large screen like a

play31:52

tablet or a desktop it looks like an XL

play31:56

version of the app that wasn't exact ly

play31:58

designed with that particular device in

play32:00

mind so while we have a navigation bar

play32:02

on mobile we change that to a navigation

play32:04

rail on large

play32:06

screens for all these responsive designs

play32:09

we used an abstract measure and Branch

play32:11

framework the idea is that you first

play32:12

find shared data between the components

play32:15

decide how you want to measure the

play32:17

available space and then conditionally

play32:19

return UI components it's a really quick

play32:21

and succinct way to summarize a process

play32:23

that personally I found could otherwise

play32:25

be very overwhelming so my teammate Reed

play32:28

and Tyler actually came up with this

play32:29

concept and I'm going to steal it from

play32:31

now on speaking of if you're wondering

play32:34

that's really vague where is the code

play32:36

well it's in Tyler and read uh session

play32:39

where they'll be going into far more

play32:40

detail on how to build adaptive uis in

play32:42

flutter definitely check it out and they

play32:45

have some fantastic tips in their

play32:47

talk so that was responsive now let's

play32:50

talk about adaptive how we change the

play32:52

functionality of our app based on device

play32:55

configuration a common way to determine

play32:58

what platform the app is running on is

play32:59

to use code that looks like this the

play33:02

dart platform class exposes constant

play33:04

values that tell you if the app is

play33:05

compiled for Android iOS Linux Mac or

play33:08

Windows and the flutter Foundation

play33:10

libraries KS web constant will tell you

play33:12

if you're running on web this is great

play33:14

for something like styling your app if

play33:15

you want to make sure everything fits in

play33:17

the native platform design system but

play33:19

you don't want to assume things like

play33:20

input modality based on platform instead

play33:23

of checking the platform and assuming

play33:24

certain behaviors we can define a

play33:26

capabilities class to determine whether

play33:28

a device has well certain

play33:32

capabilities here we Define methods to

play33:35

determine whether device has a camera or

play33:37

a keyboard then you can write a plugin

play33:40

to check the native platform's apis for

play33:42

the exact Hardware that you need now I

play33:44

know this piece is a little hand wavy

play33:46

here please check out flutterdev

play33:48

adaptive um for more in-depth guidance

play33:50

on this piece so from there we can

play33:52

define a policy class to determine

play33:54

whether certain features are supported

play33:56

in our app based on on the device's

play33:59

capabilities so here we've written code

play34:01

that determines if the taking a picture

play34:03

is supported depending on whether device

play34:04

has a camera and as long as the device

play34:07

has a physical keyboard the app supports

play34:09

keyboard shortcuts keep in mind just

play34:11

because the device can do something

play34:13

doesn't mean that it should especially

play34:15

if it's an anti- pattern for that

play34:16

particular platform something like pull

play34:19

to refresh doesn't really feel right on

play34:21

your web browser so in that case you can

play34:23

stack device capabilities for more

play34:25

complex configurations so for example

play34:27

example support puls to refresh only if

play34:30

the device has a touchcreen a small

play34:32

display and is not weet defining this

play34:36

device this kind of a device policy

play34:38

makes our UI code more readable and

play34:41

understandable but it also makes

play34:43

developers lives easier when it comes to

play34:45

mocking device configurations for

play34:46

testing as well plus if device

play34:49

capabilities change in the future or

play34:51

flutter ads support for more platforms

play34:53

you only have to update your code in one

play34:55

place in the policy instead of updating

play34:58

it in every single widget that uses

play35:00

keyboard shortcuts for

play35:02

example with that background scare

play35:04

squared away the first adaptive change

play35:06

that we made was the showing a take a

play35:08

photo button we should make sure to

play35:10

check the device policy before

play35:12

displaying the button make sure that you

play35:14

can actually take a photo on that

play35:17

device the other adaptive feature is for

play35:19

the folks using a physical keyboard we

play35:21

introduce a keyboard shortcut control T

play35:23

to bring up the chat UI we built a

play35:25

shortcut helper widget to wrap our UI

play35:27

the widget is built using the Callback

play35:29

shortcuts widget which takes a map of

play35:31

Key bindings to callbacks and a child

play35:34

widget flutter has a more powerful

play35:36

shortcuts actions intense keyboard

play35:37

shortcut system but for simple use case

play35:40

the Callback shortcuts widget gets the

play35:42

job done so here you can see we passed

play35:45

the map the shortcut helper a map of

play35:48

keyboard shortcut bindings and a child

play35:50

our content whatever is being displayed

play35:52

on the

play35:54

screen and finally for that last bit of

play35:57

Polish

play35:58

of course we had to implement dark mode

play36:00

since we use materials color scheme from

play36:01

seed method to generate our color scheme

play36:03

we passed the brightness State variable

play36:05

that was controlled by switch on the

play36:06

settings

play36:08

page and after all that work we have an

play36:10

app that helps you dive deeper and learn

play36:12

more about your photographs powered by

play36:14

flutter and vertex agent accessible on

play36:17

every device whether that be a regular

play36:19

old mobile

play36:21

phone foldable

play36:24

device tablet and or

play36:35

desktop okay that was a lot of

play36:38

information in 40 minutes let's recap

play36:41

everything we've talked about C you want

play36:43

to start sure for gini we have

play36:46

introduced the gini 1.5 Pro the model

play36:48

provides the multimodal AI so our flup

play36:51

can easily pass the photo to the model

play36:53

and get information about the object

play36:56

also with the l large language context

play36:58

window you could even pass tens or

play37:01

hundreds of the photos at once or long

play37:03

video as the single prompt to the model

play37:07

and have it explain about the the

play37:09

content secondly we have explained the

play37:12

concept of the AI agents and how to use

play37:14

the verx AI agent Builder to design and

play37:17

deploy them easily it provides scalable

play37:19

fully manage one time for the AI agents

play37:22

the agent provides the reasoning and

play37:24

orchestration capabilities that

play37:27

dynamically integrates the Gen app with

play37:29

a variety of the external tools and data

play37:32

sources not only the Wikipedia Pages or

play37:34

The Google Shop data set you could also

play37:36

your uh your own you could also add your

play37:39

own external data set and API as a tools

play37:43

what

play37:43

about well as you saw a single flutter

play37:46

app can be made available across

play37:47

multiple platforms for users on desktop

play37:50

mobile and web you build for every

play37:52

screen while optimizing for the best

play37:54

experience on those devices reach more

play37:56

users on more platforms the bonus of

play37:58

scalable faster development Cycles with

play38:00

one code base flutter is flexible and

play38:03

the goals to help you build and ship

play38:05

awesome apps now Cass if anyone's

play38:07

watching our talk and wants to learn

play38:09

more about building with G Gemini how

play38:11

can they do that sure uh if you're

play38:13

interested in the Gemini models on the

play38:15

verx AI please go to Google search and

play38:17

search with vertx AI Gemini API and

play38:21

vertic AI agent Builder to find

play38:24

documents and tutorials what about the F

play38:27

Well if you're interested in building

play38:28

with flutter try it out head to flutter.

play38:30

d/ getstarted to experience what we mean

play38:32

when we talk about a great developer

play38:34

experience and for those of you who are

play38:36

already a part of the dart and flutter

play38:38

Community I know there's a lot of you

play38:41

[Music]

play38:43

here check out the new vertex AI for

play38:46

Firebase Dart SDK and let us know what

play38:48

you

play38:49

think ultimately Google cloud and flut

play38:51

are both great tools for developers to

play38:53

scale their productivity individually

play38:55

but they're even better together

play38:57

together together they're a valuable

play38:58

multiplier that can help developers be

play39:00

more productive as developers we want to

play39:03

have the right tool for the right job

play39:04

and ultimately we believe flutter and

play39:06

Google Cloud offers you the flexibility

play39:08

to build what you want and the option to

play39:10

scale and reach more users if and when

play39:12

you need it vertex AI agent Builder

play39:15

makes building chat agents accessible to

play39:17

developers and flutter makes the agent

play39:19

accessible to your end

play39:21

users for more on all things flutter

play39:24

please check out the what's new in

play39:25

flutter talk my teammates and John will

play39:27

be covering all the coolest new flutter

play39:30

updates it's been a privilege to be here

play39:32

with yall today thank you so much for

play39:34

taking the time out of your day and

play39:35

giving us the opportunity to share our

play39:37

project with you if you'd like to watch

play39:39

a replay of this talk it'll be on

play39:40

YouTube we hope that we've inspired you

play39:42

to think about all the cool projects

play39:44

that are possible with flutter and

play39:45

Google cloud and we can't wait to see

play39:47

what You' build happy google.io and

play39:49

we'll see you around thank you

play39:55

[Applause]

play39:57

oh

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
AI ExplorationFlutter AppGoogle I/OPhoto LearningAI AgentsMultimodal AIDeveloper ToolsApp DevelopmentMachine LearningUser Experience