Skip to content

Client-side JS Code to Communicate with Flask Endpoint #11

@davidalami

Description

@davidalami

Is blocked by: #10 and #9

Is your feature request related to a problem? Please describe.
Users should be able to send their questions and receive responses without refreshing the page.

Describe the solution you'd like
Implement JS frontend functionality in the template to:

  1. Listen for button clicks.
  2. On button click, send an POST request with the user's question to /ask-chatgpt.
  3. Update the UI with ChatGPT's response in the dedicated section.

Describe alternatives you've considered
A full-page reload could be considered but would degrade the user experience.

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions