@@ -63,7 +63,7 @@ client.schema.create(
6363 " name" : " category"
6464 }
6565 ],
66- # Possible values: 'text2vec-cohere', 'text2vec-openai', 'text2vec-huggingface', 'text2vec-transformers', 'text2vec-contextionary', 'img2vec-neural', 'multi2vec-clip', 'ref2vec-centroid'
66+ # Possible values: 'text2vec-cohere', 'text2vec-ollama', 'text2vec- openai', 'text2vec-huggingface', 'text2vec-transformers', 'text2vec-contextionary', 'img2vec-neural', 'multi2vec-clip', 'ref2vec-centroid'
6767 vectorizer: " text2vec-openai"
6868)
6969
@@ -73,9 +73,6 @@ client.schema.get(class_name: 'Question')
7373# Get the schema
7474client.schema.list()
7575
76- # Remove a class (and all data in the instances) from the schema.
77- client.schema.delete(class_name: ' Question' )
78-
7976# Update settings of an existing schema class.
8077# Does not support modifying existing properties.
8178client.schema.update(
@@ -94,6 +91,52 @@ client.schema.add_property(
9491
9592# Inspect the shards of a class
9693client.schema.shards(class_name: ' Question' )
94+
95+ # Remove a class (and all data in the instances) from the schema.
96+ client.schema.delete(class_name: ' Question' )
97+
98+ # Creating a new data object class in the schema while configuring the vectorizer on the schema and on individual properties (Ollama example)
99+ client.schema.create(
100+ class_name: ' Question' ,
101+ description: ' Information from a Jeopardy! question' ,
102+ properties: [
103+ {
104+ " dataType" : [" text" ],
105+ " description" : " The question" ,
106+ " name" : " question"
107+ # By default all properties are included in the vector
108+ }, {
109+ " dataType" : [" text" ],
110+ " description" : " The answer" ,
111+ " name" : " answer" ,
112+ " moduleConfig" : {
113+ " text2vec-ollama" : {
114+ " skip" : false ,
115+ " vectorizePropertyName" : true ,
116+ },
117+ },
118+ }, {
119+ " dataType" : [" text" ],
120+ " description" : " The category" ,
121+ " name" : " category" ,
122+ " indexFilterable" : true ,
123+ " indexSearchable" : false ,
124+ " moduleConfig" : {
125+ " text2vec-ollama" : {
126+ " skip" : true , # Don't include in the vector
127+ },
128+ },
129+ }
130+ ],
131+ # Possible values: 'text2vec-cohere', 'text2vec-ollama', 'text2vec-openai', 'text2vec-huggingface', 'text2vec-transformers', 'text2vec-contextionary', 'img2vec-neural', 'multi2vec-clip', 'ref2vec-centroid'
132+ vectorizer: " text2vec-ollama" ,
133+ module_config: {
134+ " text2vec-ollama" : {
135+ apiEndpoint: " http://localhost:11434" ,
136+ model: " mxbai-embed-large" ,
137+ },
138+ },
139+ )
97140```
98141
99142### Using the Objects endpoint
0 commit comments