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
promptstringThe natural language prompt provided by the user.
cancellationTokenCancellationTokenA token to monitor for cancellation requests.
Returns
- Task<FunctionCallResult>
A FunctionCallResult containing the result of the invoked function.
Exceptions
- ArgumentNullException
Thrown when the provided
promptargument is null or empty.- OperationCanceledException
Thrown when the operation is cancelled based on the CancellationToken.