Issue with collections when using Google's text2vec-palm

I’m running into some weird behavior when using Google’s text2vec-palm. It seems that I’m able to create a collection and write objects to it, I can confirm its existence and see its config, but I can’t read its contents.

Repro steps:

  1. Using the Python SDK, create a collection with text2vec-palm as the vectorizer. For auth, use the example code under “with google-auth” in this page. Specify a project_id, and for model_id, use text-embedding-004. → This all worked for me.
  2. Add a few objects . → This also worked for me.
  3. Query it with collection.query.hybrid(). → For me, this resulted in the following error: weaviate.exceptions.WeaviateClosedClientError: The WeaviateClient is closed. Run client.connect() to (re)connect!

What I’ve tried:

  • I added a step to check the connection with client.is_connected(). It suggests I am, indeed, connected.
  • I tried client.collections.list_all(). It prints the config for my collection. But if I try client.collections.get(my_collection_name), I get an empty result.

I had a similar workflow for a collection using OpenAI’s vectorizers and didn’t run into any issues… am I missing something about using text2vec-palm?

hi @teossaurus !!

Welcome to our community :hugs:

Can you share a reproducible code? I often find that in this situation, there might be an issue on the code.

Usually the client will only disconnect after calling client.close()

Also, client.collections.get() doesn’t actually call the server, and with that it will not raise an error if the collections doesn’t exist, as that method is lazy.

However, the search on a non existent collection will necessarily raise an error.

We have here some recipes using google palm that may help you:

Let me know if this helps.


Hi Duda! Thanks for helping out with this.

This gist has a reproducible version of my code, as well as the output.

It seems like I’m getting an authentication error when querying, which is confusing because I’m using the same method to authenticate when adding objects to the collection—but one fails and the other doesn’t.