Spaces:
Sleeping
Sleeping
| from pydantic import BaseModel, Field | |
| from typing import Optional , List | |
| import operator | |
| from typing import Annotated | |
| class State(BaseModel): | |
| business_details : Annotated[list[dict],operator.add] = [] | |
| scores: Annotated[list[dict],operator.add] = [] | |
| influencers_data : Annotated[list[str],operator.add] = [] | |
| imdb_data : Annotated[list[str],operator.add] = [] | |
| ideator_response: Annotated[list[str],operator.add] = [] | |
| moderator_response: Annotated[list[str],operator.add] = [] | |
| simplifier_response: Annotated[list[str],operator.add] = [] | |
| critic_response: Annotated[list[str],operator.add] = [] | |
| normalizer_response : Annotated[list[dict],operator.add] = [] | |
| judge1_response : Annotated[list[dict],operator.add] = [] | |
| judge2_response : Annotated[list[dict],operator.add] = [] | |
| unique_selected_ideas : Annotated[list[dict],operator.add] = [] | |
| validator_response: Annotated[list[str],operator.add] = [] | |
| disagreement_reason: Annotated[list[str],operator.add] = [] | |
| image_caption: Annotated[list[str],operator.add] = [] | |
| class QueryFormatter(BaseModel): | |
| business_details: str = Field(description="The details of the business 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 idea is validated. Returns **not validated** if story is not validated.") | |
| reason: str = Field(description="If the idea is **not validated**, it returns the reason why it is not validated.") | |
| class CriticResponseFormatter(BaseModel): | |
| faults: str= Field(description="Returns the faults in the critic's response if any.") | |
| improved_idea1: str = Field(description="Returns the first improved idea of exactly 40 words. ") | |
| improved_idea2: str = Field(description="Returns the second improved idea of exactly 40 words. ") | |
| improved_idea3: str = Field(description="Returns the third improved idea of exactly 40 words. ") | |
| improved_idea4: str = Field(description="Returns the fourth improved idea of exactly 40 words. ") | |