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));
34
OpenAIChatClient.ToOpenAIChatMessages(
Throw
.IfNull(messages), options);
42
_ =
Throw
.IfNull(response);
124
_ =
Throw
.IfNull(responseUpdates);
165
_ =
Throw
.IfNull(messages);
239
OpenAIChatClient.FromOpenAIChatCompletion(
Throw
.IfNull(chatCompletion), options);
252
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));
30
OpenAIResponsesChatClient.ToOpenAIResponseItems(
Throw
.IfNull(messages), options);
37
OpenAIResponsesChatClient.ToChatMessages(
Throw
.IfNull(items));
45
OpenAIResponsesChatClient.FromOpenAIResponse(
Throw
.IfNull(response), options);
58
OpenAIResponsesChatClient.FromOpenAIStreamingResponseUpdatesAsync(
Throw
.IfNull(responseUpdates), options, cancellationToken);
66
_ =
Throw
.IfNull(response);
OpenAIAssistantsChatClient.cs (5)
51
_client =
Throw
.IfNull(assistantClient);
52
_assistantId =
Throw
.IfNullOrWhitespace(assistantId);
68
: this(assistantClient,
Throw
.IfNull(assistant).Id, defaultThreadId)
91
_ =
Throw
.IfNull(messages);
100
Throw
.ArgumentException(nameof(messages), "No thread ID was provided, but chat messages includes tool results.");
OpenAIChatClient.cs (5)
40
_ =
Throw
.IfNull(chatClient);
57
_ =
Throw
.IfNull(serviceType);
71
_ =
Throw
.IfNull(messages);
86
_ =
Throw
.IfNull(messages);
445
_ =
Throw
.IfNull(openAICompletion);
OpenAIEmbeddingGenerator.cs (3)
40
_ =
Throw
.IfNull(embeddingClient);
43
Throw
.ArgumentOutOfRangeException(nameof(defaultModelDimensions), "Value must be greater than 0.");
91
_ =
Throw
.IfNull(serviceType);
OpenAIImageGenerator.cs (3)
48
_ =
Throw
.IfNull(imageClient);
65
_ =
Throw
.IfNull(request);
68
_ =
Throw
.IfNull(prompt);
OpenAIResponsesChatClient.cs (4)
40
_ =
Throw
.IfNull(responseClient);
59
_ =
Throw
.IfNull(serviceType);
73
_ =
Throw
.IfNull(messages);
181
_ =
Throw
.IfNull(messages);
OpenAISpeechToTextClient.cs (4)
40
_ =
Throw
.IfNull(audioClient);
57
_ =
Throw
.IfNull(serviceType);
71
_ =
Throw
.IfNull(audioSpeechStream);
124
_ =
Throw
.IfNull(audioSpeechStream);