Constructor SingleFunctionCall
- Namespace
- LMKit.FunctionCalling
- Assembly
- LM-Kit.NET.dll
SingleFunctionCall(LM)
Initializes a new instance of the SingleFunctionCall class with the specified language model.
public SingleFunctionCall(LM model)
Parameters
Examples
using LMKit.Model;
using LMKit.FunctionCalling;
using System;
// Load a language model
LM model = LM.LoadFromModelID("llama-3.2-1b");
// Create the function caller
using var functionCall = new SingleFunctionCall(model);
// Import functions and start using
functionCall.ImportFunctions<MyFunctions>();
var result = functionCall.Submit("Call my function with value 42");
Exceptions
- ArgumentNullException
Thrown when the provided model is null.
- InvalidModelException
Thrown when:
- The model is an embedding model.
- The model has been loaded without weights.