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)
78
options.ToolMode = ChatToolMode.
RequireAny
;
92
Assert.Same(ChatToolMode.
RequireAny
, options.ToolMode);
107
Assert.Same(ChatToolMode.
RequireAny
, clone.ToolMode);
138
options.ToolMode = ChatToolMode.
RequireAny
;
163
Assert.Equal(ChatToolMode.
RequireAny
, deserialized.ToolMode);
ChatCompletion\ChatToolModeTests.cs (15)
15
Assert.Same(ChatToolMode.
RequireAny
, ChatToolMode.
RequireAny
);
23
Assert.False(ChatToolMode.Auto.Equals(ChatToolMode.
RequireAny
));
28
Assert.True(ChatToolMode.
RequireAny
== ChatToolMode.
RequireAny
);
29
Assert.True(ChatToolMode.
RequireAny
.Equals(ChatToolMode.
RequireAny
));
30
Assert.False(ChatToolMode.
RequireAny
.Equals(ChatToolMode.Auto));
31
Assert.False(ChatToolMode.
RequireAny
.Equals(new RequiredChatToolMode("func")));
33
Assert.True(ChatToolMode.
RequireAny
.Equals(new RequiredChatToolMode(null)));
34
Assert.Equal(ChatToolMode.
RequireAny
.GetHashCode(), new RequiredChatToolMode(null).GetHashCode());
35
Assert.Equal(ChatToolMode.
RequireAny
.GetHashCode(), ChatToolMode.
RequireAny
.GetHashCode());
60
string json = JsonSerializer.Serialize(ChatToolMode.
RequireAny
, TestJsonSerializerContext.Default.ChatToolMode);
64
Assert.Equal(ChatToolMode.
RequireAny
, result);
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
275
ToolMode = ChatToolMode.
RequireAny
,