22 references to Auto
Microsoft.Extensions.AI (2)
ChatCompletion\FunctionInvokingChatClient.cs (2)
274
options.ToolMode = ChatToolMode.
Auto
;
380
options.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)
54
public 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)
26
Assert.Same(ChatToolMode.
Auto
, options.ToolMode);
41
Assert.Same(ChatToolMode.
Auto
, clone.ToolMode);
ChatCompletion\ChatToolModeTests.cs (14)
14
Assert.Same(ChatToolMode.
Auto
, ChatToolMode.
Auto
);
21
Assert.True(ChatToolMode.
Auto
== ChatToolMode.
Auto
);
22
Assert.True(ChatToolMode.
Auto
.Equals(ChatToolMode.
Auto
));
23
Assert.False(ChatToolMode.
Auto
.Equals(ChatToolMode.RequireAny));
24
Assert.False(ChatToolMode.
Auto
.Equals(new RequiredChatToolMode(null)));
25
Assert.False(ChatToolMode.
Auto
.Equals(new RequiredChatToolMode("func")));
26
Assert.Equal(ChatToolMode.
Auto
.GetHashCode(), ChatToolMode.
Auto
.GetHashCode());
30
Assert.False(ChatToolMode.RequireAny.Equals(ChatToolMode.
Auto
));
50
string json = JsonSerializer.Serialize(ChatToolMode.
Auto
, TestJsonSerializerContext.Default.ChatToolMode);
54
Assert.Equal(ChatToolMode.
Auto
, result);