subashpoudel commited on
Commit
2e76031
·
1 Parent(s): 53fa005

Added pydantic validator to update the state

Browse files
business_interaction_agent/utils/state.py CHANGED
@@ -1,6 +1,18 @@
1
- from pydantic import BaseModel, ConfigDict
2
  from typing import Optional
3
 
4
  class State(BaseModel):
5
  interactions: Optional[list] = []
6
- model_config = ConfigDict(arbitrary_types_allowed=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic import BaseModel, ConfigDict , Field
2
  from typing import Optional
3
 
4
  class State(BaseModel):
5
  interactions: Optional[list] = []
6
+ business_details : Optional[dict] = {}
7
+ model_config = ConfigDict(arbitrary_types_allowed=True)
8
+
9
+ class StateUpdateFormatter(BaseModel):
10
+ business_type: dict = Field(description="The type of the business. If updated, the new one.")
11
+ platform: str = Field(description="The platform used for the business. If updated, the new one.")
12
+ target_audience: str = Field(description="The target audience of the business. If updated, the new one.")
13
+ business_goals: str = Field(description="The business goals of the business. If updated, the new one.")
14
+ offerings: str = Field(description="The offerings of the business. If updated, the new one.")
15
+ Challenges_faced: str = Field(description="The challenges faced by the business. If updated, the new one.")
16
+
17
+
18
+