22 references to Auto
Microsoft.Extensions.AI (2)
ChatCompletion\FunctionInvokingChatClient.cs (2)
274options.ToolMode = ChatToolMode.Auto; 380options.ToolMode = ChatToolMode.Auto;
Microsoft.Extensions.AI.Abstractions (4)
ChatCompletion\AutoChatToolMode.cs (2)
12/// Use <see cref="ChatToolMode.Auto"/> to get an instance of <see cref="AutoChatToolMode"/>. 18/// <remarks>Use <see cref="ChatToolMode.Auto"/> to get an instance of <see cref="AutoChatToolMode"/>.</remarks>
ChatCompletion\ChatOptions.cs (1)
54public ChatToolMode ToolMode { get; set; } = ChatToolMode.Auto;
ChatCompletion\ChatToolMode.cs (1)
12/// The predefined values <see cref="Auto" /> and <see cref="RequireAny"/> are provided.
Microsoft.Extensions.AI.Abstractions.Tests (16)
ChatCompletion\ChatOptionsTests.cs (2)
26Assert.Same(ChatToolMode.Auto, options.ToolMode); 41Assert.Same(ChatToolMode.Auto, clone.ToolMode);
ChatCompletion\ChatToolModeTests.cs (14)
14Assert.Same(ChatToolMode.Auto, ChatToolMode.Auto); 21Assert.True(ChatToolMode.Auto == ChatToolMode.Auto); 22Assert.True(ChatToolMode.Auto.Equals(ChatToolMode.Auto)); 23Assert.False(ChatToolMode.Auto.Equals(ChatToolMode.RequireAny)); 24Assert.False(ChatToolMode.Auto.Equals(new RequiredChatToolMode(null))); 25Assert.False(ChatToolMode.Auto.Equals(new RequiredChatToolMode("func"))); 26Assert.Equal(ChatToolMode.Auto.GetHashCode(), ChatToolMode.Auto.GetHashCode()); 30Assert.False(ChatToolMode.RequireAny.Equals(ChatToolMode.Auto)); 50string json = JsonSerializer.Serialize(ChatToolMode.Auto, TestJsonSerializerContext.Default.ChatToolMode); 54Assert.Equal(ChatToolMode.Auto, result);