def load_onnx_model(conn: Connection, dir: str, onnx_file: str, model_name: str):
        """
        Load an ONNX model to Oracle Database.

        Args:
            conn: Oracle Connection,
            dir: Oracle Directory,
            onnx_file: ONNX file name,
            model_name: Name of the model.
            Note: user needs to have create procedure,
                  create mining model, create any directory privilege.

        """
        try:
            if conn is None or dir is None or onnx_file is None or model_name is None:
                raise Exception("Invalid input")

            cursor = conn.cursor()
            cursor.execute(
                """
                begin
                    dbms_data_mining.drop_model(model_name => :model, force => true);
                    SYS.DBMS_VECTOR.load_onnx_model(:path, :filename, :model, json('{"function" : "embedding", "embeddingOutput" : "embedding" , "input": {"input": ["DATA"]}}'));
                end;""",
                path=dir,
                filename=onnx_file,
                model=model_name,
            )

            cursor.close()

        except Exception as ex:
            print(f"An exception occurred :: {ex}")
            cursor.close()
            raise

        Load an ONNX model to Oracle Database.

        Args:
            conn: Oracle Connection,
            dir: Oracle Directory,
            onnx_file: ONNX file name,
            model_name: Name of the model.
            Note: user needs to have create procedure,
                  create mining model, create any directory privilege.

        
llama-index-integrations/embeddings/llama-index-embeddings-oracleai/llama_index/embeddings/oracleai/base.py