ontocast.agent.convert_document¶
Document conversion agent for OntoCast.
This module provides functionality for converting various document formats into structured data that can be processed by the OntoCast system.
Attributes¶
logger = logging.getLogger(__name__)
module-attribute
¶
Classes¶
Functions:¶
convert_document(state, tools)
¶
Convert a single raw input payload on the state into a DoclingDocument.
Strict 1-in / 1-out agent node: state.raw_input must contain exactly
one {filename: bytes} entry. Batch fan-out (e.g. JSONL) is the caller's
responsibility and must happen before this node is invoked.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
AgentState
|
The current agent state with a single raw input payload. |
required |
tools
|
ToolBox
|
The toolbox instance providing utility functions. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
AgentState |
AgentState
|
Updated state with |
AgentState
|
|