BERTopic icon indicating copy to clipboard operation
BERTopic copied to clipboard

Mismatch between old OpenAI API in bertopic/backend/_openai and current OpenAI (v1.33.0)

Open abeusher opened this issue 1 year ago • 1 comments

Trying a simple import (from bertopic import BERTopic) breaks due to a difference between the old openai API (when the bertopic/backend/_openai was originally written) and the current openai API (version 1.33.0).

I implemented a fix in my own branch of the code here:

https://github.com/abeusher/BERTopic/blob/bugfix/new_openai_api/bertopic/backend/_openai.py

I am happy to provide a pull request when you are ready.

abeusher avatar Jun 09 '24 13:06 abeusher

Ah yes, it seems that the backend is not yet updated whereas the representation model is.

A PR would be appreciated! Do note though that it needs to take the same structure as the representation model, so passing the entire client and not the API key.

MaartenGr avatar Jun 14 '24 08:06 MaartenGr