- Add XAiKnowledgeScope enum (Conversation=0, Project=1, Global=2, User=3) with StringValue prefixes; - Add Knowledge constants, scope prefixes, metadata keys and XAiErrorRoute to XAiModelsConstants; - Fix inverted ownerId condition in QueryProjects / QueryConversations / QueryMessages (ownership filter was skipped for real owners -> cross-user data exposure); - Fix inverted HasChild() validation in HasDefaultProject / HasDefaultConversation; - LoadConversations: ignore soft-deleted conversations; - CreateProject / CreateConversation: set isDefaultLanguageHandled = true; - GetDefaultConversation: use projectId instead of unloaded project.Id.
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using xExceptions.Attributes;
|
|
|
|
namespace xAiModels.Constants
|
|
{
|
|
/// <summary>
|
|
/// Knowledge Base Scope (Where Ingested Vectors are Visible) ...
|
|
/// Identifier Layout: "{scopePrefix}/{scopeKey}/{fileName}#{chunkIndex}" (Global has no scopeKey) ...
|
|
/// </summary>
|
|
public enum XAiKnowledgeScope
|
|
{
|
|
/// <summary>
|
|
/// Visible only Inside a Conversation (Key = ConversationId) ...
|
|
/// </summary>
|
|
[StringValue(XAiModelsConstants.XAiKnowledgeConversationPrefix)]
|
|
Conversation = 0,
|
|
|
|
/// <summary>
|
|
/// Visible to all Conversations of a Project (Key = ProjectId) ...
|
|
/// </summary>
|
|
[StringValue(XAiModelsConstants.XAiKnowledgeProjectPrefix)]
|
|
Project = 1,
|
|
|
|
/// <summary>
|
|
/// Visible to Everyone (Write Requires Admin Role) ...
|
|
/// </summary>
|
|
[StringValue(XAiModelsConstants.XAiKnowledgeGlobalPrefix)]
|
|
Global = 2,
|
|
|
|
/// <summary>
|
|
/// Personal Knowledge Base of Owner (Key = UserId) ...
|
|
/// </summary>
|
|
[StringValue(XAiModelsConstants.XAiKnowledgeUserPrefix)]
|
|
User = 3,
|
|
}
|
|
} |