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
Rename IChatClient members and corresponding types
After great feedback on usage of the APIs, re-reviewing the state of the ecosystem, and length discussions, we're renaming the members of IChatClient to destress the notion of "completions" and instead focus just on getting back a {streaming} response.
/// <summary>Sends a user chat text message to the model and returns the response messages.</summary>
30
+
/// <summary>Sends a user chat text message and returns the response messages.</summary>
31
31
/// <param name="client">The chat client.</param>
32
32
/// <param name="chatMessage">The text content for the chat message to send.</param>
33
33
/// <param name="options">The chat options to configure the request.</param>
34
34
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
35
35
/// <returns>The response messages generated by the client.</returns>
36
-
publicstaticTask<ChatCompletion>CompleteAsync(
36
+
publicstaticTask<ChatResponse>GetResponseAsync(
37
37
thisIChatClientclient,
38
38
stringchatMessage,
39
39
ChatOptions?options=null,
@@ -42,16 +42,16 @@ public static Task<ChatCompletion> CompleteAsync(
/// <summary>Sends a chat message to the model and returns the response messages.</summary>
48
+
/// <summary>Sends a chat message and returns the response messages.</summary>
49
49
/// <param name="client">The chat client.</param>
50
50
/// <param name="chatMessage">The chat message to send.</param>
51
51
/// <param name="options">The chat options to configure the request.</param>
52
52
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
53
53
/// <returns>The response messages generated by the client.</returns>
54
-
publicstaticTask<ChatCompletion>CompleteAsync(
54
+
publicstaticTask<ChatResponse>GetResponseAsync(
55
55
thisIChatClientclient,
56
56
ChatMessagechatMessage,
57
57
ChatOptions?options=null,
@@ -60,16 +60,16 @@ public static Task<ChatCompletion> CompleteAsync(
/// <summary>Sends a user chat text message to the model and streams the response messages.</summary>
66
+
/// <summary>Sends a user chat text message and streams the response messages.</summary>
67
67
/// <param name="client">The chat client.</param>
68
68
/// <param name="chatMessage">The text content for the chat message to send.</param>
69
69
/// <param name="options">The chat options to configure the request.</param>
70
70
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
71
71
/// <returns>The response messages generated by the client.</returns>
/// <summary>Sends a chat message to the model and streams the response messages.</summary>
84
+
/// <summary>Sends a chat message and streams the response messages.</summary>
85
85
/// <param name="client">The chat client.</param>
86
86
/// <param name="chatMessage">The chat message to send.</param>
87
87
/// <param name="options">The chat options to configure the request.</param>
88
88
/// <param name="cancellationToken">The <see cref="CancellationToken"/> to monitor for cancellation requests. The default is <see cref="CancellationToken.None"/>.</param>
89
89
/// <returns>The response messages generated by the client.</returns>
@@ -117,14 +117,14 @@ public override string ToString()
117
117
returnsb.ToString();
118
118
}
119
119
120
-
/// <summary>Creates an array of <see cref="StreamingChatCompletionUpdate" /> instances that represent this <see cref="ChatCompletion" />.</summary>
121
-
/// <returns>An array of <see cref="StreamingChatCompletionUpdate" /> instances that may be used to represent this <see cref="ChatCompletion" />.</returns>
0 commit comments