Workflow of Reflection Handler
Method: reflection_handler()
reflection_handler()Step-by-Step Workflow
1. Validating the Input Query
pythonCopyEditif not query_text:
return {
"query_text": query_text,
"response_text": "Missing required fields"
}
if not self._agent_self_uuid:
return {
"query_text": query_text,
"response_text": "Missing client_agent_uuid in the init method"
}2. Fetching Bad Memories
3. Fetching Good Memories
4. Refining the Prompt
5. Generating a Refined Response
6. Returning the Final Response
Example API Request & Response
Request Payload
Response
Last updated