@@ -66,7 +66,7 @@ client.schema.create(
6666 " name" : " category"
6767 }
6868 ],
69- # Possible values: 'text2vec-cohere', 'text2vec-openai', 'text2vec-huggingface', 'text2vec-transformers', 'text2vec-contextionary', 'img2vec-neural', 'multi2vec-clip', 'ref2vec-centroid'
69+ # Possible values: 'text2vec-cohere', 'text2vec-ollama', 'text2vec- openai', 'text2vec-huggingface', 'text2vec-transformers', 'text2vec-contextionary', 'img2vec-neural', 'multi2vec-clip', 'ref2vec-centroid'
7070 vectorizer: " text2vec-openai"
7171)
7272
@@ -76,9 +76,6 @@ client.schema.get(class_name: 'Question')
7676# Get the schema
7777client.schema.list()
7878
79- # Remove a class (and all data in the instances) from the schema.
80- client.schema.delete(class_name: ' Question' )
81-
8279# Update settings of an existing schema class.
8380# Does not support modifying existing properties.
8481client.schema.update(
@@ -97,6 +94,51 @@ client.schema.add_property(
9794
9895# Inspect the shards of a class
9996client.schema.shards(class_name: ' Question' )
97+
98+ # Remove a class (and all data in the instances) from the schema.
99+ client.schema.delete(class_name: ' Question' )
100+
101+ # Creating a new data object class in the schema while configuring the vectorizer on the schema and on individual properties (Ollama example)
102+ client.schema.create(
103+ class_name: ' Question' ,
104+ description: ' Information from a Jeopardy! question' ,
105+ properties: [
106+ {
107+ " dataType" : [" text" ],
108+ " description" : " The question" ,
109+ " name" : " question"
110+ # By default all properties are included in the vector
111+ }, {
112+ " dataType" : [" text" ],
113+ " description" : " The answer" ,
114+ " name" : " answer" ,
115+ " moduleConfig" : {
116+ " text2vec-ollama" : {
117+ " skip" : false ,
118+ " vectorizePropertyName" : true ,
119+ },
120+ },
121+ }, {
122+ " dataType" : [" text" ],
123+ " description" : " The category" ,
124+ " name" : " category" ,
125+ " indexFilterable" : true ,
126+ " indexSearchable" : false ,
127+ " moduleConfig" : {
128+ " text2vec-ollama" : {
129+ " skip" : true , # Don't include in the vector
130+ },
131+ },
132+ }
133+ ],
134+ vectorizer: " text2vec-ollama" ,
135+ module_config: {
136+ " text2vec-ollama" : {
137+ apiEndpoint: " http://localhost:11434" ,
138+ model: " mxbai-embed-large" ,
139+ },
140+ },
141+ )
100142```
101143
102144### Using the Objects endpoint
0 commit comments