Spaces:
Sleeping
Sleeping
Update models.py
Browse files
models.py
CHANGED
@@ -1,37 +1,57 @@
|
|
1 |
from typing import List, Optional
|
2 |
-
from pydantic import BaseModel
|
3 |
-
|
4 |
-
class
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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")
|