2 writes to Arguments
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionCallContent.cs (1)
30Arguments = arguments;
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\FunctionCallContentTests..cs (1)
67c.Arguments = args;
36 references to Arguments
Microsoft.Extensions.AI (3)
ChatCompletion\FunctionInvokingChatClient.cs (2)
672LogInvokingSensitive(context.Function.Metadata.Name, LoggingHelpers.AsJson(context.CallContent.Arguments, context.Function.Metadata.JsonSerializerOptions)); 684result = await context.Function.InvokeAsync(context.CallContent.Arguments, cancellationToken).ConfigureAwait(false);
ChatCompletion\OpenTelemetryChatClient.cs (1)
521JsonSerializer.SerializeToNode(fc.Arguments, _jsonSerializerOptions.GetTypeInfo(typeof(IDictionary<string, object?>))) :
Microsoft.Extensions.AI.Abstractions (2)
Contents\FunctionCallContent.cs (2)
109display += Arguments is not null ? 110$"Call = {Name}({string.Join(", ", Arguments)})" :
Microsoft.Extensions.AI.Abstractions.Tests (13)
ChatCompletion\ChatMessageTests.cs (3)
338Assert.NotNull(functionCallContent.Arguments); 339Assert.Single(functionCallContent.Arguments); 340Assert.Equal("argument", functionCallContent.Arguments["parameter"]?.ToString());
Contents\FunctionCallContentTests..cs (10)
29Assert.Null(c.Arguments); 45Assert.Same(args, c.Arguments); 65Assert.Null(c.Arguments); 68Assert.Same(args, c.Arguments); 91Assert.NotNull(deserializedSut.Arguments); 92Assert.Single(deserializedSut.Arguments); 281Assert.NotNull(content.Arguments); 282Assert.Equal(5, content.Arguments.Count); 283Assert.Collection(content.Arguments, 322Assert.Null(content.Arguments);
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
447JsonSerializer.Serialize(callRequest.Arguments, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(IDictionary<string, object>))))));
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
AzureAIInferenceChatClientTests.cs (2)
790AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 881AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments);
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
72var toolCallJson = JsonSerializer.Serialize(new { fcc.CallId, fcc.Name, fcc.Arguments }, _jsonOptions);
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
442Arguments = JsonSerializer.SerializeToElement(fcc.Arguments, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(IDictionary<string, object?>))),
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
387AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments);
Microsoft.Extensions.AI.OpenAI (4)
OpenAIModelMapper.ChatCompletion.cs (1)
50callRequest.Arguments,
OpenAIModelMapper.ChatMessage.cs (1)
181callRequest.Arguments,
OpenAIModelMappers.StreamingChatCompletion.cs (1)
40functionArgumentsUpdate: new(JsonSerializer.SerializeToUtf8Bytes(functionCallContent.Arguments, options.GetTypeInfo(typeof(IDictionary<string, object?>))))));
OpenAIRealtimeExtensions.cs (1)
106var result = await aiFunction.InvokeAsync(functionCallContent.Arguments, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (2)
798AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 899AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments);
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\FunctionInvokingChatClientTests.cs (6)
557c => Assert.Equal("Input 1", Assert.IsType<FunctionCallContent>(c).Arguments!["text"]), 558c => Assert.Equal("Input 2", Assert.IsType<FunctionCallContent>(c).Arguments!["text"])), 764AssertExtensions.EqualFunctionCallParameters(expectedFunctionCall.Arguments, chatFunctionCall.Arguments); 853AssertExtensions.EqualFunctionCallParameters(expectedFunctionCall.Arguments, chatFunctionCall.Arguments);