27 references to Throw
Microsoft.Extensions.AI.OpenAI (27)
OpenAIAssistantChatClient.cs (4)
52
_client =
Throw
.IfNull(assistantClient);
53
_assistantId =
Throw
.IfNullOrWhitespace(assistantId);
85
_ =
Throw
.IfNull(messages);
94
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);
413
_ =
Throw
.IfNull(openAICompletion);
OpenAIClientExtensions.cs (4)
162
OpenAIChatClient.ToOpenAIChatTool(
Throw
.IfNull(function));
170
OpenAIAssistantChatClient.ToOpenAIAssistantsFunctionToolDefinition(
Throw
.IfNull(function));
177
OpenAIResponseChatClient.ToResponseTool(
Throw
.IfNull(function));
184
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);
153
_ =
Throw
.IfNull(messages);
OpenAISpeechToTextClient.cs (7)
39
_ =
Throw
.IfNull(audioClient);
58
_ =
Throw
.IfNull(serviceType);
72
_ =
Throw
.IfNull(audioSpeechStream);
86
_ =
Throw
.IfNull(audioSpeechStream);
97
_ =
Throw
.IfNull(options);
152
_ =
Throw
.IfNull(audioTranscription);
199
_ =
Throw
.IfNull(audioTranslation);