27 references to CreateUpdate
Microsoft.Extensions.AI.OpenAI (27)
OpenAIResponsesChatClient.cs (27)
479var update = CreateUpdate(ToUsageDetails(completedUpdate.Response) is { } usage ? new UsageContent(usage) : null);
505yield return CreateUpdate(new TextContent(outputTextDeltaUpdate.Delta));
509yield return CreateUpdate(CreateReasoningContent(reasoningSummaryTextDeltaUpdate.Delta, protectedData: null, reasoningSummaryTextDeltaUpdate.ItemId));
513yield return CreateUpdate(CreateReasoningContent(reasoningTextDeltaUpdate.Delta, protectedData: null, reasoningTextDeltaUpdate.ItemId));
517yield return CreateUpdate(new ImageGenerationToolCallContent(imageGenInProgress.ItemId)
524yield return CreateUpdate(GetImageGenerationResult(streamingImageGenUpdate, options));
528yield return CreateUpdate(new CodeInterpreterToolCallContent(codeInterpreterDeltaUpdate.ItemId)
536yield return CreateUpdate(new WebSearchToolCallContent(webSearchInProgressUpdate.ItemId)
547yield return CreateUpdate(OpenAIClientExtensions.ParseCallContent(fcri.FunctionArguments.ToString(), fcri.CallId, fcri.FunctionName));
551var mcpUpdate = CreateUpdate();
569yield return CreateUpdate(streamApprovalRequest);
578yield return CreateUpdate(new ToolApprovalResponseContent(
589yield return CreateUpdate(new FunctionResultContent(functionCallOutputItem.CallId, functionCallOutputItem.FunctionOutput) { RawRepresentation = functionCallOutputItem });
595yield return CreateUpdate(CreateCodeInterpreterResultContent(cicri));
601yield return CreateUpdate(new WebSearchToolCallContent(wscri.Id)
607yield return CreateUpdate(new WebSearchToolResultContent(wscri.Id)
622yield return CreateUpdate(annotatedContent);
634yield return CreateUpdate(CreateReasoningContent(text: null, protectedData: encryptedContent, itemId: rri.Id));
643yield return CreateUpdate(CreateImageGenerationResultContent(imageGenItem, options));
652yield return CreateUpdate();
658var toolCallUpdate = CreateUpdate(new ToolCallContent(outputItemDoneUpdate.Item.Id));
664yield return CreateUpdate(new ToolCallContent(computerCall.CallId) { RawRepresentation = outputItemDoneUpdate.Item });
668yield return CreateUpdate(new ToolResultContent(computerCallOutput.CallId) { RawRepresentation = computerCallOutput });
673yield return CreateUpdate(new AIContent { RawRepresentation = outputItemDoneUpdate.Item });
707yield return CreateUpdate(new ErrorContent(errorMessage)
715yield return CreateUpdate(new ErrorContent(refusalDone.Refusal)
722yield return CreateUpdate();