8 references to AsChatClient
Aspire.OpenAI (1)
AspireOpenAIClientBuilderChatClientExtensions.cs (1)
57
var result = openAiClient.
AsChatClient
(deploymentName);
Microsoft.Extensions.AI.OpenAI.Tests (7)
OpenAIChatClientIntegrationTests.cs (1)
12
?.
AsChatClient
(Environment.GetEnvironmentVariable("OPENAI_CHAT_MODEL") ?? "gpt-4o-mini");
OpenAIChatClientTests.cs (6)
54
Assert.Throws<ArgumentNullException>("openAIClient", () => ((OpenAIClient)null!).
AsChatClient
("model"));
58
Assert.Throws<ArgumentNullException>("modelId", () => client.
AsChatClient
(null!));
59
Assert.Throws<ArgumentException>("modelId", () => client.
AsChatClient
(" "));
74
IChatClient chatClient = client.
AsChatClient
(model);
89
IChatClient chatClient = openAIClient.
AsChatClient
("model");
927
.
AsChatClient
(modelId);