-
Notifications
You must be signed in to change notification settings - Fork 727
Expand file tree
/
Copy pathknowledgeScope.ts
More file actions
78 lines (71 loc) · 1.8 KB
/
Copy pathknowledgeScope.ts
File metadata and controls
78 lines (71 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
export type KnowledgeScopeMode = "inherit" | "override" | "disabled";
export interface ConversationKnowledgeScope {
schema_version: 1;
local: {
mode: KnowledgeScopeMode;
knowledge_ids: string[];
};
aidp: {
mode: KnowledgeScopeMode;
kds_ids: string[];
};
}
export interface KnowledgeCapabilities {
agent_id: number;
version_no: number;
capability_revision?: string;
legacy_prompt_warning?: {
detected: boolean;
affected_agent_ids: number[];
reason_code: "STATIC_KNOWLEDGE_SCOPE_REFERENCE";
};
sources: {
local: {
enabled: boolean;
max_select: number;
requires_same_embedding_model: boolean;
default_summary: string;
default_knowledge_ids: string[];
default_range_values: string[];
};
aidp: {
enabled: boolean;
max_select: number;
default_summary: string;
default_knowledge_ids: string[];
default_range_values: string[];
};
};
}
export interface KnowledgeScopeWarning {
code: string;
source?: "local" | "aidp";
count: number;
}
export interface KnowledgeScopeEffectivePreview {
local: {
disabled: boolean;
knowledge_ids: string[];
display_names: string[];
};
aidp: {
disabled: boolean;
kds_ids: string[];
display_names: string[];
};
}
export interface KnowledgeScopeUpdateResult {
desired_scope: ConversationKnowledgeScope | null;
effective_preview: KnowledgeScopeEffectivePreview | null;
warnings: KnowledgeScopeWarning[];
}
export interface KnowledgeScopeResolution {
effective: KnowledgeScopeEffectivePreview;
warnings: KnowledgeScopeWarning[];
}
export const DEFAULT_CONVERSATION_KNOWLEDGE_SCOPE: ConversationKnowledgeScope =
{
schema_version: 1,
local: { mode: "inherit", knowledge_ids: [] },
aidp: { mode: "inherit", kds_ids: [] },
};