3 writes to Arguments
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionCallContent.cs (1)
30Arguments = arguments;
Microsoft.Extensions.AI.Abstractions.Tests (2)
Contents\FunctionCallContentTests.cs (2)
68c.Arguments = args; 414Arguments = new Dictionary<string, object?> { { "arg1", "value1" } }
69 references to Arguments
Microsoft.AspNetCore.Components.AI (4)
Blocks\FunctionApprovalBlock.cs (1)
67public IDictionary<string, object?>? Arguments => Call?.Arguments;
Blocks\FunctionInvocationContentBlock.cs (1)
57public IDictionary<string, object?>? Arguments => Call?.Arguments;
Blocks\UIActionBlock.cs (2)
82var arguments = Call.Arguments is not null 83? new AIFunctionArguments(Call.Arguments)
Microsoft.Extensions.AI (4)
ChatCompletion\FunctionInvokingChatClient.cs (1)
1181Arguments = new(callContent.Arguments) { Services = FunctionInvocationServices },
Common\OtelMessageSerializer.cs (1)
82Arguments = fcc.Arguments,
Realtime\FunctionInvokingRealtimeClientSession.cs (1)
334Arguments = new(callContent.Arguments) { Services = FunctionInvocationServices },
Realtime\OpenTelemetryRealtimeClientSession.cs (1)
544Arguments = fcc.Arguments,
Microsoft.Extensions.AI.Abstractions (2)
Contents\FunctionCallContent.cs (2)
119display += Arguments is not null ? 120$"{Name}({string.Join(", ", Arguments)})" :
Microsoft.Extensions.AI.Abstractions.Tests (24)
AssertExtensions.cs (4)
42AssertExtensions.EqualFunctionCallParameters(expectedFunctionCall.Arguments, chatFunctionCall.Arguments); 79FunctionCallContent fcc => (fcc.Name, fcc.Arguments), 86FunctionCallContent fcc => (fcc.Name, fcc.Arguments),
ChatCompletion\ChatMessageTests.cs (5)
330Assert.NotNull(functionCallContent.Arguments); 331Assert.Single(functionCallContent.Arguments); 332Assert.Equal("argument", functionCallContent.Arguments["parameter"]?.ToString()); 390Assert.NotNull(funcCall.Arguments); 391Assert.Equal("value1", funcCall.Arguments["param1"]?.ToString());
Contents\FunctionCallContentTests.cs (15)
29Assert.Null(c.Arguments); 46Assert.Same(args, c.Arguments); 66Assert.Null(c.Arguments); 69Assert.Same(args, c.Arguments); 174Assert.NotNull(deserializedSut.Arguments); 175Assert.Single(deserializedSut.Arguments); 352Assert.NotNull(content.Arguments); 353Assert.Equal(5, content.Arguments.Count); 354Assert.Collection(content.Arguments, 393Assert.Null(content.Arguments); 431Assert.NotNull(deserializedContent.Arguments); 432Assert.Equal("value1", deserializedContent.Arguments["arg1"]?.ToString()); 462Assert.NotNull(funcCall.Arguments); 463Assert.Equal("value1", funcCall.Arguments["arg1"]?.ToString()); 464Assert.Equal("42", funcCall.Arguments["arg2"]?.ToString());
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 (6)
MicrosoftExtensionsAIChatExtensions.cs (2)
75new BinaryData(JsonSerializer.SerializeToUtf8Bytes(c.Arguments, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(IDictionary<string, object?>)))))); 160functionArgumentsUpdate: new(JsonSerializer.SerializeToUtf8Bytes(fcc.Arguments, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(IDictionary<string, object?>))))))
OpenAIChatClient.cs (1)
220fc.Arguments, AIJsonUtilities.DefaultOptions.GetTypeInfo(typeof(IDictionary<string, object?>))))));
OpenAIRealtimeClientSession.cs (2)
648var arguments = functionCall.Arguments is not null 649? BinaryData.FromString(JsonSerializer.Serialize(functionCall.Arguments, OpenAIJsonContext.Default.IDictionaryStringObject))
OpenAIResponsesChatClient.cs (1)
1586callContent.Arguments,
Microsoft.Extensions.AI.OpenAI.Tests (16)
OpenAIChatClientTests.cs (2)
1170AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments); 1351AssertExtensions.EqualFunctionCallParameters(new Dictionary<string, object?> { ["personName"] = "Alice" }, fcc.Arguments);
OpenAIConversionTests.cs (1)
1241Assert.Equal("value", functionCall.Arguments!["param"]?.ToString());
OpenAIResponseClientTests.cs (9)
8888Assert.NotNull(call.Arguments); 8889Assert.Equal("my-server", ((JsonElement)call.Arguments["resource_name"]!).GetString()); 8890Assert.Equal("production", ((JsonElement)call.Arguments["env"]!).GetString()); 8987Assert.NotNull(call.Arguments); 8988Assert.Equal("my-server", ((JsonElement)call.Arguments["resource_name"]!).GetString()); 8989Assert.Equal("production", ((JsonElement)call.Arguments["env"]!).GetString()); 8995Assert.NotNull(coalesced.Arguments); 8996Assert.Equal("my-server", ((JsonElement)coalesced.Arguments["resource_name"]!).GetString()); 8997Assert.Equal("production", ((JsonElement)coalesced.Arguments["env"]!).GetString());
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (4)
42AssertExtensions.EqualFunctionCallParameters(expectedFunctionCall.Arguments, chatFunctionCall.Arguments); 79FunctionCallContent fcc => (fcc.Name, fcc.Arguments), 86FunctionCallContent fcc => (fcc.Name, fcc.Arguments),
Microsoft.Extensions.AI.Tests (12)
ChatCompletion\DistributedCachingChatClientTest.cs (4)
825JsonSerializer.Serialize(expectedFcc.Arguments, TestJsonSerializerContext.Default.Options), 826JsonSerializer.Serialize(actualFcc.Arguments, TestJsonSerializerContext.Default.Options)); 859JsonSerializer.Serialize(expectedFcc.Arguments, TestJsonSerializerContext.Default.Options), 860JsonSerializer.Serialize(actualFcc.Arguments, TestJsonSerializerContext.Default.Options));
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (1)
2098FunctionCallContent fcc => new FunctionCallContent(fcc.CallId, fcc.Name, fcc.Arguments)
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
1217c => Assert.Equal("Input 1", Assert.IsType<FunctionCallContent>(c).Arguments!["text"]), 1218c => Assert.Equal("Input 2", Assert.IsType<FunctionCallContent>(c).Arguments!["text"])), 2329cloned.Add(new FunctionCallContent(fcc.CallId, fcc.Name, fcc.Arguments)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (4)
42AssertExtensions.EqualFunctionCallParameters(expectedFunctionCall.Arguments, chatFunctionCall.Arguments); 79FunctionCallContent fcc => (fcc.Name, fcc.Arguments), 86FunctionCallContent fcc => (fcc.Name, fcc.Arguments),