Change OpenAI Generative Model for Existing Classes

Hello! I’m currently using the generative-openai module to query my data (vectorizing with text2vec-openai), with the Python client library.

When I create my schema / class, I’m specifying a particular OpenAI model ( gpt-3.5-turbo ).

Is there a way when querying to override that on a per-query basis? (to gpt-4, for example)?

Or, barring that, is there a way to change the model on the class? I tried modifying the class, but it said that that it was immutable.

I’d like to be able to do some queries with each, depending on the query, without having to have two instances of the data.

Thank you!

Hi Dan, welcome to the community.

This was something I had on my mind for a little while.

The bad news

Unfortunately, this is not possible at this moment.

The good news

But we can do something about it. :wink:
I’ve created a GitHub issue, if we get enough votes for it, we can get it implemented :wink:

In other words, please upvote it :+1: to get the ball rolling.

Thank you! I didn’t think I was overlooking anything, but wanted to make sure. I also wanted to make sure I wasn’t (unnecessarily) duplicating my stored data.

I’ve put a thumbs up on the GitHub Issue. Hopefully something that can be implemented!

1 Like

hi! Coming from the future :space_invader:

This is now implemented:

For example in python:

collection.config.update(
    generative_config=Reconfigure.Generative.cohere()  # Update the generative module
)

Thanks!