Skip to content

Commit

Permalink
fix: azure api_key fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchanns committed Aug 18, 2024
1 parent c19ea9a commit 7f0b1f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/avante/ai_bot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ local function call_openai_api_stream(question, code_lang, code_content, selecte

local url, headers, body
if Config.provider == "azure" then
api_key = os.getenv(E.key("azure"))
api_key = os.getenv(E.key("azure")) or os.getenv(E.key("openai"))
url = Config.azure.endpoint
.. "/openai/deployments/"
.. Config.azure.deployment
Expand Down

0 comments on commit 7f0b1f9

Please sign in to comment.