microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
release/v2

Branches

Tags

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

Clone

HTTPS

Download ZIP

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

33lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4using System.Text.Json;
5using System.Text.Json.Serialization;
6
7namespace Microsoft.Teams.AI.Messages;
8
9public class DeveloperMessage : IMessage
10{
11 [JsonPropertyName("role")]
12 [JsonPropertyOrder(0)]
13 public Role Role => Role.Developer;
14
15 [JsonPropertyName("content")]
16 [JsonPropertyOrder(1)]
17 public string Content { get; set; }
18
19 [JsonConstructor]
20 public DeveloperMessage(string content)
21 {
22 Content = content;
23 }
24
25 public override string ToString()
26 {
27 return JsonSerializer.Serialize(this, new JsonSerializerOptions()
28 {
29 WriteIndented = true,
30 DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
31 });
32 }
33}