Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,38 @@ public sealed class CreateMessageRequestParams : RequestParams
/// Gets or sets the maximum number of tokens to generate in the LLM response, as requested by the server.
/// </summary>
/// <remarks>
/// <para>
/// A token is generally a word or part of a word in the text. Setting this value helps control
/// response length and computation time. The client can choose to sample fewer tokens than requested.
/// response length and computation time.
/// </para>
/// <para>
/// The client MUST respect the <see cref="MaxTokens"/> parameter.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot it's ok for the client to send fewer. I'm not sure why you removed the existing comment. Also the MUST shouldn't be capitalized

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 086408a - restored the original comment about client choosing fewer tokens and changed capitalization to lowercase "must"

/// </para>
/// </remarks>
[JsonPropertyName("maxTokens")]
public required int MaxTokens { get; set; }

/// <summary>
/// Gets or sets the messages requested by the server to be included in the prompt.
/// </summary>
/// <remarks>
/// The list of messages in a sampling request SHOULD NOT be retained between separate requests.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot here as well and anywhere sense you do it, don't capitalize with all caps like this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 086408a - changed all RFC 2119 keywords (MUST, SHOULD NOT, MAY) to lowercase throughout the file

/// </remarks>
[JsonPropertyName("messages")]
public IList<SamplingMessage> Messages { get; set; } = [];

/// <summary>
/// Gets or sets optional metadata to pass through to the LLM provider.
/// </summary>
/// <remarks>
/// <para>
/// The format of this metadata is provider-specific and can include model-specific settings or
/// configuration that isn't covered by standard parameters. This allows for passing custom parameters
/// that are specific to certain AI models or providers.
/// </para>
/// <para>
/// The client MAY modify or ignore metadata.
/// </para>
/// </remarks>
[JsonPropertyName("metadata")]
public JsonElement? Metadata { get; set; }
Expand Down Expand Up @@ -90,6 +103,9 @@ public sealed class CreateMessageRequestParams : RequestParams
/// sequence exactly matches one of the provided sequences. Common uses include ending markers like "END", punctuation
/// like ".", or special delimiter sequences like "###".
/// </para>
/// <para>
/// The client MAY modify or ignore stop sequences.
/// </para>
/// </remarks>
[JsonPropertyName("stopSequences")]
public IList<string>? StopSequences { get; set; }
Expand All @@ -106,6 +122,15 @@ public sealed class CreateMessageRequestParams : RequestParams
/// <summary>
/// Gets or sets the temperature to use for sampling, as requested by the server.
/// </summary>
/// <remarks>
/// <para>
/// Temperature controls randomness in model responses. Higher values produce higher randomness,
/// and lower values produce more stable output. The valid range depends on the model provider.
/// </para>
/// <para>
/// The client MAY modify or ignore this value.
/// </para>
/// </remarks>
[JsonPropertyName("temperature")]
public float? Temperature { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public sealed class CreateMessageResult : Result
/// <remarks>
/// Standard values include:
/// <list type="bullet">
/// <item><term>endTurn</term><description>The model naturally completed its response.</description></item>
/// <item><term>endTurn</term><description>The participant is yielding the conversation to the other party.</description></item>
/// <item><term>maxTokens</term><description>The response was truncated due to reaching token limits.</description></item>
/// <item><term>stopSequence</term><description>A specific stop sequence was encountered during generation.</description></item>
/// <item><term>toolUse</term><description>The model wants to use one or more tools.</description></item>
Expand Down
Loading