Skip to content

feat(chat): wire sign-in → chat, add /chat/ask, static fixes, env loading#1

Open
krishnavania09 wants to merge 1 commit into
heathbrew:mainfrom
krishnavania09:feat/chat-flow
Open

feat(chat): wire sign-in → chat, add /chat/ask, static fixes, env loading#1
krishnavania09 wants to merge 1 commit into
heathbrew:mainfrom
krishnavania09:feat/chat-flow

Conversation

@krishnavania09

Copy link
Copy Markdown

Summary

  • Fixes navigation: home → sign-in → chat works end-to-end
  • Adds /chat/ask JSON endpoint calling helper.send_gptnew()
  • Uses url_for('static', ...) and removes broken image refs
  • Loads .env (OPENAI_API_KEY) for LLM calls; safe fallback when model.pkl missing

Why

Previously users could reach only home/sign-in. This enables actual chat usage with minimal changes and keeps the original helper-based architecture.

Notes

  • Text-only static (no images)
  • No breaking changes to existing routes

@krishnavania09

krishnavania09 commented Sep 22, 2025

Copy link
Copy Markdown
Author

Ready for review @heathbrew

How to test

  1. Create venv + install deps:
    python -m venv .venv
    . .venv/Scripts/activate
    pip install -r requirements.txt
  2. Set key:
    $env:OPENAI_API_KEY="sk-..."
  3. Run: python app.py
  4. Sign in: student@example.com / student
  5. Go to /chat → type a prompt → expect a JSON call to /chat/ask and a text answer.

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.

1 participant