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(messages), "No thread ID was provided, but chat messages includes tool results.");
183
_ =
Throw
.IfNull(messages);
OpenAIChatClient.cs (7)
46
_ =
Throw
.IfNull(openAIClient);
47
_ =
Throw
.IfNullOrWhitespace(modelId);
67
_ =
Throw
.IfNull(chatClient);
87
set => _toolCallJsonSerializerOptions =
Throw
.IfNull(value);
93
_ =
Throw
.IfNull(serviceType);
108
_ =
Throw
.IfNull(messages);
123
_ =
Throw
.IfNull(messages);
OpenAIEmbeddingGenerator.cs (6)
47
_ =
Throw
.IfNull(openAIClient);
48
_ =
Throw
.IfNullOrWhitespace(modelId);
51
Throw
.ArgumentOutOfRangeException(nameof(dimensions), "Value must be greater than 0.");
76
_ =
Throw
.IfNull(embeddingClient);
79
Throw
.ArgumentOutOfRangeException(nameof(dimensions), "Value must be greater than 0.");
130
_ =
Throw
.IfNull(serviceType);
OpenAIModelMapper.ChatCompletion.cs (2)
31
_ =
Throw
.IfNull(response);
78
_ =
Throw
.IfNull(openAICompletion);
OpenAIRealtimeExtensions.cs (4)
29
_ =
Throw
.IfNull(aiFunction);
68
_ =
Throw
.IfNull(session);
69
_ =
Throw
.IfNull(update);
70
_ =
Throw
.IfNull(tools);
OpenAISerializationHelpers.cs (5)
32
_ =
Throw
.IfNull(stream);
55
_ =
Throw
.IfNull(stream);
56
_ =
Throw
.IfNull(response);
80
_ =
Throw
.IfNull(stream);
81
_ =
Throw
.IfNull(updates);