File size: 844 Bytes
93a5bf9
 
 
 
 
 
 
 
 
c8c0029
 
 
93a5bf9
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from pydantic import BaseModel, ConfigDict , Field
from typing import Optional

class State(BaseModel):
    interactions: Optional[list] = []
    model_config = ConfigDict(arbitrary_types_allowed=True)

# Pydantic model for extracted business info
class DetailsFormatter(BaseModel):
    '''
    Format the details from the business interaction of User and Assistant
    '''
    business_type: str = Field(description="The type of the business")
    platform: str = Field(description="The platform used for the business")
    target_audience: str = Field(description="The target audience of the business")
    business_goals: str = Field(description="The business goals of the business")
    offerings: str = Field(description="The offerings of the business")
    Challenges_faced: str = Field(description="The challenges faced by the business")