using System.Collections.Generic; namespace LinkToolAddin.client.prompt; public class DynamicPrompt { public static string GetPrompt(string name,Dictionary args = null) { PromptTemplates promptTemplate = new PromptTemplates(); string template = promptTemplate.GetPrompt(name); if (args == null) { return template; } foreach (KeyValuePair pair in args) { string replaceKey = "{{"+pair.Key+"}}"; template.Replace(replaceKey, pair.Value.ToString()); } return template; } public static Dictionary GetAllPrompts() { PromptTemplates promptTemplate = new PromptTemplates(); Dictionary template = promptTemplate.GetPromptsDict(); return template; } }