2 writes to Result
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionResultContent.cs (1)
33Result = result;
Microsoft.Extensions.AI.Abstractions.Tests (1)
Contents\FunctionResultContentTests.cs (1)
56c.Result = "result";
26 references to Result
Microsoft.Extensions.AI (1)
ChatCompletion\OpenTelemetryChatClient.cs (1)
457Content = EnableSensitiveData && frc.Result is object result ?
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionResultContent.cs (1)
83$"Result = {Result?.ToString() ?? string.Empty}";
Microsoft.Extensions.AI.Abstractions.Tests (9)
ChatCompletion\ChatMessageTests.cs (1)
368Assert.Equal("function-result", functionResultContent.Result?.ToString());
Contents\FunctionResultContentTests.cs (8)
20Assert.Null(c.Result); 32Assert.Equal("result", c.Result); 55Assert.Null(c.Result); 57Assert.Equal("result", c.Result); 80Assert.Equal(sut.Result, deserializedSut.Result?.ToString()); 97Assert.Equal(sut.Result, deserializedSut.Result?.ToString());
Microsoft.Extensions.AI.AzureAIInference (3)
AzureAIInferenceChatClient.cs (3)
427string? result = resultContent.Result as string; 428if (result is null && resultContent.Result is not null) 432result = JsonSerializer.Serialize(resultContent.Result, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(object)));
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
65var toolCallResultJson = JsonSerializer.Serialize(new ToolCallResult { Id = frc.CallId, Result = frc.Result }, _jsonOptions);
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
434JsonElement jsonResult = JsonSerializer.SerializeToElement(frc.Result, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(object)));
Microsoft.Extensions.AI.OpenAI (3)
OpenAIModelMapper.ChatMessage.cs (3)
138string? result = resultContent.Result as string; 139if (result is null && resultContent.Result is not null) 143result = JsonSerializer.Serialize(resultContent.Result, options.GetTypeInfo(typeof(object)));
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAISerializationTests.cs (1)
426Assert.Equal(42, Assert.IsType<JsonElement>(frc.Result).GetInt32());
Microsoft.Extensions.AI.Tests (6)
ChatCompletion\FunctionInvokingChatClientTests.cs (6)
547c => Assert.Equal("Result for Input 1", Assert.IsType<FunctionResultContent>(c).Result?.ToString()), 548c => Assert.Equal("Result for Input 2", Assert.IsType<FunctionResultContent>(c).Result?.ToString()))); 620AssertExtensions.EqualFunctionCallResults(expectedFunctionResult.Result, chatFunctionResult.Result); 710AssertExtensions.EqualFunctionCallResults(expectedFunctionResult.Result, chatFunctionResult.Result);