Added an analyzer which keeps line breaks LF on every system (#1193)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-11 19:30:00 +01:00
1 parent b1c1f13993
commit 65d50de033
96 files changed
+741 -393

No files matched your search

@@ -47,7 +47,7 @@ public sealed class AnthropicToolCallingAdapter(Model chatModel, IList<IMessageB
Messages = [..baseMessages, ..this.internalMessages],
System = finalResponseInstruction is null
? systemPrompt
: $"{systemPrompt}{Environment.NewLine}{Environment.NewLine}{finalResponseInstruction}",
: $"{systemPrompt}\n\n{finalResponseInstruction}",
MaxTokens = maxTokens,
Stream = true,
@@ -47,7 +47,7 @@ public sealed class ChatCompletionToolCallingAdapter<TRequest>(
var requestSystemPrompt = finalResponseInstruction is null
? systemPrompt : systemPrompt with
{
Content = $"{systemPrompt.Content}{Environment.NewLine}{Environment.NewLine}{finalResponseInstruction}",
Content = $"{systemPrompt.Content}\n\n{finalResponseInstruction}",
};
ChatCompletionAPIRequest requestDtoBase = await requestFactory(requestSystemPrompt, apiParameters, includeTools ? providerTools : null);
@@ -37,7 +37,7 @@ public sealed class ResponsesToolCallingAdapter(Model chatModel, IList<object> b
{
requestInput[0] = systemPrompt with
{
Content = $"{systemPrompt.Content}{Environment.NewLine}{Environment.NewLine}{finalResponseInstruction}",
Content = $"{systemPrompt.Content}\n\n{finalResponseInstruction}",
};
}