microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
fix/issue-274-skipauth-unauthorized

Branches

Tags

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

Clone

HTTPS

Download ZIP

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

31lines · 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 FunctionMessage : IMessage
10{
11 [JsonPropertyName("role")]
12 [JsonPropertyOrder(0)]
13 public Role Role => Role.Function;
14
15 [JsonPropertyName("content")]
16 [JsonPropertyOrder(1)]
17 public string? Content { get; set; }
18
19 [JsonPropertyName("function_id")]
20 [JsonPropertyOrder(2)]
21 public required string FunctionId { get; set; }
22
23 public override string ToString()
24 {
25 return JsonSerializer.Serialize(this, new JsonSerializerOptions()
26 {
27 WriteIndented = true,
28 DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull
29 });
30 }
31}