1 write to CallId
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionCallContent.cs (1)
28CallId = Throw.IfNull(callId);
40 references to CallId
Microsoft.Extensions.AI (10)
ChatCompletion\FunctionInvokingChatClient.cs (9)
1107return new FunctionResultContent(result.CallContent.CallId, functionResult) { Exception = result.Exception }; 1129new(OpenTelemetryConsts.GenAI.Tool.Call.Id, context.CallContent.CallId), 1312_ = (approvalRequestCallIds ??= []).Add(farc.FunctionCall.CallId); 1318_ = approvalRequestCallIds?.Remove(farc.FunctionCall.CallId); 1377if (functionResultCallIds?.Contains(approvalResponse.FunctionCall.CallId) is true) 1386_ = allApprovalRequestsMessages?.TryGetValue(approvalResponse.FunctionCall.CallId, out requestMessage); 1402rejections.ConvertAll(static m => (AIContent)new FunctionResultContent(m.Response.FunctionCall.CallId, "Error: Tool call invocation was rejected by user.")) : 1529updatedContent[i] = new FunctionApprovalRequestContent(fcc.CallId, fcc); 1593message.Contents[contentIndex] = new FunctionApprovalRequestContent(functionCall.CallId, functionCall);
ChatCompletion\OpenTelemetryChatClient.cs (1)
261Id = fcc.CallId,
Microsoft.Extensions.AI.Abstractions (3)
Contents\FunctionCallContent.cs (2)
109if (CallId is not null) 111display += $"{CallId}, ";
Contents\FunctionResultContent.cs (1)
39/// <see cref="FunctionCallContent.CallId"/> value.
Microsoft.Extensions.AI.Abstractions.Tests (6)
ChatCompletion\ChatMessageTests.cs (1)
329Assert.Equal("function-id", functionCallContent.CallId);
Contents\FunctionCallContentTests.cs (5)
26Assert.Equal("callId1", c.CallId); 44Assert.Equal("id", c.CallId); 63Assert.Equal("callId1", c.CallId); 89Assert.Equal("callId1", deserializedSut.CallId); 309Assert.Equal("callId", content.CallId);
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
484if (content is FunctionCallContent { CallId: not null } callRequest) 487callRequest.CallId,
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
1359Assert.Equal("call_F9ZaqPWo69u0urxAhVt8meDW", fcc.CallId);
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 (4)
MicrosoftExtensionsAIChatExtensions.cs (2)
70.OfType<FunctionCallContent>().Select(c => ChatToolCall.CreateFunctionToolCall(c.CallId, c.Name, 152index, fcc.CallId, ChatToolCallKind.Function, fcc.Name,
OpenAIChatClient.cs (1)
202ChatToolCall.CreateFunctionToolCall(fc.CallId, fc.Name, new(JsonSerializer.SerializeToUtf8Bytes(
OpenAIResponsesChatClient.cs (1)
821callContent.CallId,
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (1)
1346Assert.Equal("call_F9ZaqPWo69u0urxAhVt8meDW", fcc.CallId);
OpenAIConversionTests.cs (1)
494Assert.Equal("call123", functionCall.CallId);
Microsoft.Extensions.AI.Tests (11)
ChatCompletion\DistributedCachingChatClientTest.cs (4)
822Assert.Equal(expectedFcc.CallId, actualFcc.CallId); 856Assert.Equal(expectedFcc.CallId, actualFcc.CallId);
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (5)
728if (functionCall.CallId == "callId1") 733else if (functionCall.CallId == "callId2") 819Assert.Equal("callId1", approvalRequest1.FunctionCall.CallId); 827Assert.Equal("callId2", approvalRequest2.FunctionCall.CallId); 835Assert.Equal("callId1", approvalRequest3.FunctionCall.CallId);
ChatReduction\SummarizingChatReducerTests.cs (2)
219Assert.Contains(resultList, m => m.Contents.Any(c => c is FunctionCallContent fc && fc.CallId == "call2")); 221Assert.DoesNotContain(resultList, m => m.Contents.Any(c => c is FunctionCallContent fc && fc.CallId == "call1"));