Function rkllm_set_function_tools

Source
pub unsafe extern "C" fn rkllm_set_function_tools(
    handle: LLMHandle,
    system_prompt: *const c_char,
    tools: *const c_char,
    tool_response_str: *const c_char,
) -> c_int
Expand description

@brief Sets the function calling configuration for the LLM, including system prompt, tool definitions, and tool response token.

@param handle LLM handle. @param system_prompt The system prompt that defines the context or behavior of the language model. @param tools A JSON-formatted string that defines the available functions, including their names, descriptions, and parameters. @param tool_response_str A unique tag used to identify function call results within a conversation. It acts as the marker tag, allowing tokenizer to recognize tool outputs separately from normal dialogue turns. @return Status code (0 if the configuration was set successfully, non-zero for errors).