8 instantiations of OpenAIChatClient
Microsoft.Extensions.AI.OpenAI (2)
OpenAIClientExtensions.cs (2)
18new OpenAIChatClient(openAIClient, modelId); 24new OpenAIChatClient(chatClient);
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAIChatClientTests.cs (6)
29Assert.Throws<ArgumentNullException>("openAIClient", () => new OpenAIChatClient(null!, "model")); 30Assert.Throws<ArgumentNullException>("chatClient", () => new OpenAIChatClient(null!)); 33Assert.Throws<ArgumentNullException>("modelId", () => new OpenAIChatClient(openAIClient, null!)); 34Assert.Throws<ArgumentException>("modelId", () => new OpenAIChatClient(openAIClient, "")); 35Assert.Throws<ArgumentException>("modelId", () => new OpenAIChatClient(openAIClient, " ")); 41using OpenAIChatClient client = new(new("key"), "model");
4 references to OpenAIChatClient
Microsoft.Extensions.AI.OpenAI (2)
OpenAIChatClient.cs (2)
36/// <summary>Initializes a new instance of the <see cref="OpenAIChatClient"/> class for the specified <see cref="OpenAIClient"/>.</summary> 57/// <summary>Initializes a new instance of the <see cref="OpenAIChatClient"/> class for the specified <see cref="ChatClient"/>.</summary>
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (2)
41using OpenAIChatClient client = new(new("key"), "model"); 92Assert.Same(chatClient, chatClient.GetService<OpenAIChatClient>());