MaartenGr / MaartenGr/BERTopic
Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.8k
- Forks
- 920
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 5
Description
when I run this code:
client = openai.OpenAI(api_key="sk-**")
representation_model = OpenAI(client)
umap_model = UMAP(n_neighbors=15,
n_components=5,
min_dist=0.0,
metric='cosine',
random_state=100)
topic_model = BERTopic(umap_model=umap_model, calculate_probabilities=True,
language="multilingual", nr_topics="auto",representation_model=representation_model)
topics, probabilities = topic_model.fit_transform(wordList)
here is a error:
Alternatively, you can pin your installation to the old version, e.g. pip install openai==0.28
but I tried the openai==0.28 Then I found a new error:
AttributeError: module 'openai' has no attribute 'OpenAI'
I want to know what should I do, please.......
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the shown BERTopic setup with the OpenAI package versions mentioned in the report, including openai==0.28. Compare the supported OpenAI client interfaces and identify which version combination is expected; done means the example runs without either reported attribute or version error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100