Build with AI
Build agent with Gemini/Gemma and AutoGen
Jimmy Liao
Generative AI Evangelist
Taoyuan
Deck Link
April 13, 2024
Discord for GDG Taiwan
https://discord.com/invite/google-dev-community
In the upcoming series of session/workshops
Before start - check your GCP access
https://github.com/jimmyliao/genai-gdg
已經有 Google Cloud billing account ,而且可以打開取得產生 API Key 的權限了嗎?
https://aistudio.google.com/
Temp access for this workshop
為了 Workshop方便,會提供講師的 Google Cloud Project,加入學員的 email。預計課程後一個禮拜會關掉,之後請改用自己的帳號與 Project。
請用 QRCode 填入你的 Email
Agenda
https://github.com/jimmyliao/genai-gdg
Gemini Models
and APIs
Taoyuan
AI Studio
https://aistudio.google.com/
From Prompt Library
Prompting
Chained prompts
Context
Generation parameters
Search and Information Synthesis
BYO Data
Use the prompt’s context window
Gemini 1.5 Pro!
Use the prompt’s content window
AQA Attributed Question Answering
with inline chunks
Use AQA with inline chunks
Use AQA with the retriever service
Function Calling
Function Calling - Basic
AllowedTypes = (
int | float | str | bool | list | dict )
Function Calling - Basic
Function Calling - Schema
Function Calling - Structured data
Before function calling
Function Calling - Structured data
with function calling declaration
Function Calling - Structured data
Here how function calling with SDK…
Image understanding
Gemini 1.5 Pro
Gemini 1.5 Pro
Image understanding
Time to
Get Hands Dirty
Kaohsiung
Task 1: AI Studio and Prompting
Generate API Key
Gemini Pro
Gemini Vision
Prompt Library
Task 2: Python SDK part 1 - Chat
Notebook => intro_gemini_chat.ipynb
Model parameters
Stream
Chat History
Use with LangChain
Estimated: 10 mins
Task 3: Python SDK part 2 - Vision
Notebook =>
Image (Local) -> Text
Image + Text -> Text
Video -> Text
Estimated: 20 mins
Task 4: cURL to know all Gemini Pro APIs
Notebook => intro_gemini_curl.ipynb
Estimated: 15 mins
Task 5: Build RAG application (LMM)
(https://github.com/jimmyliao/genai-gdg/blob/main/gemini/rag-intro/gemini-lmm.ipynb)
Gemma
Taoyuan
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
https://www.youtube.com/watch?v=60V70JqGkuU
Setup Tokenizer
Create Pipeline
Text Generation
Create Message and Prompt
Ollama
Taoyuan
Run Your Local LLM!
AI Agent
Taoyuan
AI Agent
Difference
Source: Youtube video of Andrew Ng at Sequoia Capital (Link in References)
AI Agent Example
AutoGPT
Langroid
AutoGen
Agentic Workflow (example)
https://www.linkedin.com/pulse/introducing-ai-agents-agentic-workflows-future-ken-rheingans-1rwce/
Related publication
Task 6: Multi-Agent - Gemma, Ollama, and AutoGen
(https://colab.research.google.com/github/yeyu2/Youtube_demos/blob/main/autogen-ollama-gemma.ipynb )
References
Official
DM for detail
We are working on * initiatives around GenAI