Skip to content

Commit

Permalink
feat(assistant): add base_url option
Browse files Browse the repository at this point in the history
  • Loading branch information
S1M0N38 committed Jan 29, 2024
1 parent 749b486 commit 7ab924b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lua/dante/assistant.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ local function command(req)
"--no-buffer",
'--header "Authorization: Bearer $OPENAI_API_KEY"',
'--header "content-type: application/json"',
"--url https://api.openai.com/v1/chat/completions",
"--url " .. config.options.base_url .. "/chat/completions",
"--data " .. vim.fn.shellescape(req),
}
return "curl " .. table.concat(args, " ")
Expand Down
1 change: 1 addition & 0 deletions lua/dante/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ local defaults = {
},
},
openai_api_key = "OPENAI_API_KEY",
base_url = "https://api.openai.com/v1",
diffopt = { "internal", "filler", "closeoff", "algorithm:patience", "followwrap", "linematch:120" },
}

Expand Down

0 comments on commit 7ab924b

Please sign in to comment.