Spaces:
Sleeping
Sleeping
Update models.py
Browse files
models.py
CHANGED
|
@@ -2,55 +2,66 @@ 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")
|
|
|
|
| 2 |
from pydantic import BaseModel, Field, conint, confloat
|
| 3 |
|
| 4 |
class PotentialValue(BaseModel):
|
| 5 |
+
"""A potential value within an exploration axis"""
|
| 6 |
value: str = Field(..., description="The specific value within the axis")
|
| 7 |
relevance_score: confloat(ge=0, le=100) = Field(..., description="Relevance score from 0-100")
|
| 8 |
contextual_rationale: str = Field(..., description="Explanation of the value's relevance")
|
| 9 |
|
| 10 |
class InnovativeValue(BaseModel):
|
| 11 |
+
"""An innovative value within an emergent axis"""
|
| 12 |
value: str = Field(..., description="The innovative value within the emergent axis")
|
| 13 |
innovation_score: confloat(ge=0, le=100) = Field(..., description="Innovation score from 0-100")
|
| 14 |
discovery_potential: str = Field(..., description="Description of potential discoveries")
|
| 15 |
|
| 16 |
class StandardAxis(BaseModel):
|
| 17 |
+
"""A standard exploration axis"""
|
| 18 |
name: str = Field(..., description="Name of the standard axis")
|
| 19 |
current_values: List[str] = Field(default_factory=list, description="Currently selected values")
|
| 20 |
potential_values: List[PotentialValue] = Field(..., description="Potential values for exploration")
|
| 21 |
axis_constraints: List[str] = Field(..., description="Constraints for this axis")
|
| 22 |
|
| 23 |
class EmergentAxis(BaseModel):
|
| 24 |
+
"""An emergent exploration axis"""
|
| 25 |
name: str = Field(..., description="Name of the emergent axis")
|
| 26 |
parent_axis: str = Field(..., description="Parent axis from which this emerged")
|
| 27 |
innovative_values: List[InnovativeValue] = Field(..., description="Innovative values for exploration")
|
| 28 |
|
| 29 |
class ZoomTrajectory(BaseModel):
|
| 30 |
+
"""A trajectory for zooming into specific aspects"""
|
| 31 |
target_axis: str = Field(..., description="Target axis for zooming")
|
| 32 |
zoom_value: str = Field(..., description="Specific value to zoom into")
|
| 33 |
unlocked_dimensions: List[str] = Field(..., description="New dimensions unlocked by zooming")
|
| 34 |
depth_increment: conint(ge=1, le=3) = Field(..., description="Depth increase (1-3)")
|
| 35 |
|
| 36 |
class DezoomPathway(BaseModel):
|
| 37 |
+
"""A pathway for zooming out to broader context"""
|
| 38 |
removal_tuple: dict = Field(..., description="Axis-value pair to remove")
|
| 39 |
contextual_expansion: str = Field(..., description="Description of broader context")
|
| 40 |
new_possibility_vectors: List[str] = Field(..., description="New possibilities unlocked")
|
| 41 |
|
| 42 |
class ExplorationSummary(BaseModel):
|
| 43 |
+
"""Summary of the current exploration state"""
|
| 44 |
current_context: str = Field(..., description="Current exploration context")
|
| 45 |
complexity_level: conint(ge=0, le=10) = Field(..., description="Complexity level (0-10)")
|
| 46 |
|
| 47 |
class KnowledgeAxes(BaseModel):
|
| 48 |
+
"""Collection of exploration axes"""
|
| 49 |
standard_axes: List[StandardAxis] = Field(..., description="Standard exploration axes")
|
| 50 |
emergent_axes: List[EmergentAxis] = Field(default_factory=list, description="Emergent exploration axes")
|
| 51 |
|
| 52 |
class NavigationStrategies(BaseModel):
|
| 53 |
+
"""Available navigation strategies"""
|
| 54 |
zoom_trajectories: List[ZoomTrajectory] = Field(..., description="Paths for deeper exploration")
|
| 55 |
dezoom_pathways: List[DezoomPathway] = Field(..., description="Paths for broader exploration")
|
| 56 |
|
| 57 |
class MetaInsights(BaseModel):
|
| 58 |
+
"""Meta-level insights about the exploration"""
|
| 59 |
exploration_efficiency: confloat(ge=0, le=100) = Field(..., description="Overall efficiency score")
|
| 60 |
knowledge_gap_indicators: List[str] = Field(..., description="Identified knowledge gaps")
|
| 61 |
recommended_next_steps: List[str] = Field(..., description="Recommended next steps")
|
| 62 |
|
| 63 |
class ExplorationResponse(BaseModel):
|
| 64 |
+
"""Complete exploration response structure"""
|
| 65 |
exploration_summary: ExplorationSummary = Field(..., description="Summary of exploration state")
|
| 66 |
knowledge_axes: KnowledgeAxes = Field(..., description="Exploration axes")
|
| 67 |
navigation_strategies: NavigationStrategies = Field(..., description="Navigation options")
|