mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 14:49:06 +00:00
Added provider metadata regarding embeddings (#205)
This commit is contained in:
parent
9fa2a1a135
commit
f9245d52c2
@ -40,7 +40,7 @@ public sealed class ContentText : IContent
|
||||
if(chatThread is null)
|
||||
return;
|
||||
|
||||
// Store the last time we got a response. We use this ater
|
||||
// Store the last time we got a response. We use this later
|
||||
// to determine whether we should notify the UI about the
|
||||
// new content or not. Depends on the energy saving mode
|
||||
// the user chose.
|
||||
|
@ -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>
|
||||
|
2
app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md
Normal file
2
app/MindWork AI Studio/wwwroot/changelog/v0.9.19.md
Normal 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.
|
Loading…
Reference in New Issue
Block a user