diff --git a/Program.cs b/Program.cs index 352265f..b81a769 100644 --- a/Program.cs +++ b/Program.cs @@ -9,7 +9,7 @@ using OpenAI; // Secrets come from the .NET user-secrets store and from -// environment variables (env vars win on key collisions). +// environment variables (secrets win on key collisions). IConfiguration config = new ConfigurationBuilder() .AddEnvironmentVariables() .AddUserSecrets() @@ -29,7 +29,6 @@ string GetRequired(string key) => long maxTotalTokens = long.TryParse(config["MAX_TOTAL_TOKENS"], out long configuredMaxTotalTokens) ? configuredMaxTotalTokens : 40000; if (!Uri.TryCreate(openAiApiBase, UriKind.Absolute, out var uri)) { - Console.WriteLine($"Invalid URI: '{openAiApiBase}'"); throw new InvalidOperationException($"Invalid URI: '{openAiApiBase}'"); } var openAIClient = new OpenAIClient( @@ -69,6 +68,7 @@ string GetRequired(string key) => var chatOptions = new ChatOptions { + Temperature = 0, MaxOutputTokens = maxOutputTokens }; diff --git a/Prompts.cs b/Prompts.cs index 837b876..bb4f73e 100644 --- a/Prompts.cs +++ b/Prompts.cs @@ -24,7 +24,7 @@ software developers. Based on the current workflow state provided in the user - If research exists but no draft, choose "author" - If a draft exists and the reviewer said "APPROVED", choose "END" - If the draft needs revision, choose "author" -- If revision_number >= 4, choose "END" +- If revision_number >= 2, choose "END" Return the next step and a brief task description. """;