microsoft/teams.net

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
fix/msal-cache

Branches

Tags

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

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.AI/Message.cs

41lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4using System.Text.Json.Serialization;
5
6using Microsoft.Teams.Common;
7using Microsoft.Teams.Common.Json;
8
9namespace Microsoft.Teams.AI;
10
11/// <summary>
12/// some message sent to or from the LLM
13/// via a Model
14/// </summary>
15[JsonConverter(typeof(TrueTypeJsonConverter<IMessage>))]
16[Obsolete("Microsoft.Teams.AI is deprecated and will be removed by end of summer 2026.")]
17public interface IMessage
18{
19 /// <summary>
20 /// the role of the message, ie
21 /// who sent the message
22 /// </summary>
23 public Role Role { get; }
24}
25
26[JsonConverter(typeof(JsonConverter<Role>))]
27[Obsolete("Microsoft.Teams.AI is deprecated and will be removed by end of summer 2026.")]
28public class Role(string value) : StringEnum(value)
29{
30 public static readonly Role User = new("user");
31 public bool IsUser => User.Equals(Value);
32
33 public static readonly Role Model = new("model");
34 public bool IsModel => Model.Equals(Value);
35
36 public static readonly Role Developer = new("developer");
37 public bool IsDeveloper => Developer.Equals(Value);
38
39 public static readonly Role Function = new("function");
40 public bool IsFunction => Function.Equals(Value);
41}