-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
44 lines (37 loc) · 874 Bytes
/
types.ts
File metadata and controls
44 lines (37 loc) · 874 Bytes
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
/**
* @license
* SPDX-License-Identifier: Apache-2.0
*/
export interface Candidate {
name: string;
}
export interface Attribute {
name:string;
presence_in_prompt: boolean;
value: Candidate[];
}
export interface Entity {
name: string;
presence_in_prompt: boolean;
description: string;
alternatives: Candidate[] | null;
attributes: Attribute[];
}
export interface Relationship {
source: string;
target: string;
label: string;
alternatives?: Candidate[];
}
export interface BeliefState {
entities: Entity[];
relationships: Relationship[];
prompt?: string;
}
export interface Clarification {
question: string;
options: string[];
}
export type GraphUpdate =
| { type: 'attribute'; entity: string; attribute: string; value: string }
| { type: 'relationship'; source: string; target: string; oldLabel: string; newLabel: string };