1 write to Name
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionCallContent.cs (1)
29Name = Throw.IfNull(name);
104 references to Name
Microsoft.AspNetCore.Components.AI (4)
Blocks\FunctionApprovalBlock.cs (1)
62public string? ToolName => Call?.Name;
Blocks\FunctionInvocationContentBlock.cs (1)
52public string? ToolName => Call?.Name;
Blocks\UIActionBlock.cs (1)
45public string ToolName => Call.Name;
Pipeline\UIActionHandler.cs (1)
28_actions.TryGetValue(call.Name, out var function))
Microsoft.Extensions.AI (23)
ChatCompletion\FunctionInvokingChatClient.cs (11)
1109LogFunctionNotFound(fcc.Name); 1120AIFunctionDeclaration? tool = FindTool(fcc.Name, options?.Tools, AdditionalTools); 1127LogNonInvocableFunction(fcc.Name); 1138LogFunctionNotFound(fcc.Name); 1298FunctionInvocationStatus.NotFound => $"Error: Requested function \"{result.CallContent.Name}\" not found.", 1524LogProcessingApprovalResponse(fcc.Name, approvalResponse.Approved); 1553LogFunctionRejected(m.ResponseFunctionCallContent.Name, m.Response.Reason); 1681if (arf.Name == fcc.Name) 1715if (string.Equals(approvalRequiredFunctions[j].Name, fcc.Name, StringComparison.Ordinal)) 1758if (string.Equals(approvalRequiredFunctions[k].Name, functionCall.Name, StringComparison.Ordinal)) 1789LogFunctionRequiresApproval(functionCall.Name);
ChatCompletion\ImageGeneratingChatClient.cs (2)
329_toolNames.Contains(functionCall.Name)) 334if (functionCall.Name != nameof(GetImagesForEdit))
Common\FunctionInvocationProcessor.cs (4)
116AITool? tool = findTool(callContent.Name); 119FunctionInvocationLogger.LogFunctionNotFound(_logger, callContent.Name); 125FunctionInvocationLogger.LogNonInvocableFunction(_logger, callContent.Name); 137FunctionInvocationLogger.LogFunctionRequestedTermination(_logger, callContent.Name);
Common\OtelMessageSerializer.cs (1)
81Name = fcc.Name,
Realtime\FunctionInvokingRealtimeClientSession.cs (4)
285FunctionInvocationLogger.LogFunctionNotFound(_logger, fcc.Name); 296AIFunctionDeclaration? tool = FindTool(fcc.Name, AdditionalTools, _innerSession.Options?.Tools); 303FunctionInvocationLogger.LogNonInvocableFunction(_logger, fcc.Name); 310FunctionInvocationLogger.LogFunctionNotFound(_logger, fcc.Name);
Realtime\OpenTelemetryRealtimeClientSession.cs (1)
543Name = fcc.Name,
Microsoft.Extensions.AI.Abstractions (3)
Contents\FunctionCallContent.cs (2)
120$"{Name}({string.Join(", ", Arguments)})" : 121$"{Name}()";
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.FunctionCallContent.g.cs (1)
60Getter = static obj => ((global::Microsoft.Extensions.AI.FunctionCallContent)obj).Name,
Microsoft.Extensions.AI.Abstractions.Tests (26)
AssertExtensions.cs (4)
41Assert.Equal(expectedFunctionCall.Name, chatFunctionCall.Name); 79FunctionCallContent fcc => (fcc.Name, fcc.Arguments), 86FunctionCallContent fcc => (fcc.Name, fcc.Arguments),
ChatCompletion\ChatMessageTests.cs (2)
328Assert.Equal("plugin-name-function-name", functionCallContent.Name); 389Assert.Equal("myFunc", funcCall.Name);
ChatCompletion\ChatResponseUpdateTests.cs (2)
151Assert.Equal("fc1", ((FunctionCallContent)result.Contents[2]).Name); 215Assert.Equal("fc1", ((FunctionCallContent)result.Contents[2]).Name);
Contents\FunctionCallContentTests.cs (11)
27Assert.Equal("name", c.Name); 44Assert.Equal("name", c.Name); 125Assert.Equal("functionName", deserialized.Name); 138Assert.Equal("functionName", deserialized.Name); 154Assert.Equal(original.Name, deserialized.Name); 173Assert.Equal("functionName", deserializedSut.Name); 391Assert.Equal("functionName", content.Name); 430Assert.Equal(content.Name, deserializedContent.Name); 460Assert.Equal("myFunction", funcCall.Name);
Contents\InputRequestContentTests.cs (1)
91Assert.Equal("myFunc", funcCall.Name);
Contents\InputResponseContentTests.cs (1)
93Assert.Equal("myFunc", funcCall.Name);
Contents\ToolApprovalRequestContentTests.cs (1)
129Assert.Equal("myFunc", funcCall.Name);
Contents\ToolApprovalResponseContentTests.cs (3)
97Assert.Equal(((FunctionCallContent)content.ToolCall).Name, functionCall.Name); 129Assert.Equal("myFunc", funcCall.Name);
Generated\361d1da7f942c932\TestJsonSerializerContext.FunctionCallContent.g.cs (1)
58Getter = static obj => ((global::Microsoft.Extensions.AI.FunctionCallContent)obj).Name,
Microsoft.Extensions.AI.Evaluation.Quality (3)
IntentResolutionEvaluator.cs (1)
123if (toolCalls.Any(t => !toolDefinitionNames.Contains(t.Name)))
TaskAdherenceEvaluator.cs (1)
122if (toolCalls.Any(t => !toolDefinitionNames.Contains(t.Name)))
ToolCallAccuracyEvaluator.cs (1)
131if (toolCalls.Any(t => !toolDefinitionNames.Contains(t.Name)))
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.FunctionCallContent.g.cs (1)
60Getter = static obj => ((global::Microsoft.Extensions.AI.FunctionCallContent)obj).Name,
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.FunctionCallContent.g.cs (1)
60Getter = static obj => ((global::Microsoft.Extensions.AI.FunctionCallContent)obj).Name,
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
76var toolCallJson = JsonSerializer.Serialize(new { fcc.CallId, fcc.Name, fcc.Arguments }, _jsonOptions);
Microsoft.Extensions.AI.OpenAI (5)
MicrosoftExtensionsAIChatExtensions.cs (2)
74.OfType<FunctionCallContent>().Select(c => ChatToolCall.CreateFunctionToolCall(c.CallId, c.Name, 159functionName: fcc.Name,
OpenAIChatClient.cs (1)
219ChatToolCall.CreateFunctionToolCall(fc.CallId, fc.Name, new(JsonSerializer.SerializeToUtf8Bytes(
OpenAIRealtimeClientSession.cs (1)
653functionCall.Name,
OpenAIResponsesChatClient.cs (1)
1581callContent.Name,
Microsoft.Extensions.AI.OpenAI.Tests (15)
OpenAIChatClientTests.cs (2)
1169Assert.Equal("GetPersonAge", fcc.Name); 1350Assert.Equal("GetPersonAge", fcc.Name);
OpenAIConversionTests.cs (5)
910Assert.Equal("functionName", Assert.IsType<FunctionCallContent>(message.Contents[2], exactMatch: false).Name); 941Assert.Equal("functionName", Assert.IsType<FunctionCallContent>(message.Contents[2], exactMatch: false).Name); 1022Assert.Equal("MyFunction", fcc.Name); 1240Assert.Equal("TestFunction", functionCall.Name); 1321Assert.Equal("MyFunction", functionCallContent.Name);
OpenAIResponseClientTests.cs (4)
6068Assert.Equal("get_weather", fcc.Name); 8842Assert.Equal("TagResource", call.Name); 8941Assert.Equal("TagResource", call.Name); 8949Assert.Equal("TagResource", coalesced.Name);
parent\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (4)
41Assert.Equal(expectedFunctionCall.Name, chatFunctionCall.Name); 79FunctionCallContent fcc => (fcc.Name, fcc.Arguments), 86FunctionCallContent fcc => (fcc.Name, fcc.Arguments),
Microsoft.Extensions.AI.Stabilization.Tests (1)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.FunctionCallContent.g.cs (1)
58Getter = static obj => ((global::Microsoft.Extensions.AI.FunctionCallContent)obj).Name,
Microsoft.Extensions.AI.Tests (21)
ChatCompletion\DistributedCachingChatClientTest.cs (4)
819Assert.Equal(expectedFcc.Name, actualFcc.Name); 853Assert.Equal(expectedFcc.Name, actualFcc.Name);
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (6)
1506Assert.Equal("Func1", functionCall.Name); 1514Assert.Equal("Func2", functionCall.Name); 1599Assert.Equal("Func1", ((FunctionCallContent)approvalRequest1.ToolCall).Name); 1607Assert.Equal("Func2", ((FunctionCallContent)approvalRequest2.ToolCall).Name); 1615Assert.Equal("Func3", ((FunctionCallContent)approvalRequest3.ToolCall).Name); 2098FunctionCallContent fcc => new FunctionCallContent(fcc.CallId, fcc.Name, fcc.Arguments)
ChatCompletion\FunctionInvokingChatClientTests.cs (6)
1332Assert.Equal("Func1", context.CallContent.Name); 2329cloned.Add(new FunctionCallContent(fcc.CallId, fcc.Name, fcc.Arguments) 3116Assert.Contains(result.Messages, m => m.Contents.OfType<ToolApprovalRequestContent>().Any(frc => ((FunctionCallContent)frc.ToolCall).Name == "FunctionB")); 3126Assert.Contains(result.Messages, m => m.Contents.OfType<ToolApprovalRequestContent>().Any(frc => ((FunctionCallContent)frc.ToolCall).Name == "FunctionB")); 3222Assert.Contains(result.Messages, m => m.Contents.OfType<ToolApprovalRequestContent>().Any(frc => ((FunctionCallContent)frc.ToolCall).Name == "FunctionB")); 3233Assert.Contains(result.Messages, m => m.Contents.OfType<ToolApprovalRequestContent>().Any(frc => ((FunctionCallContent)frc.ToolCall).Name == "FunctionB"));
Generated\361d1da7f942c932\TestJsonSerializerContext.FunctionCallContent.g.cs (1)
58Getter = static obj => ((global::Microsoft.Extensions.AI.FunctionCallContent)obj).Name,
parent\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (4)
41Assert.Equal(expectedFunctionCall.Name, chatFunctionCall.Name); 79FunctionCallContent fcc => (fcc.Name, fcc.Arguments), 86FunctionCallContent fcc => (fcc.Name, fcc.Arguments),