forked from a2aproject/a2a-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMessageSendParams.cs
More file actions
63 lines (55 loc) · 1.74 KB
/
MessageSendParams.cs
File metadata and controls
63 lines (55 loc) · 1.74 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System.Text.Json;
using System.Text.Json.Serialization;
namespace A2A;
/// <summary>
/// Parameters for sending a message request to an agent.
/// </summary>
/// <remarks>
/// Sent by the client to the agent as a request. May create, continue or restart a task.
/// </remarks>
public class MessageSendParams
{
/// <summary>
/// The message being sent to the server.
/// </summary>
[JsonPropertyName("message")]
[JsonRequired]
public Message Message { get; set; } = new Message();
/// <summary>
/// Send message configuration.
/// </summary>
[JsonPropertyName("configuration")]
public MessageSendConfiguration? Configuration { get; set; }
/// <summary>
/// Extension metadata.
/// </summary>
[JsonPropertyName("metadata")]
public Dictionary<string, JsonElement>? Metadata { get; set; }
}
/// <summary>
/// Configuration for the send message request.
/// </summary>
public class MessageSendConfiguration
{
/// <summary>
/// Accepted output modalities by the client.
/// </summary>
[JsonPropertyName("acceptedOutputModes")]
[JsonRequired]
public List<string> AcceptedOutputModes { get; set; } = [];
/// <summary>
/// Where the server should send notifications when disconnected.
/// </summary>
[JsonPropertyName("pushNotification")]
public PushNotificationConfig? PushNotification { get; set; }
/// <summary>
/// Number of recent messages to be retrieved.
/// </summary>
[JsonPropertyName("historyLength")]
public int? HistoryLength { get; set; }
/// <summary>
/// If the server should treat the client as a blocking request.
/// </summary>
[JsonPropertyName("blocking")]
public bool Blocking { get; set; } = false;
}