39 references to Throw
Microsoft.Extensions.AI.OpenAI (39)
MicrosoftExtensionsAIAssistantsExtensions.cs (1)
18
OpenAIAssistantsChatClient.ToOpenAIAssistantsFunctionToolDefinition(
Throw
.IfNull(function));
MicrosoftExtensionsAIChatExtensions.cs (7)
27
OpenAIChatClient.ToOpenAIChatTool(
Throw
.IfNull(function));
43
OpenAIChatClient.ToOpenAIChatMessages(
Throw
.IfNull(messages), options);
51
_ =
Throw
.IfNull(response);
133
_ =
Throw
.IfNull(responseUpdates);
174
_ =
Throw
.IfNull(messages);
248
OpenAIChatClient.FromOpenAIChatCompletion(
Throw
.IfNull(chatCompletion), options);
261
OpenAIChatClient.FromOpenAIStreamingChatCompletionAsync(
Throw
.IfNull(chatCompletionUpdates), options, cancellationToken);
MicrosoftExtensionsAIRealtimeExtensions.cs (1)
18
OpenAIRealtimeConversationClient.ToOpenAIConversationFunctionTool(
Throw
.IfNull(function));
MicrosoftExtensionsAIResponsesExtensions.cs (6)
22
OpenAIResponsesChatClient.ToResponseTool(
Throw
.IfNull(function));
39
OpenAIResponsesChatClient.ToOpenAIResponseItems(
Throw
.IfNull(messages), options);
46
OpenAIResponsesChatClient.ToChatMessages(
Throw
.IfNull(items));
54
OpenAIResponsesChatClient.FromOpenAIResponse(
Throw
.IfNull(response), options);
67
OpenAIResponsesChatClient.FromOpenAIStreamingResponseUpdatesAsync(
Throw
.IfNull(responseUpdates), options, cancellationToken);
75
_ =
Throw
.IfNull(response);
OpenAIAssistantsChatClient.cs (5)
50
_client =
Throw
.IfNull(assistantClient);
51
_assistantId =
Throw
.IfNullOrWhitespace(assistantId);
59
: this(assistantClient,
Throw
.IfNull(assistant).Id, defaultThreadId)
82
_ =
Throw
.IfNull(messages);
91
Throw
.ArgumentException(nameof(messages), "No thread ID was provided, but chat messages includes tool results.");
OpenAIChatClient.cs (5)
39
_chatClient =
Throw
.IfNull(chatClient);
47
_ =
Throw
.IfNull(serviceType);
61
_ =
Throw
.IfNull(messages);
76
_ =
Throw
.IfNull(messages);
435
_ =
Throw
.IfNull(openAICompletion);
OpenAIEmbeddingGenerator.cs (3)
36
_embeddingClient =
Throw
.IfNull(embeddingClient);
41
Throw
.ArgumentOutOfRangeException(nameof(defaultModelDimensions), "Value must be greater than 0.");
78
_ =
Throw
.IfNull(serviceType);
OpenAIImageGenerator.cs (3)
48
_imageClient =
Throw
.IfNull(imageClient);
56
_ =
Throw
.IfNull(request);
59
_ =
Throw
.IfNull(prompt);
OpenAIResponsesChatClient.cs (4)
46
_ =
Throw
.IfNull(responseClient);
61
_ =
Throw
.IfNull(serviceType);
75
_ =
Throw
.IfNull(messages);
206
_ =
Throw
.IfNull(messages);
OpenAISpeechToTextClient.cs (4)
39
_audioClient =
Throw
.IfNull(audioClient);
47
_ =
Throw
.IfNull(serviceType);
61
_ =
Throw
.IfNull(audioSpeechStream);
114
_ =
Throw
.IfNull(audioSpeechStream);