Recommend Stance
POST /api/chat/stances/recommend
Get recommended stance for a task
Analyzes a task description and recommends the most appropriate response stance to use. Uses keyword matching to suggest stances based on the task content.
Args: task_description: Description of the task to perform
Returns: Dict containing: - recommended_stance: Stance ID or null if no match - confidence: Match confidence (placeholder for now) - task_analyzed: The analyzed task description
Example Request: POST /chat/stances/recommend { “task_description”: “Let’s brainstorm some character ideas” }
Example Response: { “recommended_stance”: “brainstorming”, “confidence”: “high”, “task_analyzed”: “Let’s brainstorm some character ideas” }
Request Body required
Section titled “Request Body required ”Request model for stance recommendation endpoint.
Analyzes task description to recommend the most appropriate response stance (e.g., brainstorming, concise, supportive) for handling the task.
Fields: task_description: Description of the task requiring stance recommendation
JSON Example: { “taskDescription”: “Let’s brainstorm character ideas” }
Used By: - POST /api/chat/stances/recommend - Stance selection UI - Response tone customization
object
Task description for stance matching
Responses
Section titled “ Responses ”Successful Response
Response model for stance recommendation endpoint.
Returns recommended stance for a given task based on content analysis and keyword matching for intelligent stance selection.
Fields:
recommended_stance: Recommended stance ID (optional, None if no match found)confidence: Match confidence score (0.0-1.0)task_analyzed: The task description that was analyzed
JSON Example:
{
"recommendedStance": "brainstorming",
"confidence": 0.85,
"taskAnalyzed": "Let's brainstorm some character ideas"
}Validation Error