Beyond Chatbots_ Unlocking Gemini's Potential through Flutter.pdf
gdgsurrey
1,264 views
48 slides
Aug 24, 2024
Slide 1 of 48
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
About This Presentation
This talk will dive into the exciting world of Gemini, Google's next-generation large language model (LLM), and its transformative potential for Flutter app development. We'll explore how Gemini can be integrated into Flutter projects to create personalized content, intelligent assistants, a...
This talk will dive into the exciting world of Gemini, Google's next-generation large language model (LLM), and its transformative potential for Flutter app development. We'll explore how Gemini can be integrated into Flutter projects to create personalized content, intelligent assistants, and enhanced user interfaces, going beyond traditional chatbot interactions. You'll discover how Gemini can power a wide range of innovative features, from dynamic content generation to AI-driven UI elements.
Size: 2.82 MB
Language: en
Added: Aug 24, 2024
Slides: 48 pages
Slide Content
Beyond Chatbots:
Unlocking Gemini's
Potential through Flutter
Roman Jaquez
he/him
Flutter GDE / GDG Lawrence Organizer
Building
Next-Generation,
Gemini-Powered
Flutter Apps
What is Gemini?
●Google's cutting-edge family of large language models (LLMs).
●Designed for diverse tasks, from text generation to code
completion and more.
●Offers advanced capabilities like reasoning, translation, and
creative content generation.
How many years did each take to get
to 50 million users?
Airplanes Internet Facebook Gen AI
How many years did each take to get
to 50 million users?
Airplanes Internet Facebook Gen AI
68 Years
How many years did each take to get
to 50 million users?
Airplanes Internet Facebook Gen AI
68 Years 7 Years
How many years did each take to get
to 50 million users?
Airplanes Internet Facebook Gen AI
68 Years 7 Years 3 Years
How many years did each take to get
to 50 million users?
Airplanes Internet Facebook Gen AI
68 Years 7 Years 3 Years5 weeks
Why Gemini for Flutter?
●Enhance your apps with AI-powered features.
●Deliver personalized and dynamic user experiences.
●Unlock new possibilities for engagement and user
satisfaction.
Use Google AI Studio
For ideation and proving out your ideas
https://aistudio.google.com
Gemini for Flutter Apps: Use Cases
Personalized Content:
●Dynamically generate tailored
content for users based on their
preferences and behavior.
●Recommend relevant products,
services, or information.
●Create interactive learning
experiences.
Collect User Data
and Preferences
Prompt
[
{
“type”: “video”,
“link”: “http://url_to_video”,
“name”:”Learn Flutter”,
“description”: “video desc…”
},
…
]
fromJSON
VideoResource
UrlResource
UrlResource
…
VideoWidget
UrlWidget
Google AI SDK
For Dart
Integrating Gemini
with Flutter
// collect user options
class UserOptions {
final String subject; // Python
final String level; // Beginner
final List<String> contentOptions; // videos, links
}
void generateLearningProgram(UserOptions options) async {
final model = GenerativeModel(
model: 'gemini-1.5-flash-latest',
apiKey: apiKey,
generationConfig: GenerationConfig({...})
);
final prompt = ```
I am a ${options.level} and want to learn ${options.subject} and I want
the content as ${options.contentOptions}.
```;
final content = [Content.text(prompt)];
final response = await model.generateContent(content);
final jsonResponse = json.decode(response.text!);
}
void generateLearningProgram(UserOptions options) async {
final model = GenerativeModel(
model: 'gemini-1.5-flash-latest',
apiKey: apiKey,
generationConfig: GenerationConfig({...})
);
final prompt = ```
I am a ${options.level} and want to learn ${options.subject} and I want
the content as ${options.contentOptions}.
```;
final content = [Content.text(prompt)];
final response = await model.generateContent(content);
final jsonResponse = json.decode(response.text!);
}
void generateLearningProgram(UserOptions options) async {
final model = GenerativeModel(
model: 'gemini-1.5-flash-latest',
apiKey: apiKey,
generationConfig: GenerationConfig({...})
);
final prompt = ```
I am a ${options.level} and want to learn ${options.subject} and I want
the content as ${options.contentOptions}.
```;
final content = [Content.text(prompt)];
final response = await model.generateContent(content);
final jsonResponse = json.decode(response.text!);
}
void generateLearningProgram(UserOptions options) async {
final model = GenerativeModel(
model: 'gemini-1.5-flash-latest',
apiKey: apiKey,
generationConfig: GenerationConfig({...})
);
final prompt = ```
I am a ${options.level} and want to learn ${options.subject} and I want
the content as ${options.contentOptions}.
```;
final content = [Content.text(prompt)];
final response = await model.generateContent(content);
final jsonResponse = json.decode(response.text!);
}
void generateLearningProgram(UserOptions options) async {
final model = GenerativeModel(
model: 'gemini-1.5-flash-latest',
apiKey: apiKey,
generationConfig: GenerationConfig({...})
);
final prompt = ```
I am a ${options.level} and want to learn ${options.subject} and I want
the content as ${options.contentOptions}.
```;
final content = [Content.text(prompt)];
final response = await model.generateContent(content);
final jsonResponse = json.decode(response.text!);
}
Integrating Gemini with Flutter
Flutter Packages to Access Gemini
google_generative_ai*
(*for prototyping only)
final model = GenerativeModel(
model: 'gemini-1.5-flash-latest',
apiKey: apiKey,
generationConfig: GenerationConfig({...})
);
await Firebase.initializeApp()
final model = FirebaseVertexAI.instance.generativeModel(
model: 'gemini-1.5-flash-latest'
);
model.generateContent(..);
Gemini for Flutter Apps: Use Cases
Intelligent Assistants:
●Provide conversational support and
guidance within your app.
●Automate tasks and streamline
workflows.
●Offer personalized
recommendations and insights.
How many platforms can Flutter
compile into?
789
How many platforms can Flutter
compile into?
Use the WWIMWALER pneumonic:
WINDOWS, WEB, IOS, MACOS, WASM,
ANDROID, LINUX, EMBEDDED, RISC-V
Different
Platforms
789
Parsed Text
From Speech
Prompt
{
“sentiment”: “happy”
}
fromJSON
Sentiment
Response
HappyAnimation
SleepyAnimation
Google AI SDK
For Dart
0011010101
0010101010
0011101010
It is sunny
today!
2.1”
LCD
Screen
Parsed Text
From Speech
Prompt
{
“sentiment”: “happy”
}
fromJSON
Sentiment
Response
HappyAnimation
SleepyAnimation
Google AI SDK
For Dart
0011010101
0010101010
0011101010
It is sunny
today!
Gemini for Flutter Apps: Use Cases
Enhanced User Interfaces:
●Adaptive Interfaces
●Dynamic Visualizations & Interactive
Elements
●The Power of AI-Driven UI
Ethical Considerations and Best Practices
Responsible AI:
●Transparency & Explainability
●Fairness & Bias Mitigation
●Privacy & Data Security
Ethical Considerations and Best Practices
Security and Privacy:
●Secure Data Handling
●Privacy by Design
●User Empowerment
●Trust Through Security
The Future of Gemini and Flutter
Emerging Technologies
●Evolving AI Capabilities
●Multi-modal interactions
●Contextual Understanding
●Real-time Adaptation
●Edge Computing Integration
The Future of Gemini and Flutter
Opportunities for Innovation:
●Seamless Integration
●New Frontiers of App Development
●Limitless Potential
{
"name": "Drawing Challenge",
"videoDescription": "Drawing a house",
"challengeComplete": true,
"challengeDescription": "Draw a house on a piece of paper"
}
Vertex AI
For Firebase
Firebase
Firebase SDK
For Flutter
Video.mp4
Prompt
IMG FRAME
AI Generative UI (Preview)
Ability for Gemini to generate UI components to be fed and rendered by your UI
```
Text(
“Canada”,
textAlign: TextAlign.center,
Style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
)
),
Text
Button
Google AI SDK
For Dart
Prompt: “Show me places
To visit in the fall”
Get Started with Gemini
Google AI Studio
https://aistudio.google.com/
Gemini API SDK Packages
○google_generative_ai
○firebase_vertexai
Flutter and AI
https://flutter.dev/ai