subashpoudel commited on
Commit
50af289
·
1 Parent(s): 1dcb22b

added pydantic classes to validators

Browse files
Files changed (1) hide show
  1. my_agent/utils/validators.py +22 -0
my_agent/utils/validators.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from pydantic import BaseModel, ConfigDict, Field
2
+
3
+
4
+ # Pydantic model for extracted business info
5
+ class DetailsFormatter(BaseModel):
6
+ business_type: str = Field(description="The type of the business")
7
+ platform: str = Field(description="The platform used for the business")
8
+ target_audience: str = Field(description="The target audience of the business")
9
+ business_goals: str = Field(description="The business goals of the business")
10
+ offerings: str = Field(description="The offerings of the business")
11
+ Challenges_faced: str = Field(description="The challenges faced by the business")
12
+
13
+
14
+ class BrainstromTopicFormatter(BaseModel):
15
+ topic1:str=Field(description="First brainstorming topic of the story")
16
+ topic2:str=Field(description="Second brainstorming topic of the story")
17
+ topic3:str=Field(description="Third brainstorming topic of the story")
18
+ topic4:str=Field(description="Fourth brainstorming topic of the story")
19
+
20
+ class QueryFormatter(BaseModel):
21
+ messages:str = Field(description="The user query")
22
+ business_details: dict = Field(description="The details of the business of that user.")