microsoft/onnxruntime-extensions
Publicmirrored fromhttps://github.com/microsoft/onnxruntime-extensionsAvailable
include/ortx_processor.h
27lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | // C ABI header file for the onnxruntime-extensions tokenization module |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include "ortx_utils.h" |
| 9 | |
| 10 | // typedefs to create/dispose function flood, and to make the API more C++ friendly with less casting |
| 11 | typedef OrtxObject OrtxProcessor; |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | |
| 17 | /** \brief Create a processor object with the specified processor definition |
| 18 | * |
| 19 | * \param processor Pointer to store the created processor object |
| 20 | * \param processor_def The processor definition |
| 21 | * \return Error code indicating the success or failure of the operation |
| 22 | */ |
| 23 | extError_t ORTX_API_CALL OrtxCreateProcessor(OrtxProcessor** processor, const char* processor_def); |
| 24 | |
| 25 | #ifdef __cplusplus |
| 26 | } |
| 27 | #endif |
| 28 | |