Skip to content

Commit 3f1f59c

Browse files
Docs improvements (#5613)
* docs improvements * small addition * Apply suggestions from code review Co-authored-by: Stephen Toub <[email protected]> --------- Co-authored-by: Stephen Toub <[email protected]>
1 parent c86b7ea commit 3f1f59c

File tree

49 files changed

+204
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+204
-191
lines changed

src/Generators/Shared/RoslynExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ internal static class RoslynExtensions
3838
/// </list>
3939
/// </summary>
4040
/// <param name="compilation">The <see cref="Compilation"/> to consider for analysis.</param>
41-
/// <param name="fullyQualifiedMetadataName">The fully-qualified metadata type name to find.</param>
41+
/// <param name="fullyQualifiedMetadataName">The fully qualified metadata type name to find.</param>
4242
/// <returns>The symbol to use for code analysis; otherwise, <see langword="null"/>.</returns>
4343
// Copied from: https://github.com/dotnet/roslyn/blob/af7b0ebe2b0ed5c335a928626c25620566372dd1/src/Workspaces/SharedUtilitiesAndExtensions/Compiler/Core/Extensions/CompilationExtensions.cs
4444
public static INamedTypeSymbol? GetBestTypeByMetadataName(this Compilation compilation, string fullyQualifiedMetadataName)
@@ -94,7 +94,7 @@ internal static class RoslynExtensions
9494

9595
/// <summary>
9696
/// A thin wrapper over <see cref="GetBestTypeByMetadataName(Compilation, string)"/>,
97-
/// but taking the type itself rather than the fully-qualified metadata type name.
97+
/// but taking the type itself rather than the fully qualified metadata type name.
9898
/// </summary>
9999
/// <param name="compilation">The <see cref="Compilation"/> to consider for analysis.</param>
100100
/// <param name="type">The type to find.</param>

src/Libraries/Microsoft.Extensions.AI.Abstractions/AITool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace Microsoft.Extensions.AI;
55

6-
/// <summary>Represents a tool that may be specified to an AI service.</summary>
6+
/// <summary>Represents a tool that can be specified to an AI service.</summary>
77
public class AITool
88
{
99
/// <summary>Initializes a new instance of the <see cref="AITool"/> class.</summary>

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatClientExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ public static class ChatClientExtensions
1414
/// <summary>Asks the <see cref="IChatClient"/> for an object of type <typeparamref name="TService"/>.</summary>
1515
/// <typeparam name="TService">The type of the object to be retrieved.</typeparam>
1616
/// <param name="client">The client.</param>
17-
/// <param name="serviceKey">An optional key that may be used to help identify the target service.</param>
17+
/// <param name="serviceKey">An optional key that can be used to help identify the target service.</param>
1818
/// <returns>The found object, otherwise <see langword="null"/>.</returns>
1919
/// <remarks>
20-
/// The purpose of this method is to allow for the retrieval of strongly-typed services that may be provided by the <see cref="IChatClient"/>,
20+
/// The purpose of this method is to allow for the retrieval of strongly typed services that may be provided by the <see cref="IChatClient"/>,
2121
/// including itself or any services it might be wrapping.
2222
/// </remarks>
2323
public static TService? GetService<TService>(this IChatClient client, object? serviceKey = null)

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatClientMetadata.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class ChatClientMetadata
1111
/// <summary>Initializes a new instance of the <see cref="ChatClientMetadata"/> class.</summary>
1212
/// <param name="providerName">The name of the chat completion provider, if applicable.</param>
1313
/// <param name="providerUri">The URL for accessing the chat completion provider, if applicable.</param>
14-
/// <param name="modelId">The id of the chat completion model used, if applicable.</param>
14+
/// <param name="modelId">The ID of the chat completion model used, if applicable.</param>
1515
public ChatClientMetadata(string? providerName = null, Uri? providerUri = null, string? modelId = null)
1616
{
1717
ModelId = modelId;
@@ -25,7 +25,7 @@ public ChatClientMetadata(string? providerName = null, Uri? providerUri = null,
2525
/// <summary>Gets the URL for accessing the chat completion provider.</summary>
2626
public Uri? ProviderUri { get; }
2727

28-
/// <summary>Gets the id of the model used by this chat completion provider.</summary>
29-
/// <remarks>This may be null if either the name is unknown or there are multiple possible models associated with this instance.</remarks>
28+
/// <summary>Gets the ID of the model used by this chat completion provider.</summary>
29+
/// <remarks>This value can be null if either the name is unknown or there are multiple possible models associated with this instance.</remarks>
3030
public string? ModelId { get; }
3131
}

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatCompletion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public IList<ChatMessage> Choices
4040
/// <summary>Gets the chat completion message.</summary>
4141
/// <remarks>
4242
/// If there are multiple choices, this property returns the first choice.
43-
/// If <see cref="Choices"/> is empty, this will throw. Use <see cref="Choices"/> to access all choices directly."/>.
43+
/// If <see cref="Choices"/> is empty, this property will throw. Use <see cref="Choices"/> to access all choices directly.
4444
/// </remarks>
4545
[JsonIgnore]
4646
public ChatMessage Message

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatFinishReason.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ public ChatFinishReason(string value)
4242
/// <summary>
4343
/// Compares two instances.
4444
/// </summary>
45-
/// <param name="left">Left argument of the comparison.</param>
46-
/// <param name="right">Right argument of the comparison.</param>
47-
/// <returns><see langword="true" /> when equal, <see langword="false" /> otherwise.</returns>
45+
/// <param name="left">The left argument of the comparison.</param>
46+
/// <param name="right">The right argument of the comparison.</param>
47+
/// <returns><see langword="true" /> if the two instances are equal; <see langword="false" /> if they aren't equal.</returns>
4848
public static bool operator ==(ChatFinishReason left, ChatFinishReason right)
4949
{
5050
return left.Equals(right);
@@ -53,9 +53,9 @@ public ChatFinishReason(string value)
5353
/// <summary>
5454
/// Compares two instances.
5555
/// </summary>
56-
/// <param name="left">Left argument of the comparison.</param>
57-
/// <param name="right">Right argument of the comparison.</param>
58-
/// <returns><see langword="true" /> when not equal, <see langword="false" /> otherwise.</returns>
56+
/// <param name="left">The left argument of the comparison.</param>
57+
/// <param name="right">The right argument of the comparison.</param>
58+
/// <returns><see langword="true" /> if the two instances aren't equal; <see langword="false" /> if they are equal.</returns>
5959
public static bool operator !=(ChatFinishReason left, ChatFinishReason right)
6060
{
6161
return !(left == right);

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public string? AuthorName
5555
/// </summary>
5656
/// <remarks>
5757
/// If there is no <see cref="TextContent"/> instance in <see cref="Contents" />, then the getter returns <see langword="null" />,
58-
/// and the setter will add a new <see cref="TextContent"/> instance with the provided value.
58+
/// and the setter adds a new <see cref="TextContent"/> instance with the provided value.
5959
/// </remarks>
6060
[JsonIgnore]
6161
public string? Text

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ public class ChatOptions
3535
/// </summary>
3636
/// <remarks>
3737
/// If null, no response format is specified and the client will use its default.
38-
/// This may be set to <see cref="ChatResponseFormat.Text"/> to specify that the response should be unstructured text,
38+
/// This property can be set to <see cref="ChatResponseFormat.Text"/> to specify that the response should be unstructured text,
3939
/// to <see cref="ChatResponseFormat.Json"/> to specify that the response should be structured JSON data, or
4040
/// an instance of <see cref="ChatResponseFormatJson"/> constructed with a specific JSON schema to request that the
4141
/// response be structured JSON data according to that schema. It is up to the client implementation if or how
4242
/// to honor the request. If the client implementation doesn't recognize the specific kind of <see cref="ChatResponseFormat"/>,
43-
/// it may be ignored.
43+
/// it can be ignored.
4444
/// </remarks>
4545
public ChatResponseFormat? ResponseFormat { get; set; }
4646

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatResponseFormat.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private protected ChatResponseFormat()
2929

3030
/// <summary>Creates a <see cref="ChatResponseFormatJson"/> representing structured JSON data with the specified schema.</summary>
3131
/// <param name="schema">The JSON schema.</param>
32-
/// <param name="schemaName">An optional name of the schema, e.g. if the schema represents a particular class, this could be the name of the class.</param>
32+
/// <param name="schemaName">An optional name of the schema. For example, if the schema represents a particular class, this could be the name of the class.</param>
3333
/// <param name="schemaDescription">An optional description of the schema.</param>
3434
/// <returns>The <see cref="ChatResponseFormatJson"/> instance.</returns>
3535
public static ChatResponseFormatJson ForJsonSchema(

src/Libraries/Microsoft.Extensions.AI.Abstractions/ChatCompletion/ChatRole.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace Microsoft.Extensions.AI;
3232
/// Gets the value associated with this <see cref="ChatRole"/>.
3333
/// </summary>
3434
/// <remarks>
35-
/// The value is what will be serialized into the "role" message field of the Chat Message format.
35+
/// The value will be serialized into the "role" message field of the Chat Message format.
3636
/// </remarks>
3737
public string Value { get; }
3838

@@ -50,9 +50,9 @@ public ChatRole(string value)
5050
/// Returns a value indicating whether two <see cref="ChatRole"/> instances are equivalent, as determined by a
5151
/// case-insensitive comparison of their values.
5252
/// </summary>
53-
/// <param name="left"> the first <see cref="ChatRole"/> instance to compare.</param>
54-
/// <param name="right"> the second <see cref="ChatRole"/> instance to compare.</param>
55-
/// <returns> true if left and right are both null or have equivalent values; false otherwise. </returns>
53+
/// <param name="left">The first <see cref="ChatRole"/> instance to compare.</param>
54+
/// <param name="right">The second <see cref="ChatRole"/> instance to compare.</param>
55+
/// <returns><see langword="true"/> if left and right are both null or have equivalent values; otherwise, <see langword="false"/>.</returns>
5656
public static bool operator ==(ChatRole left, ChatRole right)
5757
{
5858
return left.Equals(right);
@@ -62,9 +62,9 @@ public ChatRole(string value)
6262
/// Returns a value indicating whether two <see cref="ChatRole"/> instances are not equivalent, as determined by a
6363
/// case-insensitive comparison of their values.
6464
/// </summary>
65-
/// <param name="left"> the first <see cref="ChatRole"/> instance to compare. </param>
66-
/// <param name="right"> the second <see cref="ChatRole"/> instance to compare. </param>
67-
/// <returns> false if left and right are both null or have equivalent values; true otherwise. </returns>
65+
/// <param name="left">The first <see cref="ChatRole"/> instance to compare. </param>
66+
/// <param name="right">The second <see cref="ChatRole"/> instance to compare. </param>
67+
/// <returns><see langword="true"/> if left and right have different values; <see langword="false"/> if they have equivalent values or are both null.</returns>
6868
public static bool operator !=(ChatRole left, ChatRole right)
6969
{
7070
return !(left == right);

0 commit comments

Comments
 (0)