2023-06-09 17:10:41 +02:00
|
|
|
namespace skills;
|
2023-06-09 21:05:01 +02:00
|
|
|
|
2023-06-09 17:10:41 +02:00
|
|
|
public class SemanticFunctionConfig
|
|
|
|
|
{
|
|
|
|
|
public string PromptTemplate { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string SkillName { get; set; }
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
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; }
|
2023-06-09 21:38:21 +02:00
|
|
|
public static SemanticFunctionConfig ForSkillAndFunction(string skillName, string functionName) =>
|
2023-06-09 21:05:01 +02:00
|
|
|
(skillName, functionName) switch
|
|
|
|
|
{
|
|
|
|
|
(nameof(PM), nameof(PM.BootstrapProject)) => PM.BootstrapProject,
|
|
|
|
|
(nameof(PM), nameof(PM.Readme)) => PM.Readme,
|
|
|
|
|
(nameof(DevLead), nameof(DevLead.Plan)) => DevLead.Plan,
|
|
|
|
|
(nameof(Developer), nameof(Developer.Implement)) => Developer.Implement,
|
2023-06-16 19:22:55 +00:00
|
|
|
(nameof(Developer), nameof(Developer.Improve)) => Developer.Improve,
|
2023-06-09 21:05:01 +02:00
|
|
|
_ => throw new ArgumentException($"Unable to find {skillName}.{functionName}")
|
|
|
|
|
};
|
2023-06-09 17:10:41 +02:00
|
|
|
}
|