From 142987f73d19c2878b15807889af3427df6dbb48 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 21 Nov 2024 09:31:38 +0800 Subject: [PATCH] enhance: use `user` instead of `system` to supports OpenAI's o1-preview and o1-mini model (#725) Signed-off-by: leo --- src/Models/OpenAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/OpenAI.cs b/src/Models/OpenAI.cs index 58f26792..516a9423 100644 --- a/src/Models/OpenAI.cs +++ b/src/Models/OpenAI.cs @@ -150,7 +150,7 @@ namespace SourceGit.Models public OpenAIChatResponse Chat(string prompt, string question, CancellationToken cancellation) { var chat = new OpenAIChatRequest() { Model = Model }; - chat.AddMessage("system", prompt); + chat.AddMessage("user", prompt); chat.AddMessage("user", question); var client = new HttpClient() { Timeout = TimeSpan.FromSeconds(60) };