Description
There's a bunch of .NET reflection-originating chars in a tool name when it's created from a local function. It would be nice to to additional cleanup to get cleaner tool name by default.
Reproduction Steps
[Fact]
public void DefaultToolName()
{
static void DoSomething() { }
var tool = AIFunctionFactory.Create(DoSomething);
// renders _DefaultToolName_g__DoSomething_4_0
Assert.Equal("DefaultToolName_DoSomething", tool.Name);
}
Expected behavior
Since there can't be two members with the same name (neither at the method as well as the local function level), the name could just be DefaultToolName_DoSomething.
Actual behavior
Returns _DefaultToolName_g__DoSomething_4_0
Regression?
No response
Known Workarounds
Set name explicitly
Configuration
net10 preview 6, MEAI 9.7.0
Other information
No response
Description
There's a bunch of .NET reflection-originating chars in a tool name when it's created from a local function. It would be nice to to additional cleanup to get cleaner tool name by default.
Reproduction Steps
Expected behavior
Since there can't be two members with the same name (neither at the method as well as the local function level), the name could just be
DefaultToolName_DoSomething.Actual behavior
Returns
_DefaultToolName_g__DoSomething_4_0Regression?
No response
Known Workarounds
Set name explicitly
Configuration
net10 preview 6, MEAI 9.7.0
Other information
No response