menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Use Chrome...
source image

Dev

1M

read

447

img
dot

Image Credit: Dev

Use Chrome's Prompt API to generate a trip planner in Angular

  • The author of this article describes how to build a trip planner application locally using Chrome’s Built-In Prompt API and Angular.
  • The article explains that the Angular application calls the Prompt API to create a language model and submit queries to Gemini Nano to provide details to the user such as applying for a travel visa, clothes to pack, and attractions to visit each day.
  • The article explains that using Chrome’s built-in AI has zero cost since the application uses the local models in Chrome Canary.
  • The article provides a step-by-step guide on installing dependencies, scaffolding an Angular application, and bootstraping the language model.
  • The article explains that a validation logic is implemented to ensure that the Prompt API is available before displaying the user interface so users can enter texts.
  • The article explains that the PromptResponseComponent displays a text area where users can enter a query. This query is submitted to the internal Gemini Nano which generates a text answer.
  • The article defines a service layer over the Prompt API. The SystemPromptService service encapsulates the logic of the Prompt API.
  • The article explains that software engineers can create Web AI applications without setting up a backend server or accumulating the costs of LLM on the cloud.
  • The article provides a GitHub Repo and a demo for readers to learn more about the topic.

Read Full Article

like

26 Likes

For uninterrupted reading, download the app