1 write to CallId
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionResultContent.cs (1)
30CallId = Throw.IfNull(callId);
32 references to CallId
Microsoft.Extensions.AI (6)
ChatCompletion\FunctionInvokingChatClient.cs (2)
1216frc.CallId == result.CallContent.CallId) 1481_ = (functionResultCallIds ??= []).Add(frc.CallId);
ChatCompletion\ImageGeneratingChatClient.cs (3)
343_imageContentByCallId.TryGetValue(functionResult.CallId, out var imageContents)) 352ImageId = functionResult.CallId, 358_ = _imageContentByCallId.Remove(functionResult.CallId);
ChatCompletion\OpenTelemetryChatClient.cs (1)
273Id = frc.CallId,
Microsoft.Extensions.AI.Abstractions (2)
Contents\FunctionResultContent.cs (2)
72if (CallId is not null) 74display += $"{CallId}, ";
Microsoft.Extensions.AI.Abstractions.Tests (8)
ChatCompletion\ChatMessageTests.cs (1)
337Assert.Equal("function-id", functionResultContent.CallId);
Contents\FunctionResultContentTests.cs (7)
16Assert.Equal("callId1", c.CallId); 29Assert.Equal("id", c.CallId); 49Assert.Equal("callId1", c.CallId); 74Assert.Equal(sut.CallId, deserializedSut.CallId); 90Assert.Equal(sut.CallId, deserializedSut.CallId);
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
71var toolCallResultJson = JsonSerializer.Serialize(new ToolCallResult { Id = frc.CallId, Result = frc.Result }, _jsonOptions);
Microsoft.Extensions.AI.OpenAI (5)
OpenAIAssistantsChatClient.cs (1)
585runAndCallIDs = JsonSerializer.Deserialize(frc.CallId, OpenAIJsonContext.Default.StringArray);
OpenAIChatClient.cs (1)
195yield return new ToolChatMessage(resultContent.CallId, result ?? string.Empty);
OpenAIResponsesChatClient.cs (3)
1097yield return SerializeAIContent(resultContent.CallId, [ac]); 1101yield return SerializeAIContent(resultContent.CallId, items); 1118yield return ResponseItem.CreateFunctionCallOutputItem(resultContent.CallId, result ?? string.Empty);
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIChatClientTests.cs (1)
1798Assert.Equal("tool-123", frc.CallId);
Microsoft.Extensions.AI.Tests (9)
ChatCompletion\FunctionInvokingChatClientTests.cs (7)
435Assert.Equal("callId1", capturedFrc.CallId); 512Assert.Equal("callId1", frc.CallId); 515Assert.Equal("differentCallId", innerFrc.CallId); 599Assert.Equal("callId1", derivedFrc.CallId); 2067Assert.Contains(response.Messages, m => m.Contents.Any(c => c is FunctionResultContent frc && frc.CallId == "callId1")); 2068Assert.DoesNotContain(response.Messages, m => m.Contents.Any(c => c is FunctionResultContent frc && frc.CallId == "callId2")); 2115Assert.Contains(response.Messages, m => m.Contents.Any(c => c is FunctionResultContent frc && frc.CallId == "callId1"));
ChatReduction\SummarizingChatReducerTests.cs (2)
220Assert.Contains(resultList, m => m.Contents.Any(c => c is FunctionResultContent fr && fr.CallId == "call2")); 222Assert.DoesNotContain(resultList, m => m.Contents.Any(c => c is FunctionResultContent fr && fr.CallId == "call1"));