-
-
Notifications
You must be signed in to change notification settings - Fork 166
Closed
Description
hey, I'm using some local models served by lmstudio. But the visual selection isn't being sent to the model. I'm using this config:
providers = {
lmstudio = {
embed = "copilot_embeddings",
prepare_input = function(inputs, opts)
return {
model = opts.model,
messages = inputs,
stream = true,
}
end,
get_headers = function()
return {
["Content-Type"] = "application/json",
}
end,
get_models = function(headers)
local utils = require("CopilotChat.utils")
local response = utils.curl_get("http://localhost:5946/v1/models", { headers = headers })
if not response or response.status ~= 200 then
error("Failed to fetch models: " .. tostring(response and response.status))
end
local models = {}
for _, model in ipairs(vim.json.decode(response.body)["data"]) do
table.insert(models, {
id = model.id,
name = model.id,
})
end
return models
end,
get_url = function()
return "http://localhost:5946/v1/chat/completions"
end,
},
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels