Skip to content

Commit d502953

Browse files
authored
fix: API key lookup to use env field instead of get() (#64)
1 parent 9bc5a26 commit d502953

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/neoai/chat/models/openai.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ end
5252
---@param on_stdout_chunk fun(chunk: string) Function to call whenever a stdout chunk occurs
5353
---@param on_complete fun(err?: string, output?: string) Function to call when model has finished
5454
M.send_to_model = function (chat_history, on_stdout_chunk, on_complete)
55-
local api_key = os.getenv(config.options.open_ai.api_key.get())
55+
local api_key = os.getenv(config.options.open_ai.api_key.env)
5656
if not api_key then
5757
on_complete("OpenAI API Key is missing.", nil)
5858
return

0 commit comments

Comments
 (0)