mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
fix: only o1-mini
does not supports system
prompt
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
6a80e54b47
commit
1f0dd15192
1 changed files with 1 additions and 7 deletions
|
@ -98,7 +98,7 @@ namespace SourceGit.Models
|
|||
try
|
||||
{
|
||||
var updates = client.CompleteChatStreaming([
|
||||
ShouldUseDeveloperPrompt() ? new DeveloperChatMessage(prompt) : new SystemChatMessage(prompt),
|
||||
_model.Equals("o1-mini", StringComparison.Ordinal) ? new UserChatMessage(prompt) : new SystemChatMessage(prompt),
|
||||
new UserChatMessage(question),
|
||||
], null, cancellation);
|
||||
|
||||
|
@ -115,12 +115,6 @@ namespace SourceGit.Models
|
|||
}
|
||||
}
|
||||
|
||||
private bool ShouldUseDeveloperPrompt()
|
||||
{
|
||||
return _model.Equals("o1", StringComparison.Ordinal) ||
|
||||
_model.Equals("o1-mini", StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
private string _name;
|
||||
private string _server;
|
||||
private string _apiKey;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue