-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Describe the bug
Sometimes the planner gives validation error.
"I encountered an error while processing your request: 1 validation error for PlannerResponse\nphase\n Input should be 'initial_requirements', 'goal_clarification', 'agent_selection', 'io_specification', 'workflow_construction', 'validation' or 'finalization' [type=enum, input_value='INITIAL_REQUIREMENTS', input_type=str]\n For further information visit https://errors.pydantic.dev/2.11/v/enum",
This means the LLM occasionally returns the phase value in uppercase (e.g., "INITIAL_REQUIREMENTS") even though the ConversationPhase enum only accepts the lowercase versions. When this happens, Pydantic raises a validation error.
The problem isn’t constant ,only sometimes the LLM outputs uppercase, which is why the error appears intermittently rather than always.
Steps to reproduce the behavior
Note: Its hard to reproduce this issue
- Go to http://akdbac-apise-ulverh4gaexc-980808868.us-east-1.elb.amazonaws.com/api/v1/docs
- Create a new chat
curl -X 'POST' \
'http://akdbac-apise-ulverh4gaexc-980808868.us-east-1.elb.amazonaws.com/api/v1/chats/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmY5ZGRjOC01OTJjLTRmNzItYWIyYS03YmE5MDIzMTg2YjAiLCJhdWQiOlsiZmFzdGFwaS11c2VyczphdXRoIl0sImV4cCI6MTc2MDA1OTQ4OH0.t1Lj_79FL6rhY6zTTojiVgsLQ-VWinnPeg6mRNXWi8Y' \
-H 'Content-Type: application/json' \
-d '{
"initial_request": "social impacts of covid 19 in nepal"
}'
- To continue back and forth with the planner, send a request with the
chat_idand the response to recent planner message asuser_message:
curl -X 'POST' \
'http://akdbac-apise-ulverh4gaexc-980808868.us-east-1.elb.amazonaws.com/api/v1/chats/' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NmY5ZGRjOC01OTJjLTRmNzItYWIyYS03YmE5MDIzMTg2YjAiLCJhdWQiOlsiZmFzdGFwaS11c2VyczphdXRoIl0sImV4cCI6MTc2MDA1OTQ4OH0.t1Lj_79FL6rhY6zTTojiVgsLQ-VWinnPeg6mRNXWi8Y' \
-H 'Content-Type: application/json' \
-d '{
"initial_request": "social impacts of covid 19 in nepal",
"chat_id": "0477cd2b-3248-457b-8413-b7060add28d4",
"user_message": "mental health"
}'
Expected Behavior
Chat with planner should be smooth and should eventually generate a workflow.
Relevant log output
{
"message": "I will create a workflow to explore the social impacts of COVID-19 in Nepal. To refine this, could you specify if you're looking for academic papers, reports, or specific types of social impacts (e.g., mental health, economic effects)?",
"ready_to_generate": false,
"conversation_history": [
{
"role": "user",
"content": "social impacts of covid 19 in nepal"
},
{
"role": "assistant",
"content": "I will create a workflow to explore the social impacts of COVID-19 in Nepal. To refine this, could you specify if you're looking for academic papers, reports, or specific types of social impacts (e.g., mental health, economic effects)?"
}
],
"workflow_config": null,
"chat_id": "788d9826-962b-488c-b24f-2bbf6c20bd93",
"user_id": "66f9ddc8-592c-4f72-ab2a-7ba9023186b0"
}
Metadata
Metadata
Assignees
Labels
No labels