forked from modelcontextprotocol/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompletion.cs
More file actions
39 lines (35 loc) · 1.47 KB
/
Completion.cs
File metadata and controls
39 lines (35 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using System.Text.Json.Serialization;
namespace ModelContextProtocol.Protocol;
/// <summary>
/// Represents a completion object in the server's response to a <see cref="RequestMethods.CompletionComplete"/> request.
/// </summary>
/// <remarks>
/// See the <see href="https://github.com/modelcontextprotocol/specification/blob/main/schema/">schema</see> for details.
/// </remarks>
public class Completion
{
/// <summary>
/// Gets or sets an array of completion values (auto-suggestions) for the requested input.
/// </summary>
/// <remarks>
/// This collection contains the actual text strings to be presented to users as completion suggestions.
/// The array will be empty if no suggestions are available for the current input.
/// Per the specification, this should not exceed 100 items.
/// </remarks>
[JsonPropertyName("values")]
public string[] Values { get; set; } = [];
/// <summary>
/// Gets or sets the total number of completion options available.
/// </summary>
/// <remarks>
/// This can exceed the number of values actually sent in the response.
/// </remarks>
[JsonPropertyName("total")]
public int? Total { get; set; }
/// <summary>
/// Gets or sets an indicator as to whether there are additional completion options beyond
/// those provided in the current response, even if the exact total is unknown.
/// </summary>
[JsonPropertyName("hasMore")]
public bool? HasMore { get; set; }
}