Client.collections.create () vs. client.schema.create_class ()


In several example notebooks I see

client.collections.create ()

I run my own instance of weaviate (docker-compose) version.
I create client = weaviate.Client ()
with this client I am able to connect to my instance. However,
client.collections.create () does not work (client has no collections attribute)
i have to use client.schema.create_class ()

I am trying to use multimodal embeddings from google. I can not find an example with client.collections.create ()

Two questions:
a) what is the difference between client.collections.create () vs. client.schema.create_class ()
b) is there any difference in the client connection when the client connects with my own instance under docker. ( client.schema.create_class works not client.collections.create)
c) any example of multimodal embeddings creation (the collection will have image, some text description, want to use both image / text embeddings)

Server Setup Information

  • Weaviate Server Version:
  • Deployment Method:
  • Multi Node? Number of Running Nodes:
  • Client Language and Version:
  • Multitenancy?:

Any additional Information

I define the following:

class_animals_data = {
“class” : ‘Animals’,
“description” : ‘data extracted from related docs’,
“vectorizer”: ‘generative-palm’,
“moduleConfig”: {
‘generative-palm’: {
“project_id”: “XXXXX”,
“location”: “YYYYYYY”,
“model_id”: “multimodalembedding@001”,
“dimensions” :1408,

"properties" : [
        'name': 'image',
        'dataType': ['blob']
        'name': 'description',
        'dataType': ['text'],


(the client “wc” is connected to an instance of weaviate I am running under docker - it works fine. I am able to create text / openAI vectorizer based collections)

wc.schema.create_class(class_animals_data )

UnexpectedStatusCodeError: Create class! Unexpected status code: 422, with response body: {‘error’: [{‘message’: ‘vectorizer: module “generative-palm” exists, but does not provide the Vectorizer or ReferenceVectorizer capability’}]}.

/usr/local/lib/python3.10/dist-packages/weaviate/schema/ in _create_class_with_primitives(self, weaviate_class)
815 raise RequestsConnectionError(“Class may not have been created properly.”) from conn_err
816 if response.status_code != 200:
→ 817 raise UnexpectedStatusCodeException(“Create class”, response)
819 def _create_classes_with_primitives(self, schema_classes_list: list) → None:

Figured out a few things:

if I use:
client1 = weaviate.Client (xxx) this client does not have “collections” attribute.

if i try:
client2 = weaviate.connect_to_custom(xxx), this client has “collections” attribute.