29 references to Throw
Microsoft.Extensions.AI.OpenAI (29)
OpenAIAssistantClient.cs (5)
51
_assistantClient =
Throw
.IfNull(assistantClient);
52
_assistantId =
Throw
.IfNull(assistantId);
61
_ =
Throw
.IfNull(serviceType);
87
Throw
.ArgumentException(nameof(chatMessages), "No thread ID was provided, but chat messages includes tool results.");
181
_ =
Throw
.IfNull(chatMessages);
OpenAIChatClient.cs (7)
44
_ =
Throw
.IfNull(openAIClient);
45
_ =
Throw
.IfNullOrWhitespace(modelId);
64
_ =
Throw
.IfNull(chatClient);
84
set => _toolCallJsonSerializerOptions =
Throw
.IfNull(value);
90
_ =
Throw
.IfNull(serviceType);
105
_ =
Throw
.IfNull(chatMessages);
120
_ =
Throw
.IfNull(chatMessages);
OpenAIEmbeddingGenerator.cs (6)
44
_ =
Throw
.IfNull(openAIClient);
45
_ =
Throw
.IfNullOrWhitespace(modelId);
48
Throw
.ArgumentOutOfRangeException(nameof(dimensions), "Value must be greater than 0.");
71
_ =
Throw
.IfNull(embeddingClient);
74
Throw
.ArgumentOutOfRangeException(nameof(dimensions), "Value must be greater than 0.");
125
_ =
Throw
.IfNull(serviceType);
OpenAIModelMapper.ChatCompletion.cs (2)
33
_ =
Throw
.IfNull(chatCompletion);
78
_ =
Throw
.IfNull(openAICompletion);
OpenAIRealtimeExtensions.cs (4)
28
_ =
Throw
.IfNull(aiFunction);
64
_ =
Throw
.IfNull(session);
65
_ =
Throw
.IfNull(update);
66
_ =
Throw
.IfNull(tools);
OpenAISerializationHelpers.cs (5)
31
_ =
Throw
.IfNull(stream);
52
_ =
Throw
.IfNull(stream);
53
_ =
Throw
.IfNull(chatCompletion);
75
_ =
Throw
.IfNull(stream);
76
_ =
Throw
.IfNull(streamingChatCompletionUpdates);