microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
copilot/update-sample-to-blazor

Branches

Tags

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

Clone

HTTPS

Download ZIP

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

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