Added provider metadata regarding embeddings

This commit is contained in:
Thorsten Sommer 2024-11-13 20:32:07 +01:00
parent d7f918c3d1
commit 24eaa835af
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 31 additions and 0 deletions

View File

@ -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>

View File

@ -0,0 +1,2 @@
# v0.9.19, build 194 (2024-11-xx xx:xx UTC)
- Added provider's metadata: which providers offer embeddings for RAG? This is in preparation for integrating your data and files.