Slide 1

Slide 1 text

Get started with the Gemini API Bangkok Cloud • Fon - Kamolphan Liwprasert GDE Cloud, WTM Ambassador

Slide 2

Slide 2 text

Bangkok Cloud • Get started with the Gemini API

Slide 3

Slide 3 text

Customer support Website navigation Virtual digital assistants Document/ media search, synthesis Device support Employee assistance Market research Conversational commerce and personalized recommendations Generative AI powers a multitude of use cases

Slide 4

Slide 4 text

Generative AI is driving new opportunities Operational efficiencies, cost savings, and value creation Improve time-to-value to search, navigate, and extract insights and understanding from large amounts of complex data Complex data, intuitively accessible Improve customer experience, reaching larger client bases by making online interactions more natural, conversational, and rewarding Online interactions made conversational Generate text, code, image, video, or music quickly and multi-modally, speeding up every business processes and maximizing employee productivity Content generation at the click of a button Customize large models and incorporate state of the art generative capabilities natively into your own internal ML operational platforms Customize Foundation models Analyst Customer Service Creative AI Practitioner

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Vertex AI Generative AI with Google I want to use Gen AI w/ Google Gemini (Bard) Foundational Models AI Studio / Gemini API Google Cloud Foundation Models Model Garden Search Conversation as a consumer as a developer for prototyping enterprise level privacy, security, scalability https://gemini.google.com/ https://aistudio.google.com/

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Bangkok Cloud • https://ai.google.dev/gemini-api/docs/get-started/tutorial?lang=python bit.ly/gemini-api-lab

Slide 9

Slide 9 text

Codelabs Objectives This codelabs will allow us to understand the basics on how to use the Python SDK for the Gemini API. We will explore these tasks: ● Set up your development environment and API access to use Gemini ● Generate text responses from text inputs ● Generate text responses from multimodal inputs (text and images) ● Use Gemini for multi-turn conversations (chat) ● Explore advanced use cases

Slide 10

Slide 10 text

Bangkok Cloud • aistudio.google.com Save a copy in Drive 💾 RENAME

Slide 11

Slide 11 text

Bangkok Cloud • bit.ly/gemini-api-lab Generate text from text inputs 1 Generate text from image & text inputs 2 Chat conversation 3 Tokens & Embeddings 4 Advance Use Case and Settings 5

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

Bangkok Cloud • aistudio.google.com Project Setup: API Key 🔑 How to get API key (detailed) https://bit.ly/aistudio-api-key aistudio.google.com

Slide 14

Slide 14 text

Bangkok Cloud • aistudio.google.com Project Setup: API Key 🔑 Paste here

Slide 15

Slide 15 text

Bangkok Cloud • bit.ly/gemini-api-lab Generate text from text inputs 1 Generate text from image & text inputs 2 Chat conversation 3 Tokens & Embeddings 4 Advance Use Case and Settings 5

Slide 16

Slide 16 text

Bangkok Cloud • bit.ly/gemini-api-lab Generate text from text inputs 1 Generate text from image & text inputs 2 Chat conversation 3 Tokens & Embeddings 4 Advance Use Case and Settings 5

Slide 17

Slide 17 text

Bangkok Cloud • bit.ly/gemini-api-lab Generate text from text inputs 1 Generate text from image & text inputs 2 Chat conversation 3 Tokens & Embeddings 4 Advance Use Case and Settings 5

Slide 18

Slide 18 text

Bangkok Cloud • bit.ly/gemini-api-lab Generate text from text inputs 1 Generate text from image & text inputs 2 Chat conversation 3 Tokens & Embeddings 4 Advance Use Case and Settings 5

Slide 19

Slide 19 text

Cosine Similarity คือ องศาระ วาง Vector (ในที่นี้คือ embedding) มีคาระ วาง [-1, 1] จากนิยาม เรา ามารถคำนวณ Cosine Similarity ของ 2 vector ไดโดยคำนวณ Dot product (np.dot) เปรียบเทียบ Embedding ด้วย Cosine Similarity ที่มา PyImageSearch และ https://en.wikipedia.org/wiki/Cosine_similarity cosine_similarity = np.dot(v, w) / (np.linalg.norm(v) * np.linalg.norm(w)) ~ 1 ~ -1 ~ 0

Slide 20

Slide 20 text

Bangkok Cloud • bit.ly/gemini-api-lab Generate text from text inputs 1 Generate text from image & text inputs 2 Chat conversation 3 Tokens & Embeddings 4 Advance Use Case and Settings 5

Slide 21

Slide 21 text

Safety Rating https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-attributes

Slide 22

Slide 22 text

Bangkok Cloud • bit.ly/gemini-api-lab bit.ly/gemini-api-lab Error? No worries

Slide 23

Slide 23 text

Bangkok Cloud • bit.ly/gemini-api-lab bit.ly/gemini-api-lab

Slide 24

Slide 24 text

Additional Gemini (Python) Resources: ● Gemini API Cookbook - https://bit.ly/gemini-api-cookbook ● Model Tuning - https://bit.ly/tuning-quickstart-python ● Function Calling - https://bit.ly/function-calling-python-quickstart ● Document search - https://bit.ly/doc-search-embeddings ● Prompt Design Strategies - https://bit.ly/prompt-design-strategies

Slide 25

Slide 25 text

Google Cloud’s Gen AI GitHub github.com/GoogleCloudPlatform/generative-ai Resource

Slide 26

Slide 26 text

Generative AI Learning Path cloudskillsboost.google/journeys/118 Resource

Slide 27

Slide 27 text

Thank You! Bangkok Cloud • Fon - Kamolphan Liwprasert WTM Ambassador, GDE Cloud