create or replace package PKG_26AI_TRAFFIC_LOAD
as
/*

  Criado por: fernando.leal@oracle.com
  Data: Abril/2026
  Objetivo: Identificar informacoes de imagens como placas, modelo do veiculo e infracoes (uso de celular) 

  v1 - Traffic Load - leal

*/

    --
    -- chamada a API do Vision. Definir modo de extracao com  p_feature_type
    --
    function fnc_26ai_traffic_vision( p_base64_image in clob,
                                      p_feature_type in varchar2 , 
                                      p_comp_id in varchar2)
    return clob; 

    --
    -- funcao de rag para extracao de informacoes da imagem
    --
    function fnc_26ai_traffic_rag (p_base64_image IN clob, 
                                   p_oci_cred IN VARCHAR2,
                                   p_comp_id in varchar2) 
    return clob; 

   PROCEDURE  prc_refresh_files(p_oci_cred  IN VARCHAR2 default 'OCI_CRED',
                                p_bucket in varchar2 default null,
                                p_mimetype in varchar2 default 'PNG',
                                p_embedding_name  in varchar2 default 'COHERE');
									 
   PROCEDURE  prc_reserve_files (
	  p_limit     IN NUMBER,	                           
      p_worker_id IN VARCHAR2,
      p_oci_cred  IN VARCHAR2 default 'OCI_CRED',
      p_bucket in varchar2 ,
      p_docs  OUT SYS.ODCIVARCHAR2LIST,
      p_mimetype in varchar2 default 'PNG',
      p_embedding_name  in varchar2 default 'COHERE'	) ;
	  
	PROCEDURE proc_process_files(p_limit in number default 10,
	                           p_worker_id in number,
							   p_stop_process_list in varchar2 default 'N',
                               p_mimetype in varchar2 default 'PNG',
                               p_embedding_name  in varchar2 default 'COHERE');

	PROCEDURE proc_remove_jobs;

	PROCEDURE proc_add_jobs(p_limit in number, 
                            p_total_jobs in number,
                            p_mimetype in varchar2 default 'PNG',
                            p_embedding_name  in varchar2 default 'COHERE');

end;
/