Skip to content

sanjeevbhusal/ai-agent-poc

Repository files navigation

A proof of concept AI agent that can retrieve a user's location and location's temperature.

Start chatting with the agent about either generic topics or ask it questions that require your location. Eg: what are the things i can do in my city this weekend ? You will see that the agent will make api calls to retrieve your location and use it to answer your question.

Image

In the image, the agent didn't retrieve your location for the first "Hello" message. It only retrieved your location when you asked it question that required your location as a context.

To get started,

  1. clone this repo.
  2. Run npm i to install dependencies.
  3. Run npm run dev to start the app.
  4. Open http://localhost:5173 in your browser.
  5. Chat with the agent.

Note: You will need to set up a .env file in the root directory of the project. The .env file should contain the following variables:

VITE_OPENAI_API_KEY: API Key for OpenAI VITE_WEATHER_API_KEY: API Key for Weather Service to fetch your location. Use https://www.weatherapi.com/ to get an api key.

This project was created while learning about AI agents from https://scrimba.com/the-ai-engineer-path-c02v/~02o/s0i9ci6dv0/head

About

A Proof of concept (POC) ai agent that can retrieve a user's location information if required

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published