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";
23 references to Result
Microsoft.Extensions.AI (1)
ChatCompletion\OpenTelemetryChatClient.cs (1)
427Content = 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)
425string? result = resultContent.Result as string; 426if (result is null && resultContent.Result is not null) 430result = 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)
413JsonElement jsonResult = JsonSerializer.SerializeToElement(frc.Result, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(object)));
Microsoft.Extensions.AI.OpenAI (3)
OpenAIChatClient.cs (3)
597string? result = resultContent.Result as string; 598if (result is null && resultContent.Result is not null) 602result = JsonSerializer.Serialize(resultContent.Result, ToolCallJsonSerializerOptions.GetTypeInfo(typeof(object)));
Microsoft.Extensions.AI.Tests (4)
ChatCompletion\FunctionInvokingChatClientTests.cs (4)
558AssertExtensions.EqualFunctionCallResults(expectedFunctionResult.Result, chatFunctionResult.Result); 625AssertExtensions.EqualFunctionCallResults(expectedFunctionResult.Result, chatFunctionResult.Result);