microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v2.0.0-preview.5

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.AI/Messages/FunctionMessage.cs

28lines · modecode

1using System.Text.Json;
2using System.Text.Json.Serialization;
3
4namespace Microsoft.Teams.AI.Messages;
5
6public class FunctionMessage : IMessage
7{
8 [JsonPropertyName("role")]
9 [JsonPropertyOrder(0)]
10 public Role Role => Role.Function;
11
12 [JsonPropertyName("content")]
13 [JsonPropertyOrder(1)]
14 public string? Content { get; set; }
15
16 [JsonPropertyName("function_id")]
17 [JsonPropertyOrder(2)]
18 public required string FunctionId { get; set; }
19
20 public override string ToString()
21 {
22 return JsonSerializer.Serialize(this, new JsonSerializerOptions()
23 {
24 WriteIndented = true,
25 DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
26 });
27 }
28}