Returns a JSON object containing the updated conversation step.
Field
Type
Description
session_id
string
Unique session identifier
current_step
object
The latest step in the conversation
Response Handling
If the response contains:ActionType = CALL_TOOL, you must call this API again to retrieve the step result.
Example Response 1
{
"current_step": {
"agent_response": {
"action": "AskUser",
"parameters": {
"question": "I'll help you create a dog image! To get the best result, could you please provide more details about:\n\n1. What breed of dog would you like? (e.g., Golden Retriever, Husky, etc.)\n2. What should the dog be doing? (e.g., sitting, running, playing)\n3. Any specific setting or background you'd like? (e.g., park, beach, home)\n4. Any particular style you prefer? (e.g., realistic, cartoon, artistic)\n\nThe more details you provide, the better the image will match your vision!"
},
"reasoning": "The user wants to create a dog image. We can use the text-to-image generation tool (generate_image_by_recraft) for this. However, before generating the image, I should ask for more specific details about the type of dog image they want to ensure we get the best possible result.",
"selected_tool": ""
},
"id": 1,
"step_result": null,
"timestamp": "2025-02-21T04:48:59.812834+00:00"
},
"session_id": "shuxuan-test-1"
}
Example Response 2
{
"current_step": {
"agent_response": {
"action": "CallTool",
"parameters": {
"prompt": "A photorealistic dog running at full speed in an open field with grass. The dog's muscles are tense, fur flowing in the wind, captured in mid-stride with all four paws off the ground. Natural lighting, high detail, crisp focus on the dog's determined expression."
},
"reasoning": "The user has requested a running and realistic dog image. Now I need to generate this image using the 'generate_image_by_recraft' tool, which allows for text-to-image generation. I'll craft a detailed prompt to create the realistic running dog image the user wants.",
"selected_tool": "generate_image_by_recraft"
},
"id": 2,
"step_result": null,
"timestamp": "2025-02-25T11:38:51.634443+00:00"
},
"session_id": "shuxuan-test-1"
}
Next Step: If "action": "CALL_TOOL" and "step_result": null, make another API request to get the step result.