Class AiFunctionAttribute
- Namespace
- Mythosia.AI.Attributes
- Assembly
- Mythosia.AI.Abstractions.dll
Marks a method as an AI-callable function
[AttributeUsage(AttributeTargets.Method)]
public class AiFunctionAttribute : Attribute
- Inheritance
-
AiFunctionAttribute
- Inherited Members
Constructors
AiFunctionAttribute()
Creates an AI function with auto-generated name and description
public AiFunctionAttribute()
AiFunctionAttribute(string)
Creates an AI function with auto-generated name
public AiFunctionAttribute(string description)
Parameters
descriptionstring
AiFunctionAttribute(string, string)
Creates an AI function with custom name
public AiFunctionAttribute(string name, string description)
Parameters
Properties
AllowAsync
Allows supporting models and APIs to continue while this function executes. Defaults to false; unsupported providers use the ordinary tool-call flow.
public bool AllowAsync { get; set; }
Property Value
Description
Description of what the function does
public string? Description { get; set; }
Property Value
Name
Optional custom name for the function. If null, method name will be used.
public string? Name { get; set; }