You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>Sends chat messages and returns the response.</summary>
@@ -32,6 +33,7 @@ public interface IChatClient : IDisposable
32
33
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
33
34
/// <returns>The response messages generated by the client.</returns>
34
35
/// <exception cref="ArgumentNullException"><paramref name="messages"/> is <see langword="null"/>.</exception>
36
+
/// <related type="Article" href="https://learn.microsoft.com/dotnet/ai/microsoft-extensions-ai#request-a-chat-response">Request a chat response.</related>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
44
46
/// <returns>The response messages generated by the client.</returns>
45
47
/// <exception cref="ArgumentNullException"><paramref name="messages"/> is <see langword="null"/>.</exception>
48
+
/// <related type="Article" href="https://learn.microsoft.com/dotnet/ai/microsoft-extensions-ai#request-a-streaming-chat-response">Request a streaming chat response.</related>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
34
35
/// <returns>The generated embeddings.</returns>
35
36
/// <exception cref="ArgumentNullException"><paramref name="values"/> is <see langword="null"/>.</exception>
/// Provides extension methods on <see cref="IChatClient"/> that simplify working with structured output.
20
20
/// </summary>
21
+
/// <related type="Article" href="https://learn.microsoft.com/dotnet/ai/quickstarts/structured-output">Request a response with structured output.</related>
@@ -33,9 +34,8 @@ public static class ChatClientStructuredOutputExtensions
33
34
/// <param name="messages">The chat content to send.</param>
34
35
/// <param name="options">The chat options to configure the request.</param>
35
36
/// <param name="useJsonSchema">
36
-
/// Optionally specifies whether to set a JSON schema on the <see cref="ChatResponseFormat"/>.
37
-
/// This improves reliability if the underlying model supports native structured output with a schema, but may cause an error if the model does not support it.
38
-
/// If not specified, the default value is <see langword="true" />.
37
+
/// <see langword="true" /> to set a JSON schema on the <see cref="ChatResponseFormat"/>; otherwise, <see langword="false" />. The default is <see langword="true" />.
38
+
/// Using a JSON schema improves reliability if the underlying model supports native structured output with a schema, but might cause an error if the model does not support it.
39
39
/// </param>
40
40
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
41
41
/// <returns>The response messages generated by the client.</returns>
@@ -53,14 +53,15 @@ public static Task<ChatResponse<T>> GetResponseAsync<T>(
53
53
/// <param name="chatMessage">The text content for the chat message to send.</param>
54
54
/// <param name="options">The chat options to configure the request.</param>
55
55
/// <param name="useJsonSchema">
56
-
/// Optionally specifies whether to set a JSON schema on the <see cref="ChatResponseFormat"/>.
57
-
/// This improves reliability if the underlying model supports native structured output with a schema, but may cause an error if the model does not support it.
56
+
/// <see langword="true" /> to set a JSON schema on the <see cref="ChatResponseFormat"/>; otherwise, <see langword="false" />.
57
+
/// Using a JSON schema improves reliability if the underlying model supports native structured output with a schema, but might cause an error if the model does not support it.
58
58
/// If not specified, the default value is determined by the implementation.
59
59
/// If a specific value is required, it must be specified by the caller.
60
60
/// </param>
61
61
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
62
62
/// <returns>The response messages generated by the client.</returns>
63
63
/// <typeparam name="T">The type of structured output to request.</typeparam>
64
+
/// <related type="Article" href="https://learn.microsoft.com/dotnet/ai/quickstarts/structured-output">Request a response with structured output.</related>
@@ -74,9 +75,8 @@ public static Task<ChatResponse<T>> GetResponseAsync<T>(
74
75
/// <param name="chatMessage">The chat message to send.</param>
75
76
/// <param name="options">The chat options to configure the request.</param>
76
77
/// <param name="useJsonSchema">
77
-
/// Optionally specifies whether to set a JSON schema on the <see cref="ChatResponseFormat"/>.
78
-
/// This improves reliability if the underlying model supports native structured output with a schema, but may cause an error if the model does not support it.
79
-
/// If not specified, the default value is <see langword="true" />.
78
+
/// <see langword="true" /> to set a JSON schema on the <see cref="ChatResponseFormat"/>; otherwise, <see langword="false" />. The default is <see langword="true" />.
79
+
/// Using a JSON schema improves reliability if the underlying model supports native structured output with a schema, but might cause an error if the model does not support it.
80
80
/// </param>
81
81
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
82
82
/// <returns>The response messages generated by the client.</returns>
@@ -95,9 +95,8 @@ public static Task<ChatResponse<T>> GetResponseAsync<T>(
95
95
/// <param name="serializerOptions">The JSON serialization options to use.</param>
96
96
/// <param name="options">The chat options to configure the request.</param>
97
97
/// <param name="useJsonSchema">
98
-
/// Optionally specifies whether to set a JSON schema on the <see cref="ChatResponseFormat"/>.
99
-
/// This improves reliability if the underlying model supports native structured output with a schema, but may cause an error if the model does not support it.
100
-
/// If not specified, the default value is <see langword="true" />.
98
+
/// <see langword="true" /> to set a JSON schema on the <see cref="ChatResponseFormat"/>; otherwise, <see langword="false" />. The default is <see langword="true" />.
99
+
/// Using a JSON schema improves reliability if the underlying model supports native structured output with a schema, but might cause an error if the model does not support it.
101
100
/// </param>
102
101
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
103
102
/// <returns>The response messages generated by the client.</returns>
@@ -117,9 +116,8 @@ public static Task<ChatResponse<T>> GetResponseAsync<T>(
117
116
/// <param name="serializerOptions">The JSON serialization options to use.</param>
118
117
/// <param name="options">The chat options to configure the request.</param>
119
118
/// <param name="useJsonSchema">
120
-
/// Optionally specifies whether to set a JSON schema on the <see cref="ChatResponseFormat"/>.
121
-
/// This improves reliability if the underlying model supports native structured output with a schema, but may cause an error if the model does not support it.
122
-
/// If not specified, the default value is <see langword="true" />.
119
+
/// <see langword="true" /> to set a JSON schema on the <see cref="ChatResponseFormat"/>; otherwise, <see langword="false" />. The default is <see langword="true" />.
120
+
/// Using a JSON schema improves reliability if the underlying model supports native structured output with a schema, but might cause an error if the model does not support it.
123
121
/// </param>
124
122
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
125
123
/// <returns>The response messages generated by the client.</returns>
@@ -139,16 +137,13 @@ public static Task<ChatResponse<T>> GetResponseAsync<T>(
139
137
/// <param name="serializerOptions">The JSON serialization options to use.</param>
140
138
/// <param name="options">The chat options to configure the request.</param>
141
139
/// <param name="useJsonSchema">
142
-
/// Optionally specifies whether to set a JSON schema on the <see cref="ChatResponseFormat"/>.
143
-
/// This improves reliability if the underlying model supports native structured output with a schema, but may cause an error if the model does not support it.
144
-
/// If not specified, the default value is <see langword="true" />.
140
+
/// <see langword="true" /> to set a JSON schema on the <see cref="ChatResponseFormat"/>; otherwise, <see langword="false" />. The default is <see langword="true" />.
141
+
/// Using a JSON schema improves reliability if the underlying model supports native structured output with a schema, but might cause an error if the model does not support it.
145
142
/// </param>
146
143
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
147
144
/// <returns>The response messages generated by the client.</returns>
148
145
/// <typeparam name="T">The type of structured output to request.</typeparam>
149
-
/// <exception cref="ArgumentNullException"><paramref name="chatClient"/> is <see langword="null"/>.</exception>
150
-
/// <exception cref="ArgumentNullException"><paramref name="messages"/> is <see langword="null"/>.</exception>
151
-
/// <exception cref="ArgumentNullException"><paramref name="serializerOptions"/> is <see langword="null"/>.</exception>
146
+
/// <exception cref="ArgumentNullException"><paramref name="chatClient"/> or <paramref name="messages"/> or <paramref name="serializerOptions"/> is <see langword="null"/>.</exception>
0 commit comments