avante update
This commit is contained in:
parent
87ed7f3527
commit
1395146661
1 changed files with 16 additions and 34 deletions
|
|
@ -9,29 +9,11 @@ require("avante").setup({
|
||||||
enabled = false,
|
enabled = false,
|
||||||
},
|
},
|
||||||
vendors = {
|
vendors = {
|
||||||
---@type AvanteProvider
|
|
||||||
ollama = {
|
ollama = {
|
||||||
["local"] = true,
|
endpoint = "http://127.0.0.1:11434/v1",
|
||||||
endpoint = "127.0.0.1:11434/v1",
|
|
||||||
model = "qwen2.5-coder:7b",
|
model = "qwen2.5-coder:7b",
|
||||||
parse_curl_args = function(opts, code_opts)
|
__inherited_from = "openai",
|
||||||
return {
|
api_key_name = "",
|
||||||
url = opts.endpoint .. "/chat/completions",
|
|
||||||
headers = {
|
|
||||||
["Accept"] = "application/json",
|
|
||||||
["Content-Type"] = "application/json",
|
|
||||||
},
|
|
||||||
body = {
|
|
||||||
model = opts.model,
|
|
||||||
messages = require("avante.providers").copilot.parse_message(code_opts), -- you can make your own message, but this is very advanced
|
|
||||||
max_tokens = 2048,
|
|
||||||
stream = true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
end,
|
|
||||||
parse_response_data = function(data_stream, event_state, opts)
|
|
||||||
require("avante.providers").openai.parse_response(data_stream, event_state, opts)
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue