baconnier commited on
Commit
410893b
·
verified ·
1 Parent(s): d7e3547

Update models.py

Browse files
Files changed (1) hide show
  1. models.py +56 -36
models.py CHANGED
@@ -1,37 +1,57 @@
1
  from typing import List, Optional
2
- from pydantic import BaseModel
3
-
4
- class Location(BaseModel):
5
- latitude: float
6
- longitude: float
7
- place_name: str
8
- historical_significance: str
9
-
10
- class ArtPeriod(BaseModel):
11
- name: str
12
- start_year: int
13
- end_year: int
14
- key_characteristics: List[str]
15
-
16
- class Artist(BaseModel):
17
- name: str
18
- birth_year: Optional[int]
19
- death_year: Optional[int]
20
- nationality: str
21
- primary_medium: List[str]
22
-
23
- class Artwork(BaseModel):
24
- title: str
25
- year: Optional[int]
26
- medium: str
27
- current_location: Optional[Location]
28
- significance: str
29
-
30
- class ArtHistoryResponse(BaseModel):
31
- time_period: ArtPeriod
32
- locations: List[Location]
33
- key_artists: List[Artist]
34
- notable_works: List[Artwork]
35
- cultural_context: str
36
- historical_events: List[str]
37
- influence_on_later_periods: str
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  from typing import List, Optional
2
+ from pydantic import BaseModel, Field, conint, confloat
3
+
4
+ class PotentialValue(BaseModel):
5
+ value: str = Field(..., description="The specific value within the axis")
6
+ relevance_score: confloat(ge=0, le=100) = Field(..., description="Relevance score from 0-100")
7
+ contextual_rationale: str = Field(..., description="Explanation of the value's relevance")
8
+
9
+ class InnovativeValue(BaseModel):
10
+ value: str = Field(..., description="The innovative value within the emergent axis")
11
+ innovation_score: confloat(ge=0, le=100) = Field(..., description="Innovation score from 0-100")
12
+ discovery_potential: str = Field(..., description="Description of potential discoveries")
13
+
14
+ class StandardAxis(BaseModel):
15
+ name: str = Field(..., description="Name of the standard axis")
16
+ current_values: List[str] = Field(default_factory=list, description="Currently selected values")
17
+ potential_values: List[PotentialValue] = Field(..., description="Potential values for exploration")
18
+ axis_constraints: List[str] = Field(..., description="Constraints for this axis")
19
+
20
+ class EmergentAxis(BaseModel):
21
+ name: str = Field(..., description="Name of the emergent axis")
22
+ parent_axis: str = Field(..., description="Parent axis from which this emerged")
23
+ innovative_values: List[InnovativeValue] = Field(..., description="Innovative values for exploration")
24
+
25
+ class ZoomTrajectory(BaseModel):
26
+ target_axis: str = Field(..., description="Target axis for zooming")
27
+ zoom_value: str = Field(..., description="Specific value to zoom into")
28
+ unlocked_dimensions: List[str] = Field(..., description="New dimensions unlocked by zooming")
29
+ depth_increment: conint(ge=1, le=3) = Field(..., description="Depth increase (1-3)")
30
+
31
+ class DezoomPathway(BaseModel):
32
+ removal_tuple: dict = Field(..., description="Axis-value pair to remove")
33
+ contextual_expansion: str = Field(..., description="Description of broader context")
34
+ new_possibility_vectors: List[str] = Field(..., description="New possibilities unlocked")
35
+
36
+ class ExplorationSummary(BaseModel):
37
+ current_context: str = Field(..., description="Current exploration context")
38
+ complexity_level: conint(ge=0, le=10) = Field(..., description="Complexity level (0-10)")
39
+
40
+ class KnowledgeAxes(BaseModel):
41
+ standard_axes: List[StandardAxis] = Field(..., description="Standard exploration axes")
42
+ emergent_axes: List[EmergentAxis] = Field(default_factory=list, description="Emergent exploration axes")
43
+
44
+ class NavigationStrategies(BaseModel):
45
+ zoom_trajectories: List[ZoomTrajectory] = Field(..., description="Paths for deeper exploration")
46
+ dezoom_pathways: List[DezoomPathway] = Field(..., description="Paths for broader exploration")
47
+
48
+ class MetaInsights(BaseModel):
49
+ exploration_efficiency: confloat(ge=0, le=100) = Field(..., description="Overall efficiency score")
50
+ knowledge_gap_indicators: List[str] = Field(..., description="Identified knowledge gaps")
51
+ recommended_next_steps: List[str] = Field(..., description="Recommended next steps")
52
+
53
+ class ExplorationResponse(BaseModel):
54
+ exploration_summary: ExplorationSummary = Field(..., description="Summary of exploration state")
55
+ knowledge_axes: KnowledgeAxes = Field(..., description="Exploration axes")
56
+ navigation_strategies: NavigationStrategies = Field(..., description="Navigation options")
57
+ meta_insights: MetaInsights = Field(..., description="Meta-level insights")