-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathinit_schema.py
More file actions
53 lines (50 loc) · 1.75 KB
/
init_schema.py
File metadata and controls
53 lines (50 loc) · 1.75 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
import weaviate
import weaviate.classes as wvc
client = weaviate.connect_to_local()
client.collections.create(
name="Blog",
description="An AI-generated blog post by Hurricane.",
properties=[
wvc.config.Property(
data_type=wvc.config.DataType.TEXT,
description="Title of the Article",
name="title",
),
wvc.config.Property(
data_type=wvc.config.DataType.TEXT,
description="Initial question that inspired the blog post.",
name="question",
),
wvc.config.Property(
data_type=wvc.config.DataType.TEXT,
description="The introduction paragraph",
name="introduction_paragraph",
),
wvc.config.Property(
data_type=wvc.config.DataType.TEXT,
description="The outline for the blog.",
name="outline",
),
wvc.config.Property(
data_type=wvc.config.DataType.TEXT_ARRAY,
description="Evidence paragraphs that support the arguments in the blog.",
name="evidence_paragraphs"
),
wvc.config.Property(
data_type=wvc.config.DataType.TEXT,
description="A bold prediciton based on the content of the blog post.",
name="bold_prediction"
),
wvc.config.Property(
data_type=wvc.config.DataType.TEXT,
description="The relevance of the blog post to the Weaviate Vector Database.",
name="weaviate_relevance",
),
wvc.config.Property(
data_type=wvc.config.DataType.TEXT_ARRAY,
description="Takeaways from the blog post.",
name="takeaways"
),
]
)
client.close()