Offer `api_key_command` config option
smackesey opened this issue · comments
Sean Mackesey commented
ChatGPT.nvim offers a handy auth method that executes an external command to obtain an API key. This is really nice if you store your API key in e.g. 1Password: https://github.com/jackMort/ChatGPT.nvim#secrets-management
sg.nvim should offer the same thing.
TJ DeVries commented
I currently have require('sg.auth').set(endpoint, token)
, which you could call in your setup if you wanted to provide alternative authentication.
Would that meet what you want to do? I'm not opposed to doing something similar to api_key_command
though.