mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-30 13:51:53 +08:00
fix: Ignore the Chain-of-Thought in AI response (#952)
- Improve chat response processing to handle thinking patterns using regular expressions. - Migrate server value by removing trailing '/chat/completions' path.
This commit is contained in:
@@ -19,7 +19,15 @@ namespace SourceGit.Models
|
||||
public string Server
|
||||
{
|
||||
get => _server;
|
||||
set => SetProperty(ref _server, value);
|
||||
set
|
||||
{
|
||||
// migrate old server value
|
||||
if (!string.IsNullOrEmpty(value) && value.EndsWith("/chat/completions", StringComparison.Ordinal))
|
||||
{
|
||||
value = value.Substring(0, value.Length - "/chat/completions".Length);
|
||||
}
|
||||
SetProperty(ref _server, value);
|
||||
}
|
||||
}
|
||||
|
||||
public string ApiKey
|
||||
|
||||
Reference in New Issue
Block a user