42 references to Throw
Microsoft.Extensions.AI.OpenAI (42)
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 (8)
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);
108
_ =
Throw
.IfNull(tools);
134
_ =
Throw
.IfNull(tool);
OpenAIAssistantsChatClient.cs (5)
44
_client =
Throw
.IfNull(assistantClient);
45
_assistantId =
Throw
.IfNullOrWhitespace(assistantId);
53
: this(assistantClient,
Throw
.IfNull(assistant).Id, defaultThreadId)
76
_ =
Throw
.IfNull(messages);
85
Throw
.ArgumentException(nameof(messages), "No thread ID was provided, but chat messages includes tool results.");
OpenAIChatClient.cs (5)
61
_chatClient =
Throw
.IfNull(chatClient);
69
_ =
Throw
.IfNull(serviceType);
83
_ =
Throw
.IfNull(messages);
101
_ =
Throw
.IfNull(messages);
463
_ =
Throw
.IfNull(openAICompletion);
OpenAIEmbeddingGenerator.cs (3)
50
_embeddingClient =
Throw
.IfNull(embeddingClient);
55
Throw
.ArgumentOutOfRangeException(nameof(defaultModelDimensions), "Value must be greater than 0.");
95
_ =
Throw
.IfNull(serviceType);
OpenAIImageGenerator.cs (3)
47
_imageClient =
Throw
.IfNull(imageClient);
55
_ =
Throw
.IfNull(request);
58
_ =
Throw
.IfNull(prompt);
OpenAIResponsesChatClient.cs (5)
60
_ =
Throw
.IfNull(responseClient);
70
_ =
Throw
.IfNull(serviceType);
84
_ =
Throw
.IfNull(messages);
218
_ =
Throw
.IfNull(messages);
904
_ =
Throw
.IfNull(serviceType);
OpenAISpeechToTextClient.cs (4)
38
_audioClient =
Throw
.IfNull(audioClient);
46
_ =
Throw
.IfNull(serviceType);
60
_ =
Throw
.IfNull(audioSpeechStream);
113
_ =
Throw
.IfNull(audioSpeechStream);