Spaces:
Running
Running
File size: 4,871 Bytes
026ee5d d9162ac 026ee5d d45d242 026ee5d d9162ac 026ee5d d45d242 026ee5d d45d242 026ee5d d9162ac 026ee5d d9162ac 026ee5d d9162ac 026ee5d d45d242 026ee5d d9162ac 026ee5d d9162ac 026ee5d d45d242 026ee5d d9162ac 026ee5d d9162ac 026ee5d d45d242 026ee5d d9162ac 026ee5d d45d242 026ee5d d9162ac 026ee5d d9162ac 026ee5d d45d242 026ee5d |
1 2 3 4 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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# Models API Reference
This page documents the Pydantic models used throughout DeepCritical.
## Evidence
**Module**: `src.utils.models`
**Purpose**: Represents evidence from search results.
<!--codeinclude-->
[Evidence Model](../src/utils/models.py) start_line:33 end_line:44
<!--/codeinclude-->
**Fields**:
- `citation`: Citation information (title, URL, date, authors)
- `content`: Evidence text content
- `relevance`: Relevance score (0.0-1.0)
- `metadata`: Additional metadata dictionary
## Citation
**Module**: `src.utils.models`
**Purpose**: Citation information for evidence.
<!--codeinclude-->
[Citation Model](../src/utils/models.py) start_line:12 end_line:30
<!--/codeinclude-->
**Fields**:
- `source`: Source name (e.g., "pubmed", "clinicaltrials", "europepmc", "web", "rag")
- `title`: Article/trial title
- `url`: Source URL
- `date`: Publication date (YYYY-MM-DD or "Unknown")
- `authors`: List of authors (optional)
## KnowledgeGapOutput
**Module**: `src.utils.models`
**Purpose**: Output from knowledge gap evaluation.
<!--codeinclude-->
[KnowledgeGapOutput Model](../src/utils/models.py) start_line:494 end_line:504
<!--/codeinclude-->
**Fields**:
- `research_complete`: Boolean indicating if research is complete
- `outstanding_gaps`: List of remaining knowledge gaps
## AgentSelectionPlan
**Module**: `src.utils.models`
**Purpose**: Plan for tool/agent selection.
<!--codeinclude-->
[AgentSelectionPlan Model](../src/utils/models.py) start_line:521 end_line:526
<!--/codeinclude-->
**Fields**:
- `tasks`: List of agent tasks to execute
## AgentTask
**Module**: `src.utils.models`
**Purpose**: Individual agent task.
<!--codeinclude-->
[AgentTask Model](../src/utils/models.py) start_line:507 end_line:518
<!--/codeinclude-->
**Fields**:
- `gap`: The knowledge gap being addressed (optional)
- `agent`: Name of agent to use
- `query`: The specific query for the agent
- `entity_website`: The website of the entity being researched, if known (optional)
## ReportDraft
**Module**: `src.utils.models`
**Purpose**: Draft structure for long-form reports.
<!--codeinclude-->
[ReportDraft Model](../src/utils/models.py) start_line:538 end_line:545
<!--/codeinclude-->
**Fields**:
- `sections`: List of report sections
## ReportSection
**Module**: `src.utils.models`
**Purpose**: Individual section in a report draft.
<!--codeinclude-->
[ReportDraftSection Model](../src/utils/models.py) start_line:529 end_line:535
<!--/codeinclude-->
**Fields**:
- `section_title`: The title of the section
- `section_content`: The content of the section
## ParsedQuery
**Module**: `src.utils.models`
**Purpose**: Parsed and improved query.
<!--codeinclude-->
[ParsedQuery Model](../src/utils/models.py) start_line:557 end_line:572
<!--/codeinclude-->
**Fields**:
- `original_query`: Original query string
- `improved_query`: Refined query string
- `research_mode`: Research mode ("iterative" or "deep")
- `key_entities`: List of key entities
- `research_questions`: List of research questions
## Conversation
**Module**: `src.utils.models`
**Purpose**: Conversation history with iterations.
<!--codeinclude-->
[Conversation Model](../src/utils/models.py) start_line:331 end_line:337
<!--/codeinclude-->
**Fields**:
- `history`: List of iteration data
## IterationData
**Module**: `src.utils.models`
**Purpose**: Data for a single iteration.
<!--codeinclude-->
[IterationData Model](../src/utils/models.py) start_line:315 end_line:328
<!--/codeinclude-->
**Fields**:
- `gap`: The gap addressed in the iteration
- `tool_calls`: The tool calls made
- `findings`: The findings collected from tool calls
- `thought`: The thinking done to reflect on the success of the iteration and next steps
## AgentEvent
**Module**: `src.utils.models`
**Purpose**: Event emitted during research execution.
<!--codeinclude-->
[AgentEvent Model](../src/utils/models.py) start_line:104 end_line:125
<!--/codeinclude-->
**Fields**:
- `type`: Event type (e.g., "started", "search_complete", "complete")
- `iteration`: Iteration number (optional)
- `data`: Event data dictionary
## BudgetStatus
**Module**: `src.utils.models`
**Purpose**: Current budget status.
<!--codeinclude-->
[BudgetStatus Model](../src/middleware/budget_tracker.py) start_line:15 end_line:25
<!--/codeinclude-->
**Fields**:
- `tokens_used`: Total tokens used
- `tokens_limit`: Token budget limit
- `time_elapsed_seconds`: Time elapsed in seconds
- `time_limit_seconds`: Time budget limit (default: 600.0 seconds / 10 minutes)
- `iterations`: Number of iterations completed
- `iterations_limit`: Maximum iterations (default: 10)
- `iteration_tokens`: Tokens used per iteration (iteration number -> token count)
## See Also
- [Architecture - Agents](../architecture/agents.md) - How models are used
- [Configuration](../configuration/index.md) - Model configuration
|