4 writes to Name
Microsoft.Extensions.AI.Abstractions (1)
Functions\AIFunctionMetadata.cs (1)
53Name = Throw.IfNull(metadata).Name;
Microsoft.Extensions.AI.Abstractions.Tests (3)
Functions\AIFunctionMetadataTests.cs (1)
60Assert.Throws<ArgumentNullException>("value", () => new AIFunctionMetadata("name") { Name = null! });
Functions\AIFunctionParameterMetadataTests.cs (2)
88Assert.Throws<ArgumentNullException>("value", () => new AIFunctionMetadata("name") { Name = null! }); 89Assert.Throws<ArgumentException>("value", () => new AIFunctionMetadata("name") { Name = "\r\n\t " });
28 references to Name
Microsoft.Extensions.AI (8)
ChatCompletion\FunctionInvokingChatClient.cs (8)
523AIFunction? function = options.Tools!.OfType<AIFunction>().FirstOrDefault(t => t.Metadata.Name == functionCallContent.Name); 629using Activity? activity = _activitySource?.StartActivity(context.Function.Metadata.Name); 637LogInvokingSensitive(context.Function.Metadata.Name, LoggingHelpers.AsJson(context.CallContent.Arguments, context.Function.Metadata.JsonSerializerOptions)); 641LogInvoking(context.Function.Metadata.Name); 660LogInvocationCanceled(context.Function.Metadata.Name); 664LogInvocationFailed(context.Function.Metadata.Name, e); 677LogInvocationCompletedSensitive(context.Function.Metadata.Name, elapsed, LoggingHelpers.AsJson(result, context.Function.Metadata.JsonSerializerOptions)); 681LogInvocationCompleted(context.Function.Metadata.Name, elapsed);
Microsoft.Extensions.AI.Abstractions (4)
Functions\AIFunction.cs (3)
33public override string ToString() => Metadata.Name; 47Metadata.Name : 48$"{Metadata.Name} ({Metadata.Description})";
Functions\AIFunctionMetadata.cs (1)
53Name = Throw.IfNull(metadata).Name;
Microsoft.Extensions.AI.Abstractions.Tests (3)
Functions\AIFunctionMetadataTests.cs (3)
24Assert.Equal("name", f.Name); 50Assert.Equal(f1.Name, f2.Name);
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
400return new(new FunctionDefinition(aiFunction.Metadata.Name)
Microsoft.Extensions.AI.Integration.Tests (2)
ChatClientIntegrationTests.cs (1)
297ToolMode = ChatToolMode.RequireSpecific(shieldsUpTool.Metadata.Name),
PromptBasedFunctionCallingChatClient.cs (1)
182Name = tool.Metadata.Name,
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
439Name = function.Metadata.Name,
Microsoft.Extensions.AI.OpenAI (3)
OpenAIChatClient.cs (1)
519return ChatTool.CreateFunctionTool(aiFunction.Metadata.Name, aiFunction.Metadata.Description, resultParameters, strict);
OpenAIRealtimeExtensions.cs (2)
44Name = aiFunction.Metadata.Name, 115&& tools.FirstOrDefault(t => t.Metadata.Name == update.FunctionName) is AIFunction aiFunction)
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
358new(ChatRole.Assistant, [new FunctionCallContent("callId1", func1.Metadata.Name)]), 359new(ChatRole.Assistant, [new FunctionCallContent("callId2", func2.Metadata.Name)]),
Functions\AIFunctionFactoryTest.cs (4)
136Assert.Contains("Metadata_DerivedFromLambda", func.Metadata.Name); 142Assert.Contains("Metadata_DerivedFromLambda", func.Metadata.Name); 148Assert.Contains("Metadata_DerivedFromLambda", func.Metadata.Name); 179Assert.Equal("test name", func.Metadata.Name);