Skip to content

Commit

Permalink
Fix _openai.py representation MaartenGr#1263 (MaartenGr#1733)
Browse files Browse the repository at this point in the history
Prevent 'model' argument being passed twice when using 'generator_kwargs'
  • Loading branch information
ninavandiermen authored Jan 10, 2024
1 parent 995e379 commit facd10f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bertopic/representation/_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
Topic:
Sample texts from this topic:
- Traditional diets in most cultures were primarily plant-based with a little meat on top, but with the rise of industrial style meat production and factory farming, meat has become a staple food.
- Meat, but especially beef, is the word food in terms of emissions.
- Meat, but especially beef, is the worst food in terms of emissions.
- Eating meat doesn't make you a bad person, not eating meat doesn't make you a good one.
Keywords: meat beef eat eating emissions steak food health processed chicken
Expand Down Expand Up @@ -169,6 +169,7 @@ def __init__(self,
self.generator_kwargs = generator_kwargs
if self.generator_kwargs.get("model"):
self.model = generator_kwargs.get("model")
del self.generator_kwargs["model"]
if self.generator_kwargs.get("prompt"):
del self.generator_kwargs["prompt"]
if not self.generator_kwargs.get("stop") and not chat:
Expand Down

0 comments on commit facd10f

Please sign in to comment.