<style> img { display: block; margin-left: auto; margin-right: auto; } </style> # GenAI Arcade Game ## Explore, Create, and Innovate ### Detect Labels, Faces, and Landmarks in Images with the Cloud Vision API The Cloud Vision API is a cloud-based service that allows you to analyze images and extract information. It can be used to detect objects, faces, and text in images. The Cloud Vision API lets you understand the content of an image by encapsulating powerful machine learning models in a simple REST API. In this lab, you will send images to the Cloud Vision API and see it detect objects, faces, and landmarks. :::success **Insight** 1. Create an API key 2. Upload an image to a Cloud Storage bucket and make it public 3. Create your request (json file) 4. Call the Cloud Vision API with `curl` ::: ### Vertex AI PaLM API: Qwik Start The Vertex AI PaLM API enables you to test, customize, and deploy instances of Google's PaLM large language models (LLM) so that you can leverage the capabilities of PaLM in your applications. The PaLM family of models supports text completion and multi-turn chat. In this lab, you will explore how to leverage Vertex AI for the use cases mentioned above. Text Prompts - `prompt`: Text input to generate model response. - `temperature`: The temperature is used for sampling during the response generation, which occurs when `topP` and `topK` are applied. - `maxOutputTokens`: Maximum number of tokens that can be generated in the response. - `topK`: Top-k changes how the model selects tokens for output. - `topP`: Top-p changes how the model selects tokens for output. - `context`: Context shapes how the model responds throughout the conversation. - `examples`: List of structured messages to the model to learn how to respond to the conversation. - `messages`: Conversation history provided to the model in a structured alternate-author form. :::success **Insight** 1. Vertex AI API 2. Sample text prompts 3. Sample chat prompts ::: ### Generative AI Film Chatbot / Generative AI Basketball Chatbot / Generative AI Vacation Chatbot / Generative AI Music Chatbot In this lab you will learn the fundamentals of prompt engineering for `topic` using Generative AI and Google Cloud. If you are new to Generative AI or looking for an overview of how to get started, you are in the right place. Read on to learn about the specifics of this lab and areas that you will get hands-on practice with. In this lab learn use a chat application to interact and learn: * The basics of prompt engineering * Why context in relation to AI is important * How to work with Generative AI :::success **Insight** 1. Access the Chat Application 2. Using Prompt Engineering ::: ### Get Started with Generative AI Studio Vertex AI is an end-to-end machine learning platform that helps you build, deploy, and scale machine learning models faster and easier. It provides a unified experience for managing all aspects of the machine learning lifecycle, from data preparation to model deployment. **Vertex AI Studio** is a cloud-based platform that allows users to create and experiment with generative AI models. The platform provides a variety of tools and resources that make it easy to get started with generative AI, even if you don't have a background in machine learning. In this lab, you use AI Studio with Vertex AI to create prompts and conversations on Google Cloud console, without using the API or Python SDKs. * **FREE-FORM** - This mode provides a free and easy approach to design your prompt. It is suitable for small and experimental prompts with no additional examples. You will be using this to explore zero-shot prompting. * **STRUCTURED** - This mode provides an easy-to-use template approach to prompt design. Context and multiple examples can be added to the prompt in this mode. This is especially useful for one-shot and few-shot prompting methods which you will be exploring later. :::success **Insight** 1. Vertex AI API 2. Create prompts 3. Create conversations 4. Explore prompt gallery ::: ### Analyze Images with the Cloud Vision API: Challenge Lab 1. `export API_KEY=<YOUR_API_KEY>` 2. Add your bucket/img to the `gcsImageUri` (圖片已經有在 bucket 了) 3. Add the method to `type`. First, use the `TEXT_DETECTION` method of the Vision API. 4. `@YOUR_JSON` 注意改成 `@request.json` 5. `LANDMARK_DETECTION` method of the Vision API. ## What's Next # Google Cloud Computing Foundation ## Google Cloud 實作研究室導覽 Google Cloud 是一套託管於 Google 基礎架構的雲端服務,提供運算、儲存、資料分析、機器學習和網路等方面的服務和 API,這些項目可以整合至任何個人或企業級的雲端運算應用程式或專案。 下表從角色說明文檔中摘取了相關定義,簡要介紹了查看者、編輯者和擁有者角色的許可權: |角色名稱|許可權| |--|--| |roles/viewer|有權執行不影響狀態的唯讀操作,如查看(但不能修改)現有資源或數據。| |roles/editor|擁有所有 Viewer(查看者)許可權,此外還有權執行會修改狀態的操作(如更改現有資源)。| |roles/owner|擁有所有編輯者許可權,以及執行以下操作的許可權:管理專案的角色和許可權,以及專案中的所有資源; 為專案設置結算資訊。| **Dialogflow API**: Builds conversational interfaces (for example, chatbots, and voice-powered apps and devices).