Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Program>()
Expand All @@ -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(
Expand Down Expand Up @@ -69,6 +68,7 @@ string GetRequired(string key) =>

var chatOptions = new ChatOptions
{
Temperature = 0,
MaxOutputTokens = maxOutputTokens
};

Expand Down
2 changes: 1 addition & 1 deletion Prompts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Comment on lines 26 to +27

Return the next step and a brief task description.
""";
Expand Down