dylanglenister commited on
Commit
3f9170c
·
1 Parent(s): d85186d

FIX: Fixed information schema.

Browse files

Title added. Descriptions added.

Files changed (1) hide show
  1. schemas/information_validator.json +77 -16
schemas/information_validator.json CHANGED
@@ -1,25 +1,86 @@
1
  {
2
  "bsonType": "object",
3
- "required": ["chunk_id", "content", "embedding", "metadata", "embedding_model", "embedding_dim"],
 
 
 
 
 
 
 
 
4
  "properties": {
5
- "chunk_id": {"bsonType": "string"},
6
- "content": {"bsonType": "string"},
7
- "embedding": {"bsonType": "array", "items": {"bsonType": "double"}},
8
- "embedding_model": {"bsonType": "string"},
9
- "embedding_dim": {"bsonType": "int", "minimum": 1},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  "metadata": {
11
  "bsonType": "object",
12
- "required": ["parent_id", "source", "task", "sequence", "total_chunks", "content_type"],
 
 
 
 
 
 
 
 
13
  "properties": {
14
- "parent_id": {"bsonType": "string"},
15
- "source": {"bsonType": "string"},
16
- "task": {"bsonType": "string"},
17
- "sequence": {"bsonType": "int"},
18
- "total_chunks": {"bsonType": "int"},
19
- "content_type": {"bsonType": "string"},
20
- "related_chunks": {"bsonType": "array", "items": {"bsonType": "string"}},
21
- "chunk_length": {"bsonType": "int"},
22
- "created_timestamp": {"bsonType": "date"}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  }
24
  }
25
  }
 
1
  {
2
  "bsonType": "object",
3
+ "title": "Information validator",
4
+ "required": [
5
+ "chunk_id",
6
+ "content",
7
+ "embedding",
8
+ "embedding_model",
9
+ "embedding_dim",
10
+ "metadata"
11
+ ],
12
  "properties": {
13
+ "chunk_id": {
14
+ "bsonType": "string",
15
+ "description": "'chunk_id' must be a string and is required."
16
+ },
17
+ "content": {
18
+ "bsonType": "string",
19
+ "description": "'content' must be a string and is required."
20
+ },
21
+ "embedding": {
22
+ "bsonType": "array",
23
+ "items": { "bsonType": "double" },
24
+ "description": "'embedding' must be an array of floats and is required."
25
+ },
26
+ "embedding_model": {
27
+ "bsonType": "string",
28
+ "description": "'embedding_model' must be a string and is required."
29
+ },
30
+ "embedding_dim": {
31
+ "bsonType": "int",
32
+ "minimum": 1,
33
+ "description": "'embedding_dim' must be an int greater than 1 and is required."
34
+ },
35
  "metadata": {
36
  "bsonType": "object",
37
+ "title": "Metadata validator",
38
+ "required": [
39
+ "parent_id",
40
+ "source",
41
+ "task",
42
+ "sequence",
43
+ "total_chunks",
44
+ "content_type"
45
+ ],
46
  "properties": {
47
+ "parent_id": {
48
+ "bsonType": "string",
49
+ "description": "'parent_id' must be a string and is required."
50
+ },
51
+ "source": {
52
+ "bsonType": "string",
53
+ "description": "'source' must be a string and is required."
54
+ },
55
+ "task": {
56
+ "bsonType": "string",
57
+ "description": "'task' must be a string and is required."
58
+ },
59
+ "sequence": {
60
+ "bsonType": "int",
61
+ "description": "'sequence' must be an int and is required."
62
+ },
63
+ "total_chunks": {
64
+ "bsonType": "int",
65
+ "description": "'total_chunks' must be an int and is required."
66
+ },
67
+ "content_type": {
68
+ "bsonType": "string",
69
+ "description": "'content_type' must be a string and is required."
70
+ },
71
+ "related_chunks": {
72
+ "bsonType": "array",
73
+ "items": { "bsonType": "string" },
74
+ "description": "'related_chunks' must be an array of strings and is optional."
75
+ },
76
+ "chunk_length": {
77
+ "bsonType": "int",
78
+ "description": "'chunk_length' must be an int and is optional."
79
+ },
80
+ "created_timestamp": {
81
+ "bsonType": "date",
82
+ "description": "'created_timestamp' must be a date and is optional."
83
+ }
84
  }
85
  }
86
  }