mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-11 21:47:21 +00:00
Turned getter-like extension methods into extension properties (#1157)
This commit is contained in:
1 parent
0375318b1b
commit
f649febf88
286 files changed
+1379
-1109
No files matched your search
@@ -15,7 +15,7 @@ public static class ProviderRequestFailureReasonExtensions
|
||||
/// Meant as a label beside the full message, so a list of failures can be scanned instead of
|
||||
/// read: twenty entries which all say API key are one problem, not twenty.
|
||||
/// </remarks>
|
||||
public string GetName() => failureReason switch
|
||||
public string Name => failureReason switch
|
||||
{
|
||||
ProviderRequestFailureReason.INSUFFICIENT_QUOTA => TB("No credits left"),
|
||||
ProviderRequestFailureReason.TOO_MANY_REQUESTS => TB("Too many requests"),
|
||||
@@ -39,7 +39,7 @@ public static class ProviderRequestFailureReasonExtensions
|
||||
/// Only for the failures a setting actually fixes. Pointing at the settings for a provider
|
||||
/// which is merely overloaded would send the user looking for a mistake they never made.
|
||||
/// </remarks>
|
||||
public bool IsFixedInProviderSettings() => failureReason is
|
||||
public bool IsFixedInProviderSettings => failureReason is
|
||||
ProviderRequestFailureReason.INVALID_OR_MISSING_API_KEY or
|
||||
ProviderRequestFailureReason.AUTHENTICATION_OR_PERMISSION_ERROR or
|
||||
ProviderRequestFailureReason.MODEL_NOT_FOUND or
|
||||
|
||||
Reference in new issue
Block a user