2024-03-21 20:52:05 +01:00
|
|
|
namespace Microsoft.SKDevTeam;
|
|
|
|
|
|
|
|
|
|
public class SemanticFunctionConfig
|
|
|
|
|
{
|
2024-06-19 17:25:18 -07:00
|
|
|
public required string PromptTemplate { get; set; }
|
|
|
|
|
public required string Name { get; set; }
|
|
|
|
|
public required string SkillName { get; set; }
|
|
|
|
|
public required string Description { get; set; }
|
2024-03-21 20:52:05 +01:00
|
|
|
public int MaxTokens { get; set; }
|
|
|
|
|
public double Temperature { get; set; }
|
|
|
|
|
public double TopP { get; set; }
|
|
|
|
|
public double PPenalty { get; set; }
|
|
|
|
|
public double FPenalty { get; set; }
|
2024-06-19 17:25:18 -07:00
|
|
|
public static SemanticFunctionConfig ForSkillAndFunction(string skillName, string functionName) =>
|
2024-03-21 20:52:05 +01:00
|
|
|
(skillName, functionName) switch
|
|
|
|
|
{
|
|
|
|
|
(nameof(PM), nameof(PM.Readme)) => PM.Readme,
|
|
|
|
|
(nameof(DevLead), nameof(DevLead.Plan)) => DevLead.Plan,
|
|
|
|
|
(nameof(Developer), nameof(Developer.Implement)) => Developer.Implement,
|
|
|
|
|
(nameof(Developer), nameof(Developer.Improve)) => Developer.Improve,
|
|
|
|
|
_ => throw new ArgumentException($"Unable to find {skillName}.{functionName}")
|
|
|
|
|
};
|
|
|
|
|
}
|