mirror of
https://github.com/microsoft/autogen.git
synced 2025-11-04 19:59:51 +00:00
23 lines
996 B
C#
23 lines
996 B
C#
namespace Microsoft.SKDevTeam;
|
|
|
|
public class SemanticFunctionConfig
|
|
{
|
|
public required string PromptTemplate { get; set; }
|
|
public required string Name { get; set; }
|
|
public required string SkillName { get; set; }
|
|
public required 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; }
|
|
public static SemanticFunctionConfig ForSkillAndFunction(string skillName, string functionName) =>
|
|
(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}")
|
|
};
|
|
} |