MaartenGr / MaartenGr/BERTopic

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

Open
#2,044 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.8k
Forks
920
Avg merge
22h 24m
Merged PRs (30d)
5

Description

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](https://github.com/openai/openai-python/releases/tag/v1.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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with bertopic/backend/_openai.py and reproduce the failure using a simple `from bertopic import BERTopic` import with OpenAI v1.33.0. Compare the existing implementation with the proposed fix in the referenced branch, then verify that the import works with the current OpenAI API.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.