Spaces:
Runtime error
Runtime error
File size: 812 Bytes
aa9134d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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
)
|