24 references to Throw
Microsoft.Extensions.AI.OpenAI (24)
OpenAIAssistantChatClient.cs (4)
50
_client =
Throw
.IfNull(assistantClient);
51
_assistantId =
Throw
.IfNullOrWhitespace(assistantId);
83
_ =
Throw
.IfNull(messages);
92
Throw
.ArgumentException(nameof(messages), "No thread ID was provided, but chat messages includes tool results.");
OpenAIChatClient.cs (5)
38
_ =
Throw
.IfNull(chatClient);
57
_ =
Throw
.IfNull(serviceType);
71
_ =
Throw
.IfNull(messages);
86
_ =
Throw
.IfNull(messages);
435
_ =
Throw
.IfNull(openAICompletion);
OpenAIClientExtensions.cs (4)
161
OpenAIChatClient.ToOpenAIChatTool(
Throw
.IfNull(function));
168
OpenAIAssistantChatClient.ToOpenAIAssistantsFunctionToolDefinition(
Throw
.IfNull(function));
175
OpenAIResponseChatClient.ToResponseTool(
Throw
.IfNull(function));
182
OpenAIRealtimeConversationClient.ToOpenAIConversationFunctionTool(
Throw
.IfNull(function));
OpenAIEmbeddingGenerator.cs (3)
41
_ =
Throw
.IfNull(embeddingClient);
44
Throw
.ArgumentOutOfRangeException(nameof(defaultModelDimensions), "Value must be greater than 0.");
95
_ =
Throw
.IfNull(serviceType);
OpenAIResponseChatClient.cs (4)
38
_ =
Throw
.IfNull(responseClient);
57
_ =
Throw
.IfNull(serviceType);
71
_ =
Throw
.IfNull(messages);
160
_ =
Throw
.IfNull(messages);
OpenAISpeechToTextClient.cs (4)
40
_ =
Throw
.IfNull(audioClient);
59
_ =
Throw
.IfNull(serviceType);
73
_ =
Throw
.IfNull(audioSpeechStream);
126
_ =
Throw
.IfNull(audioSpeechStream);