Confused by the example of generative query

I am using my own computed vectors for the item I am searching and am happy with the examples of nearvector, nearoobject and hybrid searches.

what I’m not quite getting is where do I define my generative module, be it an OpenAI API-key based or my own generative on prem modulue.

Can anyone suggest a full example for this?

Hi @rjalex !!

First, you need to enable that module in Weviate:

If you are using WCS, it is enabled by default.

So for example, let’s say you want this module:

Now, with that module installed, you need to create your collection and specify that module on it’s configuration.

Here we have a python v3 version recipe (py v4 should come soon):

Now, for the OpenAI APIKEY, you can set those both on your environment variable, or during query time.

Let me know if this helps :slight_smile:

Looks like the original page has serious formatting issues :frowning:

What formatting? I don’t see it.

on the notebook cells seem jumbled: