24 references to Throw
Microsoft.Extensions.AI.OpenAI (24)
OpenAIChatClient.cs (7)
41
_ =
Throw
.IfNull(openAIClient);
42
_ =
Throw
.IfNullOrWhitespace(modelId);
61
_ =
Throw
.IfNull(chatClient);
81
set => _toolCallJsonSerializerOptions =
Throw
.IfNull(value);
90
_ =
Throw
.IfNull(serviceType);
104
_ =
Throw
.IfNull(chatMessages);
119
_ =
Throw
.IfNull(chatMessages);
OpenAIEmbeddingGenerator.cs (6)
41
_ =
Throw
.IfNull(openAIClient);
42
_ =
Throw
.IfNullOrWhitespace(modelId);
45
Throw
.ArgumentOutOfRangeException(nameof(dimensions), "Value must be greater than 0.");
68
_ =
Throw
.IfNull(embeddingClient);
71
Throw
.ArgumentOutOfRangeException(nameof(dimensions), "Value must be greater than 0.");
101
_ =
Throw
.IfNull(serviceType);
OpenAIModelMapper.ChatCompletion.cs (2)
28
_ =
Throw
.IfNull(chatCompletion);
73
_ =
Throw
.IfNull(openAICompletion);
OpenAIRealtimeExtensions.cs (4)
30
_ =
Throw
.IfNull(aiFunction);
75
_ =
Throw
.IfNull(session);
76
_ =
Throw
.IfNull(update);
77
_ =
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);