ArikReuter / TopicGPT

TopicGPT allows to integrate the benefits of LLMs into Topic Modelling
https://lmu-seminar-llms.github.io/TopicGPT/
MIT License
44 stars 9 forks source link

Azure API error #4

Open ruyhliu opened 3 months ago

ruyhliu commented 3 months ago

Hello,

I am using the Azure OpenAI service and have had the following error message, when initialising the model:

# Or, to use with Azure
tm = TopicGPT(
    api_key = <your-azure-openai-api-key>,
    azure_endpoint = {
         "endpoint": <your-azure-openai-endpoint-url>,
         "api_version": <api-version>
     },
    n_topics = 20
)

TypeError: TopicGPT.init() got an unexpected keyword argument 'azure_endpoint'

On another note, api_key needs to change to openai_api_key on this snippet in my testing.

Any clues to fix this error?

Thanks!

charx0r commented 3 months ago

Hi, try this

tm = TopicGPT( openai_api_key = api_key_openai, n_topics = 20 )

Hrishimawal commented 1 month ago

Hi, I am also facing the same issue, is is not working for azure api?

TypeError: TopicGPT.init() got an unexpected keyword argument 'azure_endpoint'

if we try this: tm = TopicGPT( openai_api_key = api_key_openai, n_topics = 20 )

The azure api key does not work here.