mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-05 00:29:40 +00:00
Classify embedding failures at the provider level
This commit is contained in:
11 files changed
+230
-36
No files matched your search
@@ -14,4 +14,56 @@ public enum ProviderRequestFailureReason
|
||||
/// meant to answer for it does not offer it.
|
||||
/// </remarks>
|
||||
MODEL_NOT_SUPPORTED_BY_PROVIDER,
|
||||
|
||||
/// <summary>
|
||||
/// No usable API key was available, or the provider rejected the one we sent.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Both cases lead to the same place for the user: the key stored for this provider is not
|
||||
/// one the provider works with, and the settings are where they fix it.
|
||||
/// </remarks>
|
||||
INVALID_OR_MISSING_API_KEY,
|
||||
|
||||
/// <summary>
|
||||
/// The key was accepted, but the account is not allowed to do what we asked for.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Typical causes are a key without the required scope, a model the account has no access
|
||||
/// to, and providers which refuse requests from the user's region.
|
||||
/// </remarks>
|
||||
AUTHENTICATION_OR_PERMISSION_ERROR,
|
||||
|
||||
/// <summary>
|
||||
/// The provider could not be reached, or said that it cannot serve requests right now.
|
||||
/// </summary>
|
||||
PROVIDER_UNAVAILABLE,
|
||||
|
||||
/// <summary>
|
||||
/// The provider does not know the requested model at all.
|
||||
/// </summary>
|
||||
MODEL_NOT_FOUND,
|
||||
|
||||
/// <summary>
|
||||
/// The text we sent was longer than the model accepts.
|
||||
/// </summary>
|
||||
CONTEXT_LENGTH_EXCEEDED,
|
||||
|
||||
/// <summary>
|
||||
/// The provider cannot create embeddings at all.
|
||||
/// </summary>
|
||||
EMBEDDINGS_NOT_SUPPORTED,
|
||||
|
||||
/// <summary>
|
||||
/// The provider answered successfully, but with something we were not able to read.
|
||||
/// </summary>
|
||||
INVALID_RESPONSE,
|
||||
|
||||
/// <summary>
|
||||
/// The request failed and we were not able to tell why.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Deliberately without a user message of its own: what the provider itself said about the
|
||||
/// failure tells the user more than a sentence which says nothing.
|
||||
/// </remarks>
|
||||
UNKNOWN,
|
||||
}
|
||||
Reference in new issue
Block a user