ontocast.api.parse¶
Shared HTTP query/body parsing for API server routes.
parse_document_type_hint_param(value)
¶
Parse optional document_type_hint; empty strings become None.
parse_llm_graph_format_param(value, default)
¶
Parse optional llm_graph_format override from request params.
Source code in ontocast/api/parse.py
parse_max_visits_param(value, default)
¶
Parse optional max_visits override from query/form/json metadata.
Source code in ontocast/api/parse.py
parse_section_schema_id_param(value)
¶
Parse optional section_schema_id; empty strings become None.
parse_sections_list_param(value)
¶
Parse a section list from comma-separated text or JSON array.
Source code in ontocast/api/parse.py
parse_strip_provenance_param(value)
¶
Parse strip_provenance query/form value.
Source code in ontocast/api/parse.py
parse_summary_max_sentences_param(value, default)
¶
Parse optional summary_max_sentences (positive integer).
Source code in ontocast/api/parse.py
resolve_ontology_context_mode(requested_mode, fixed_ontology_id)
¶
Resolve effective ontology context mode for a request.
A non-empty ontology_context_fixed_ontology_id forces fixed catalog mode.
This allows clients to pick fixed ontology context per request even when the
server default mode differs.