Method SubmitAsync
- Namespace
- LMKit.FunctionCalling
- Assembly
- LM-Kit.NET.dll
SubmitAsync(string, CancellationToken)
Asynchronously submits a natural language prompt and returns the result of the function invocation.
public Task<FunctionCallResult> SubmitAsync(string prompt, CancellationToken cancellationToken = default)
Parameters
prompt
stringThe natural language prompt provided by the user.
cancellationToken
CancellationTokenA token to monitor for cancellation requests.
Returns
- Task<FunctionCallResult>
A FunctionCallResult containing the result of the invoked function.
Exceptions
- ArgumentNullException
Thrown when the provided
prompt
argument is null or empty.- OperationCanceledException
Thrown when the operation is cancelled based on the CancellationToken.