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
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.
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.
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.
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
[x] Implement the follow-up questions endpoint as specified in the API documentation.
[x] Retrieve conversation history from Redis Checkpointers.
[x] Generate between 1 and 3 follow-up questions based on the conversation history.
[x] Ensure the follow-up questions are contextually relevant to the conversation so far.
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
Implement Follow-Up Questions Endpoint:
Retrieve Conversation History from Redis Checkpointers:
Generate Follow-Up Questions:
Return Follow-Up Questions in the Correct Format:
Acceptance Criteria