mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-17 15:57:59 +00:00
refactored confidence levels and ensured checks work
This commit is contained in:
1 parent
786b106096
commit
88999d985c
44 files changed
+324
-335
No files matched your search
@@ -80,7 +80,7 @@ public sealed record ChatThread
|
||||
/// <summary>
|
||||
/// The minimum provider confidence required by data sources used so far.
|
||||
/// </summary>
|
||||
public ConfidenceLevel DataComplianceLevel { get; set; } = ConfidenceLevel.NONE;
|
||||
public ConfidenceLevel DataConfidenceLevel { get; set; } = ConfidenceLevel.NONE;
|
||||
|
||||
/// <summary>
|
||||
/// The name of the chat thread. Usually generated by an AI model or manually edited by the user.
|
||||
|
||||
@@ -16,7 +16,7 @@ public static class ChatThreadExtensions
|
||||
/// One thing which is not so obvious: after RAG was used on this thread, the entire chat
|
||||
/// thread is kind of a data source by itself. Why? Because the augmentation data collected
|
||||
/// from the data sources is stored in the chat thread. This means we must check if the
|
||||
/// selected provider is allowed to use this thread's data security and compliance level.
|
||||
/// selected provider is allowed to use this thread's data security and confidence level.
|
||||
/// </remarks>
|
||||
/// <param name="chatThread">The chat thread to check.</param>
|
||||
/// <param name="provider">The provider to check.</param>
|
||||
@@ -36,7 +36,7 @@ public static class ChatThreadExtensions
|
||||
_ => ConfidenceLevel.NONE,
|
||||
};
|
||||
|
||||
if (!providerConfidenceLevel.AllowsDataSourceComplianceLevel(chatThread.DataComplianceLevel))
|
||||
if (!providerConfidenceLevel.AllowsDataSourceConfidenceLevel(chatThread.DataConfidenceLevel))
|
||||
return false;
|
||||
|
||||
// The chat thread is available, but the data security is not specified.
|
||||
|
||||
@@ -57,7 +57,7 @@ public sealed class ContentText : IContent
|
||||
|
||||
if(!chatThread.IsLLMProviderAllowed(provider))
|
||||
{
|
||||
LOGGER.LogError("The provider is not allowed for this chat thread due to data security or compliance reasons. Skipping the AI process.");
|
||||
LOGGER.LogError("The provider is not allowed for this chat thread due to data security or confidence-level requirements. Skipping the AI process.");
|
||||
await this.CompleteWithoutStreaming();
|
||||
return chatThread;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user