ontocast.api.process_helpers¶
Shared helpers for local batch processing and HTTP response assembly.
calculate_recursion_limit(head_chunks, server_config, *, max_visits_per_node=None)
¶
Calculate the recursion limit based on max visits and head chunks.
Source code in ontocast/api/process_helpers.py
expand_input_to_states(file_path, *, config, head_chunks, ontology_context_mode_value, tenant, project, target_sections=None, summarize_sections=None, summary_max_sentences=5, document_type_hint=None, section_schema_id=None)
¶
Expand a local input file into one AgentState per logical record.
Source code in ontocast/api/process_helpers.py
flush_triple_configured_scope(tools)
async
¶
Match POST /flush without tenant/project: triple store only, current scope.
get_supported_input_extensions(tools)
¶
Return all input file suffixes handled by document conversion.
Source code in ontocast/api/process_helpers.py
persist_unit_pipeline_outputs(state, onto_result, facts_result, tools)
async
¶
Serialize unit-pipeline outputs using the standard document serializer.
Source code in ontocast/api/process_helpers.py
select_unit_facts_ontology_graph(onto_result, facts_result)
¶
Return ontology graph for facts post-processing in unit pipeline flows.
Source code in ontocast/api/process_helpers.py
turtle_from_graph(graph, *, strip_provenance)
¶
Serialize graph to Turtle, optionally stripping reification/provenance.