Closed rzalawad closed 11 months ago
If its not in the works, I can create a PR that always reads OPENAI_API_TYPE
and loads loadAzureConfigs
based on the value rather than conditionally reading OPENAI_API_TYPE
based on the existence of the api key
This PR will inadvertently resolve this, no?
@ekaj2 It does!! Thanks for the PR :) I'll close this issue
Based on the current code workflow, when environment variable
OPENAI_API_KEY
is read, the callback https://github.com/jackMort/ChatGPT.nvim/blob/7db348d7b45a84d6144354d90d5d16315c422e5a/lua/chatgpt/api.lua#L258 is not executed and thusOPENAI_API_TYPE
is not loaded andloadAzureConfigs
isn't executed to load the Azure related environment variables.This results in an ambiguous api key is invalid prompt when opening a chat session.