Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

# Feature Request: Display Opening Questions in UI #82

Open
Delgerskhn opened this issue Jul 23, 2024 · 0 comments
Open

# Feature Request: Display Opening Questions in UI #82

Delgerskhn opened this issue Jul 23, 2024 · 0 comments

Comments

@Delgerskhn
Copy link

Feature Request: Display Opening Questions in UI

Description

Currently, the front-end application using Next.js does not display the opening questions that are provided by the backend as JSON. While the opening text message is displayed correctly, the buttons for the opening questions are not present in the UI, even though they exist in the JSON data.

Expected Behavior

The UI should display the opening question buttons as provided in the JSON data from the backend. Each button should be clickable and should function according to the logic defined in the application.

Actual Behavior

The UI currently displays only the opening text message. The opening question buttons, though present in the JSON data, are not visible or interactive in the UI.

JSON Data Example

Here is an example of the JSON data received from the backend:

//Response of route http://localhost:3000/api/parameters
{...
suggested_questions: [
    "ХЗТТ-д ямар хүн үйлчлүүлэх боломжтой вэ?",
    "ХЗТТ гэж юу вэ?",
    "ХЗТТ нь ямар үйлчилгээ үзүүлдэг вэ?",
    "Холбоо барих мэдээлэл",
    "Салбаруудын жагсаалт харах"
]
...}

Steps to Reproduce

  1. Configure dify backend endpoint, secret keys
  2. Launch the front-end application.
  3. Start new conversation
  4. Observe the opening text message displayed in the UI.
  5. Check the JSON response from the backend and notice the presence of opening questions.
  6. Observe that the opening question buttons are not displayed in the UI.

Proposed Solution

Modify the front-end code to render the opening question buttons as specified in the JSON data. Each button should be styled consistently with the rest of the UI and should be clickable, triggering the appropriate actions.

Additional Information

Framework: Next.js
Issue Found in Version: [0.1.0]
Browser: [Microsoft Edge]

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

No branches or pull requests

1 participant