23 references to RequireAny
Microsoft.Extensions.AI.Abstractions (2)
ChatCompletion\ChatToolMode.cs (1)
12/// The predefined values <see cref="Auto" /> and <see cref="RequireAny"/> are provided.
ChatCompletion\RequiredChatToolMode.cs (1)
31/// <see cref="ChatToolMode.RequireAny"/> when any function can be selected.
Microsoft.Extensions.AI.Abstractions.Tests (20)
ChatCompletion\ChatOptionsTests.cs (5)
78options.ToolMode = ChatToolMode.RequireAny; 92Assert.Same(ChatToolMode.RequireAny, options.ToolMode); 107Assert.Same(ChatToolMode.RequireAny, clone.ToolMode); 138options.ToolMode = ChatToolMode.RequireAny; 163Assert.Equal(ChatToolMode.RequireAny, deserialized.ToolMode);
ChatCompletion\ChatToolModeTests.cs (15)
15Assert.Same(ChatToolMode.RequireAny, ChatToolMode.RequireAny); 23Assert.False(ChatToolMode.Auto.Equals(ChatToolMode.RequireAny)); 28Assert.True(ChatToolMode.RequireAny == ChatToolMode.RequireAny); 29Assert.True(ChatToolMode.RequireAny.Equals(ChatToolMode.RequireAny)); 30Assert.False(ChatToolMode.RequireAny.Equals(ChatToolMode.Auto)); 31Assert.False(ChatToolMode.RequireAny.Equals(new RequiredChatToolMode("func"))); 33Assert.True(ChatToolMode.RequireAny.Equals(new RequiredChatToolMode(null))); 34Assert.Equal(ChatToolMode.RequireAny.GetHashCode(), new RequiredChatToolMode(null).GetHashCode()); 35Assert.Equal(ChatToolMode.RequireAny.GetHashCode(), ChatToolMode.RequireAny.GetHashCode()); 60string json = JsonSerializer.Serialize(ChatToolMode.RequireAny, TestJsonSerializerContext.Default.ChatToolMode); 64Assert.Equal(ChatToolMode.RequireAny, result);
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
275ToolMode = ChatToolMode.RequireAny,