Skip to content

adm_ai_settings_api

This document contains the API documentation for the adm_ai_settings_api package.

How many times a queued RAG job, or a file’s built-in text extraction, is attempted before it is written off. A transient failure - an embedding endpoint that was down for a minute - is retried on the next run of ADM_AI_RAG_QUEUE_JOB; a file that fails identically every time stops consuming the run’s budget once it reaches this number. The counterpart of INDEXING_MAX_ATTEMPTS in the base product. Defaults to 3.

Signature:

function get_job_max_attempts return number result_cache;

Returns: number result_cache


How many files or jobs one batch of ADM_AI_RAG_QUEUE_JOB processes. This is also the commit unit: the job commits after each batch, so a failure late in a run cannot discard the work earlier batches did. Defaults to 10.

Signature:

function get_job_batch_size return number result_cache;

Returns: number result_cache


Wall-clock budget in seconds for one run of ADM_AI_RAG_QUEUE_JOB. The job stops starting new batches once it is used up, which is what keeps a run from overlapping the next one - a file count is a poor proxy for how long the work takes, because one file can be a 500-page PDF and the next 2 KB of text. Defaults to 240, comfortably inside the job’s five-minute interval.

Signature:

function get_job_max_seconds return number result_cache;

Returns: number result_cache


Whether file text content is automatically extracted into adm_document_versions.index_content so RAG collections and AI agent tools can read object storage files. Defaults to enabled when the setting row is missing.

Signature:

function is_text_extraction_enabled return boolean result_cache;

Returns: boolean result_cache


The uc_ai provider the bundled agents run on, e.g. ‘openai’, ‘anthropic’, ‘ollama’. Null means the shipped prompt profiles are configured by hand and adm_ai_agent_profile_api leaves them alone.

Signature:

function get_agent_provider return varchar2 result_cache;

Returns: varchar2 result_cache


The model the bundled agents run on, e.g. ‘gpt-5.4’. Required as soon as AI_AGENT_PROVIDER is set.

Signature:

function get_agent_model return varchar2 result_cache;

Returns: varchar2 result_cache


Static id of the APEX Web Credential holding the provider’s API key. Null for providers that need none (a local Ollama). Not result_cache: the underlying setting is admin only, see adm_settings_api.get_setting_value.

Signature:

function get_agent_web_credential_id return varchar2;

Returns: varchar2


How much the model may reason: NONE, LOW, MEDIUM or HIGH. NONE turns reasoning off entirely, which is what a model without reasoning support needs.

Signature:

function get_agent_reasoning_level return varchar2 result_cache;

Returns: varchar2 result_cache


Optional JSON object shallow-merged over the model config that adm_ai_agent_profile_api writes, for everything the four settings above do not cover: g_base_url for a self-hosted endpoint, or a provider section such as {“anthropic”:{“g_max_tokens”:8192}}. Null when unused.

Signature:

function get_agent_model_config return varchar2 result_cache;

Returns: varchar2 result_cache