Giter VIP home page Giter VIP logo

fitness-advisor-demo's Introduction

Fitness Advisor Demo

This is a quick proof of concept project designed to show different interactions between one's domain data (database, in-memory store date, etc.), and external LLMs. We're using Langchain.js (although we might try instructor in a different branch) to help with tooling and aim to show basic intersections between our data, user selections, and LLMs, by using prompt templates with structured data extractions and RAG flows.

The contrived example is that of a Fitness Advisor (fitness recommendation tool). The flow is simple:

  1. The user selects their fitness level and their fitness goal (both normally stored in a database, but for now, it's in-memory) levels = ['beginner', 'intermediate', 'advanced'];

    Fitness goals:

  • Weight Loss
  • Muscle Gain
  • Endurance Building
  • Flexibility Improvement
  • Stress Reduction
  1. We pass this selection to a Langchain chain: LLM responds with options like "Beginner's Running Plan", "Cycling Interval Training", "Swimming Laps Solution", etc.
  2. The user makes their selection, and we send that to the LLM for a final regimen creation.

RAG Flows: We will need a vector database. Some options that Langchain can interface with are: local setup:

  • Memory
  • Chroma
  • local Postgres with PGVector
  • SQLite via Prisma?

remote:

  • Supabase and many other options

Running the project

  • Be sure to create an .env.local or .env file and enter OPENAI_API_KEY and ANTHROPIC_API_KEY if you're planning on using Anthropic. The default is OPENAI_API_KEY.
  • run pnpm install
  • run pnpm dev

fitness-advisor-demo's People

Contributors

nembus avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.