NikxDa / actual-moneymoney

A CLI tool to import transactions from MoneyMoney to Actual.
3 stars 1 forks source link

OpenAI payee transformation always fails #12

Closed SalocinHB closed 2 months ago

SalocinHB commented 2 months ago
[WARN] Payee transformation failed. Using default payee names...

I tried to use the same prompt as in https://github.com/NikxDa/actual-moneymoney/blob/main/src/utils/PayeeTransformer.ts#L36 and that works using ChatGPT's web chat. --logLevel 3 does not provide any more details on why it fails. Do I need a paid OpenAI account for this to work?

NikxDa commented 2 months ago

Hi Nico,

thanks for reporting this. I will have a look tonight, but until then, can you confirm that you have specified an OpenAI API Key in your configuration file?

You can see this in the example configuration in README file, where the [payeeTransformation] section has two properties, enabled and openAiApiKey. If you enable this feature, you also need to provide your own API key. OpenAI will charge you accordingly.

Cheers

SalocinHB commented 2 months ago

I did set an API key, which you can apparently obtain from OpenAI without having a payment plan set up. I suppose the only thing to improve would be to mention in the README that some kind of payment plan needs to be set up for that API key, otherwise it won't work.