Skip to content

SusheelThapa/gastro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gastro

Gastro is a culinary assistant application that interprets user inputs to extract ingredients from a prompt, leveraging the power of Copilot Coagents. Depending on the requirements, it either utilizes the Spoonacular API to enhance the response or processes the query directly, serving customized culinary advice through an intelligent agent.

Table of Contents

Demo

gastro.mp4

Usage

Running the Agent

  1. Navigate to agent

    cd agent
  2. Create a virtual environment:

    python3 -m venv venv
  3. Activate the virtual environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS/Linux:
      source venv/bin/activate
  4. Install the required dependencies:

    pip install -r requirements.txt
  5. Run the FastAPI server:

    uvicorn main:app --host 127.0.0.1 --port 8000 --reload

Running the UI

  1. Navigate to the UI directory:

    cd gastro
  2. Install UI dependencies:

    bun install
  3. Start the development server for the UI:

    bun run dev

Langraph Details

For an in-depth explanation of the Langraph used in Gastro, navigate to the notebook located at:

notebooks/Gastro-LangGraph.ipynb

This notebook provides detailed insights into how the Langraph is structured and how it powers the recipe generation logic in Gastro.

Langgraph Image

Environmental Variables

For Frontend

OPENAI_API_KEY=your-nagai-api-key
OPENAI_BASE_URL=https://api.naga.ac/v1
REMOTE_ACTION_BASE_URL=http://127.0.0.1:8000

For Backend

PORT=8000
OPENAI_API_KEY=your-nagaai-api-key
OPENAI_BASE_URL=https://api.naga.ac/v1/
SPOONACULAR_API_KEY=your-spoonacular-api-key
APP_ENV=development

Features

  • Ingredient Extraction: Analyzes the user's input to identify and extract key ingredients.
  • API Integration: Optionally uses the Spoonteny API for extended functionality, such as fetching recipes or nutritional information.
  • Direct Processing: Can operate without external APIs to provide immediate responses based on a built-in knowledge base.
  • User-Friendly Interface: Simple command-line interface for easy interaction.

License

Distributed under the MIT License. See LICENSE for more information.

Event

This project was developed for the Quira Quest 24, sponsored by Copilotkit. It aims to showcase innovative uses of AI in everyday applications, promoting open-source collaboration and development.