ontocast.agent.render_ontology¶
Ontology triple rendering agent for OntoCast.
This module provides functionality for rendering RDF triples from ontologies into human-readable formats, making the ontological knowledge more accessible and understandable. The agent decides between generating bare Turtle for fresh ontologies and SPARQL operations for updates.
render_ontology(state, tools)
async
¶
Structured hybrid ontology renderer with Turtle/SPARQL decision logic.
This function decides between generating bare Turtle for fresh ontologies and SPARQL operations for updates based on whether the ontology exists.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
AgentState
|
The current agent state |
required |
tools
|
ToolBox
|
The toolbox containing necessary tools |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AgentState |
AgentState
|
Updated state with rendered ontology |
Source code in ontocast/agent/render_ontology.py
render_ontology_fresh(state, tools)
async
¶
Render ontology triples into a human-readable format.
This function takes the triples from the current ontology and renders them into a more accessible format, making the ontological knowledge easier to understand.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
AgentState
|
The current agent state containing the ontology to render. |
required |
tools
|
ToolBox
|
The toolbox instance providing utility functions. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AgentState |
AgentState
|
Updated state with rendered triples. |
Source code in ontocast/agent/render_ontology.py
render_ontology_update(state, tools)
async
¶
Render ontology triples into a human-readable format.
This function takes the triples from the current ontology and renders them into a more accessible format, making the ontological knowledge easier to understand.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
AgentState
|
The current agent state containing the ontology to render. |
required |
tools
|
ToolBox
|
The toolbox instance providing utility functions. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AgentState |
AgentState
|
Updated state with rendered triples. |
Source code in ontocast/agent/render_ontology.py
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 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 | |