MaartenGr/BERTopic

Issue when using topic representation

Opened this issue · 1 comments

When we use topic representation by openai , even when we specify top_n_words . it still takes in all the keyphrases and comes up with a topic representation . And The other issue is that as the chatgpt doesn't always return the response in the format that we need its better to include function calling internally in the topic representation block (openai) .

When we use topic representation by openai , even when we specify top_n_words . it still takes in all the keyphrases and comes up with a topic representation .

Could you provide me with an example? That would make it easier for me to reproduce the issue. Also, which version of BERTopic are you using? I just released the v0.16.1 version which fixes many issues.

And The other issue is that as the chatgpt doesn't always return the response in the format that we need its better to include function calling internally in the topic representation block (openai) .

I think it should possible to implement function calling using their API but have not used it myself before. Having said that, I believe you can pass in **kwargs to their .create function which is where you would define those tools. So I think it's already possible.