Turned getter-like extension methods into extension properties (#1157)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-04 13:00:56 +01:00
1 parent 0375318b1b
commit f649febf88
286 files changed
+1379 -1109

No files matched your search

@@ -25,7 +25,7 @@ public sealed class ProviderOpenAI() : BaseProvider(LLMProviders.OPEN_AI, new Ur
#region Implementation of IProvider
/// <inheritdoc />
public override string Id => LLMProviders.OPEN_AI.ToSecretId();
public override string Id => LLMProviders.OPEN_AI.SecretId;
/// <inheritdoc />
public override string InstanceName { get; set; } = "OpenAI";
@@ -71,7 +71,7 @@ public sealed class ProviderOpenAI() : BaseProvider(LLMProviders.OPEN_AI, new Ur
// OpenAI changed the role of the system prompt from one generation to the next, and the
// early reasoning models take no system prompt at all. Which role a model takes is stated
// by the OpenAI families in Models/OpenAI:
var systemPromptRole = modelProfile.SystemPromptRole.ToOpenAIRole();
var systemPromptRole = modelProfile.SystemPromptRole.OpenAIRole;
// Check if we are using the Responses API or the Chat Completion API:
var usingResponsesAPI = modelProfile.Has(Capability.RESPONSES_API);
@@ -15,8 +15,8 @@ public static class SystemPromptRoleExtensions
/// model the rules do not know is almost always one released after they were written, and the
/// older generations which still want "system" say so in their families.
/// </remarks>
/// <returns>The role, as OpenAI names it.</returns>
public string ToOpenAIRole() => role switch
/// <value>The role, as OpenAI names it.</value>
public string OpenAIRole => role switch
{
SystemPromptRole.SYSTEM => "system",
SystemPromptRole.DEVELOPER => "developer",