microsoft/teams.net
Publicmirrored fromhttps://github.com/microsoft/teams.netAvailable
Libraries/Microsoft.Teams.AI/Annotations/Prompt.InstructionsAttribute.cs
23lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | using Microsoft.Teams.AI.Templates; |
| 5 | |
| 6 | namespace Microsoft.Teams.AI.Annotations; |
| 7 | |
| 8 | public static partial class Prompt |
| 9 | { |
| 10 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = true)] |
| 11 | public class InstructionsAttribute : Attribute |
| 12 | { |
| 13 | /// <summary> |
| 14 | /// the prompts instructions |
| 15 | /// </summary> |
| 16 | public ITemplate Instructions { get; private set; } |
| 17 | |
| 18 | public InstructionsAttribute(params string[] Instructions) |
| 19 | { |
| 20 | this.Instructions = new StringTemplate(string.Join("\n", Instructions)); |
| 21 | } |
| 22 | } |
| 23 | } |