mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 18:18:52 +00:00
Added provider metadata regarding embeddings (#205)
This commit is contained in:
1 parent
9fa2a1a135
commit
f9245d52c2
3 files changed
+32
-1
No files matched your search
@@ -65,6 +65,35 @@ public static class LLMProvidersExtensions
|
||||
_ => Confidence.UNKNOWN.WithLevel(settingsManager.GetConfiguredConfidenceLevel(llmProvider)),
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Determines if the specified provider supports embeddings.
|
||||
/// </summary>
|
||||
/// <param name="llmProvider">The provider to check.</param>
|
||||
/// <returns>True if the provider supports embeddings; otherwise, false.</returns>
|
||||
public static bool ProvideEmbeddings(this LLMProviders llmProvider) => llmProvider switch
|
||||
{
|
||||
//
|
||||
// Providers that support embeddings:
|
||||
//
|
||||
LLMProviders.OPEN_AI => true,
|
||||
LLMProviders.MISTRAL => true,
|
||||
LLMProviders.GOOGLE => true,
|
||||
|
||||
//
|
||||
// Providers that do not support embeddings:
|
||||
//
|
||||
LLMProviders.GROQ => false,
|
||||
LLMProviders.ANTHROPIC => false,
|
||||
LLMProviders.FIREWORKS => false,
|
||||
|
||||
//
|
||||
// Self-hosted providers are treated as a special case anyway.
|
||||
//
|
||||
LLMProviders.SELF_HOSTED => false,
|
||||
|
||||
_ => false,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new provider instance based on the provider value.
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user