6 writes to Inputs
Microsoft.Extensions.AI.Abstractions (1)
ChatCompletion\ChatResponseExtensions.cs (1)
283Inputs = inputs,
Microsoft.Extensions.AI.Abstractions.Tests (3)
Contents\CodeInterpreterToolCallContentTests.cs (3)
33c.Inputs = inputs; 53Inputs = 74Inputs =
Microsoft.Extensions.AI.OpenAI (2)
OpenAIAssistantsChatClient.cs (1)
205Inputs = [new DataContent(Encoding.UTF8.GetBytes(details.CodeInterpreterInput), "text/x-python")],
OpenAIResponsesChatClient.cs (1)
1127Inputs = !string.IsNullOrWhiteSpace(cicri.Code) ? [new DataContent(Encoding.UTF8.GetBytes(cicri.Code), "text/x-python")] : null,
28 references to Inputs
Microsoft.Extensions.AI.Abstractions (4)
ChatCompletion\ChatResponseExtensions.cs (3)
260if (firstContent.Inputs is not null) 262CoalesceContent(firstContent.Inputs); 272(inputs ??= []).AddRange(((CodeInterpreterToolCallContent)contents[i]).Inputs ?? []);
Contents\CodeInterpreterToolCallContent.cs (1)
37/// by the service. Typically <see cref="Inputs"/> includes a <see cref="DataContent"/> with a "text/x-python"
Microsoft.Extensions.AI.Abstractions.Tests (14)
Contents\CodeInterpreterToolCallContentTests.cs (14)
19Assert.Null(c.Inputs); 31Assert.Null(c.Inputs); 34Assert.Same(inputs, c.Inputs); 61Assert.NotNull(c.Inputs); 62Assert.Equal(3, c.Inputs.Count); 63Assert.IsType<TextContent>(c.Inputs[0]); 64Assert.IsType<HostedFileContent>(c.Inputs[1]); 65Assert.IsType<DataContent>(c.Inputs[2]); 86Assert.NotNull(deserializedSut.Inputs); 87Assert.Equal(2, deserializedSut.Inputs.Count); 88Assert.IsType<TextContent>(deserializedSut.Inputs[0]); 89Assert.Equal("print('hello')", ((TextContent)deserializedSut.Inputs[0]).Text); 90Assert.IsType<HostedFileContent>(deserializedSut.Inputs[1]); 91Assert.Equal("file456", ((HostedFileContent)deserializedSut.Inputs[1]).FileId);
Microsoft.Extensions.AI.OpenAI.Tests (10)
OpenAIAssistantChatClientIntegrationTests.cs (3)
72if (toolCallContent.Inputs is not null) 74Assert.NotEmpty(toolCallContent.Inputs); 75if (toolCallContent.Inputs.OfType<DataContent>().FirstOrDefault() is { } codeInput)
OpenAIResponseClientIntegrationTests.cs (3)
45Assert.NotNull(toolCallContent.Inputs); 46Assert.NotEmpty(toolCallContent.Inputs); 48var codeInput = toolCallContent.Inputs.OfType<DataContent>().FirstOrDefault();
OpenAIResponseClientTests.cs (4)
2361Assert.NotNull(codeCall.Inputs); 2362var codeInput = Assert.IsType<DataContent>(Assert.Single(codeCall.Inputs)); 2581Assert.NotNull(codeCall.Inputs); 2582var codeInput = Assert.IsType<DataContent>(Assert.Single(codeCall.Inputs));