Spaces:
Runtime error
Runtime error
| from model import model | |
| from agents import Agent | |
| from pydantic import BaseModel, Field | |
| instructions = ( | |
| "Your role is to evaluate the research plan based on the user's query. " | |
| "If the existing plan is incomplete, unclear, or insufficient, " | |
| "You return is_valid a bool values, 'True' if accepted, 'False' if not" | |
| "Provide proper feedback and suggestion why it was not a valid plan" | |
| ) | |
| class ValidPlan(BaseModel): | |
| is_valid: bool = Field(..., description="Whether the plan is valid. Return True if valid, False otherwise.") | |
| feedback: str = Field("", description="If invalid, describe why the plan is insufficient and suggest improvements.") | |
| refiner_agent = Agent( | |
| name='refiner_agent', | |
| instructions=instructions, | |
| model=model, | |
| output_type=ValidPlan | |
| ) | |