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)
69c.Arguments = args;
36 references to Arguments
Microsoft.Extensions.AI (3)
ChatCompletion\FunctionInvokingChatClient.cs (2)
653LogInvokingSensitive(context.Function.Metadata.Name, LoggingHelpers.AsJson(context.CallContent.Arguments, context.Function.Metadata.JsonSerializerOptions)); 664result = await context.Function.InvokeAsync(context.CallContent.Arguments, cancellationToken).ConfigureAwait(false);
ChatCompletion\OpenTelemetryChatClient.cs (1)
519JsonSerializer.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)
362Assert.NotNull(functionCallContent.Arguments); 363Assert.Single(functionCallContent.Arguments); 364Assert.Equal("argument", functionCallContent.Arguments["parameter"]?.ToString());
Contents\FunctionCallContentTests..cs (10)
29Assert.Null(c.Arguments); 45Assert.Same(args, c.Arguments); 67Assert.Null(c.Arguments); 70Assert.Same(args, c.Arguments); 93Assert.NotNull(deserializedSut.Arguments); 94Assert.Single(deserializedSut.Arguments); 283Assert.NotNull(content.Arguments); 284Assert.Equal(5, content.Arguments.Count); 285Assert.Collection(content.Arguments, 324Assert.Null(content.Arguments);
Microsoft.Extensions.AI.AzureAIInference (1)
AzureAIInferenceChatClient.cs (1)
464JsonSerializer.Serialize(callRequest.Arguments, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(IDictionary<string, object>))))));
Microsoft.Extensions.AI.AzureAIInference.Tests (2)
AzureAIInferenceChatClientTests.cs (2)
787AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 878AssertExtensions.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)
426Arguments = JsonSerializer.SerializeToElement(fcc.Arguments, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(IDictionary<string, object?>))),
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
385AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments);
Microsoft.Extensions.AI.OpenAI (4)
OpenAIModelMapper.ChatCompletion.cs (1)
45callRequest.Arguments,
OpenAIModelMapper.ChatMessage.cs (1)
171callRequest.Arguments,
OpenAIModelMappers.StreamingChatCompletion.cs (1)
40functionArgumentsUpdate: new(JsonSerializer.SerializeToUtf8Bytes(functionCallContent.Arguments, options.GetTypeInfo(typeof(IDictionary<string, object?>))))));
OpenAIRealtimeExtensions.cs (1)
126var result = await aiFunction.InvokeAsync(functionCallContent.Arguments, cancellationToken).ConfigureAwait(false);
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (2)
772AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 873AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments);
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\FunctionInvokingChatClientTests.cs (6)
544c => Assert.Equal("Input 1", Assert.IsType<FunctionCallContent>(c).Arguments!["text"]), 545c => Assert.Equal("Input 2", Assert.IsType<FunctionCallContent>(c).Arguments!["text"])), 615AssertExtensions.EqualFunctionCallParameters(expectedFunctionCall.Arguments, chatFunctionCall.Arguments); 705AssertExtensions.EqualFunctionCallParameters(expectedFunctionCall.Arguments, chatFunctionCall.Arguments);