enhance: use user instead of system to supports OpenAI's o1-preview and o1-mini model (#725)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-21 09:31:38 +08:00
parent b3ebd84af5
commit 142987f73d
No known key found for this signature in database

View file

@ -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) };