Create default model general parameters
Return Value
xlm_common_params_t structure data with default parameter.Initialize the instance.
Parameters
[in]: param, general parameters of the model generated during initialization.
[in]: callback, the callback function pointer for registering a task, i.e., the execution entity of the task.
[out]: llm_handle, the inference handle, which is used for the management of subsequent tasks.
Return Value
0 (Initialization successful), -1 (Initialization failed).Provides audio input to the model.
Parameters:
handle, inference handle obtained via the xlm_init interface.audio_input, audio input, containing the pointer to the data and its length.Return Value:
0 (Audio data transmitted successful), -1 (Data transmission failed; the task is terminated).Synchronous inference, starting the inference includes a complete prefill and decode process.
Parameters
[in]: handle, the inference handle obtained through the xlm_init interface.
[in]: input, the model inference input, including data such as prompt, image, and task priority.
[in]: userdata, user-defined data, which is returned through the callback function along with the inference result.
Return Value
0 (Inference task executed successfully), -1 (Failed to obtain the inference handle, task returned).Asynchronous inference, starting the inference includes a complete prefill and decode process.
Parameters
[in]: handle, the inference handle obtained through the xlm_init interface.
[in]: input, the model inference input, including data such as prompt, image, and task priority.
[in]: userdata, user-defined data, which is returned through the callback function along with the inference result.
Return Value
0 (Inference task executed successfully), -1 (Failed to obtain the inference handle, task returned).Release the inference instance resources.
Parameters
handle, the inference handle obtained through the xlm_init interface.Return Value
0 (Task destroyed successfully), -1 (Failed to obtain the inference handle, interface returned).