kyma-project / kyma-companion

A tool that brings AI to Kyma
Apache License 2.0
3 stars 12 forks source link

Implement Follow-Up Questions Endpoint #215

Closed Teneroy closed 2 weeks ago

Teneroy commented 1 month ago

Description

The goal of this task is to implement the follow-up questions endpoint. This endpoint will retrieve conversation history from Redis Checkpointers and generate from 1 to 3 follow-up questions based on the context of the conversation history. The endpoint should return the generated questions in the format agreed upon in the API description document.

Tasks

  1. Implement Follow-Up Questions Endpoint:

    • Develop the API endpoint that handles requests for follow-up questions.
    • Ensure the endpoint is compliant with the structure and behavior described in the API documentation.
  2. Retrieve Conversation History from Redis Checkpointers:

    • Implement logic to retrieve conversation history from Redis Checkpointers.
    • Ensure the retrieved history includes necessary information (e.g., user inputs, companion responses) to generate follow-up questions.
  3. Generate Follow-Up Questions:

    • Develop a function to generate 1 to 3 follow-up questions based on the conversation history.
    • Use conversation context to ensure the questions are relevant and insightful for the next steps in the interaction.
    • Ensure the questions align with the overall flow of the conversation and make sense based on previous user inputs and companion outputs.
  4. Return Follow-Up Questions in the Correct Format:

    • Ensure the API response returns the follow-up questions in the correct format, as agreed in the API description document.

Acceptance Criteria

Teneroy commented 1 month ago

Consider using 4o-mini