29 references to Throw
Microsoft.Extensions.AI.OpenAI (29)
MicrosoftExtensionsAIAssistantsExtensions.cs (1)
18
OpenAIAssistantsChatClient.ToOpenAIAssistantsFunctionToolDefinition(
Throw
.IfNull(function));
MicrosoftExtensionsAIChatExtensions.cs (3)
19
OpenAIChatClient.ToOpenAIChatTool(
Throw
.IfNull(function));
25
OpenAIChatClient.ToOpenAIChatMessages(
Throw
.IfNull(messages), chatOptions: null);
32
OpenAIChatClient.FromOpenAIChatCompletion(
Throw
.IfNull(chatCompletion), options);
MicrosoftExtensionsAIRealtimeExtensions.cs (1)
18
OpenAIRealtimeConversationClient.ToOpenAIConversationFunctionTool(
Throw
.IfNull(function));
MicrosoftExtensionsAIResponsesExtensions.cs (3)
19
OpenAIResponsesChatClient.ToResponseTool(
Throw
.IfNull(function));
25
OpenAIResponsesChatClient.ToOpenAIResponseItems(
Throw
.IfNull(messages));
32
OpenAIResponsesChatClient.FromOpenAIResponse(
Throw
.IfNull(response), options);
OpenAIAssistantsChatClient.cs (5)
50
_client =
Throw
.IfNull(assistantClient);
51
_assistantId =
Throw
.IfNullOrWhitespace(assistantId);
67
: this(assistantClient,
Throw
.IfNull(assistant).Id, defaultThreadId)
90
_ =
Throw
.IfNull(messages);
99
Throw
.ArgumentException(nameof(messages), "No thread ID was provided, but chat messages includes tool results.");
OpenAIChatClient.cs (5)
39
_ =
Throw
.IfNull(chatClient);
58
_ =
Throw
.IfNull(serviceType);
72
_ =
Throw
.IfNull(messages);
87
_ =
Throw
.IfNull(messages);
436
_ =
Throw
.IfNull(openAICompletion);
OpenAIEmbeddingGenerator.cs (3)
40
_ =
Throw
.IfNull(embeddingClient);
43
Throw
.ArgumentOutOfRangeException(nameof(defaultModelDimensions), "Value must be greater than 0.");
94
_ =
Throw
.IfNull(serviceType);
OpenAIResponsesChatClient.cs (4)
39
_ =
Throw
.IfNull(responseClient);
58
_ =
Throw
.IfNull(serviceType);
72
_ =
Throw
.IfNull(messages);
172
_ =
Throw
.IfNull(messages);
OpenAISpeechToTextClient.cs (4)
40
_ =
Throw
.IfNull(audioClient);
59
_ =
Throw
.IfNull(serviceType);
73
_ =
Throw
.IfNull(audioSpeechStream);
126
_ =
Throw
.IfNull(audioSpeechStream);