Spaces:
Sleeping
Sleeping
| from pydantic import BaseModel, Field | |
| from typing import Optional | |
| import operator | |
| from typing import Annotated | |
| class State(BaseModel): | |
| topic: Annotated[list[str], operator.add] | |
| business_details : Annotated[list[dict],operator.add] = [] | |
| ideator_response: Annotated[list[str],operator.add] = [] | |
| critic_response: Annotated[list[str],operator.add] = [] | |
| critic_fault: Annotated[list[str],operator.add] = [] | |
| improver_response: Annotated[list[str],operator.add] = [] | |
| validator1_response: Annotated[list[str],operator.add] = [] | |
| validator2_response: Annotated[list[str],operator.add] = [] | |
| validator3_response: Annotated[list[str],operator.add] = [] | |
| validator4_response: Annotated[list[str],operator.add] = [] | |
| disagreement_reason: Annotated[list[str],operator.add] = [] | |
| class QueryFormatter(BaseModel): | |
| video_topic: str = Field(description="The video topic that user passes to the agent") | |
| class ImproverResponseFormatter(BaseModel): | |
| faults: str= Field(description="Returns the faults of the critic's response if any.") | |
| improved_idea1: str = Field(description="Returns the first improved idea of exactly 40 words. If no faults found, repeat the critic's version.") | |
| improved_idea2: str = Field(description="Returns the second improved idea of exactly 40 words. If no faults found, repeat the critic's version.") | |
| improved_idea3: str = Field(description="Returns the third improved idea of exactly 40 words. If no faults found, repeat the critic's version.") | |
| improved_idea4: str = Field(description="Returns the fourth improved idea of exactly 40 words. If no faults found, repeat the critic's version.") | |
| class ValidationFormatter(BaseModel): | |
| result: str = Field(description="Returns **validated** if the story is validated. Returns **not validated** if story is not validated.") | |
| reason: str = Field(description="Returns the reason why the story is validated or not validated.") |