Skip to content

feat: port AI chatbot and health plan endpoints from NutriHelp-ai#269

Merged
Vedant1515 merged 1 commit into
masterfrom
feat/s224882599-ai-endpoints
May 20, 2026
Merged

feat: port AI chatbot and health plan endpoints from NutriHelp-ai#269
Vedant1515 merged 1 commit into
masterfrom
feat/s224882599-ai-endpoints

Conversation

@TienNguyen3711
Copy link
Copy Markdown
Collaborator

Summary

  • Add 4 AI endpoints ported exactly from the Python FastAPI service
  • POST /ai-model/chatbot/chat — RAG-grounded chatbot with domain guard fallback
  • POST /ai-model/chatbot/chat_with_rag — strict RAG-only response
  • POST /ai-model/chatbot/transcribe — Whisper audio transcription via Groq
  • POST /ai-model/medical-report/plan/generate — 8-week health plan generator

Changes

  • Created routes/ai/chatbot.js (CommonJS, ported from Python)
  • Created routes/ai/healthPlan.js (CommonJS, ported from Python)
  • Registered routes in routes/index.js
  • Installed chromadb package
  • Added AI model env vars to .env

Test plan

  • POST /ai-model/chatbot/chat with { "query": "What foods are high in protein?" }
  • POST /ai-model/chatbot/chat_with_rag with a nutrition query
  • POST /ai-model/chatbot/transcribe with an audio file
  • POST /ai-model/medical-report/plan/generate with medical_report and health_goal

Add 4 AI endpoints ported exactly from the Python FastAPI service:
- POST /ai-model/chatbot/chat
- POST /ai-model/chatbot/chat_with_rag
- POST /ai-model/chatbot/transcribe
- POST /ai-model/medical-report/plan/generate

Creates routes/ai/chatbot.js and routes/ai/healthPlan.js (CommonJS),
installs chromadb, and registers routes in routes/index.js.
@TienNguyen3711 TienNguyen3711 requested a review from Vedant1515 May 12, 2026 11:49
Copy link
Copy Markdown
Collaborator

@nethmiWee nethmiWee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No conflicts found. Reviewed the chatbot + health plan RAG flow, routing is correctly wired.

@Vedant1515 Vedant1515 merged commit 8558210 into master May 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants