feature model selection custom display name (#1477)
* feature model selection custom display name Added an option for a custom display name I had the need for this option for multiple similar custom model configurations where I wanted to have more indicative titles. * linting error
This commit is contained in:
committed by
GitHub
parent
7919fe010b
commit
232d4b1340
@@ -537,6 +537,7 @@ M.BASE_PROVIDER_KEYS = {
|
|||||||
"allow_insecure",
|
"allow_insecure",
|
||||||
"api_key_name",
|
"api_key_name",
|
||||||
"timeout",
|
"timeout",
|
||||||
|
"display_name",
|
||||||
-- internal
|
-- internal
|
||||||
"local",
|
"local",
|
||||||
"_shellenv",
|
"_shellenv",
|
||||||
|
|||||||
@@ -8,11 +8,12 @@ local M = {}
|
|||||||
---@param cfg table
|
---@param cfg table
|
||||||
---@return table?
|
---@return table?
|
||||||
local function create_model_entry(provider, cfg)
|
local function create_model_entry(provider, cfg)
|
||||||
return cfg.model and {
|
return cfg.model
|
||||||
name = provider .. "/" .. cfg.model,
|
and {
|
||||||
provider = provider,
|
name = cfg.display_name or (provider .. "/" .. cfg.model),
|
||||||
model = cfg.model,
|
provider = provider,
|
||||||
}
|
model = cfg.model,
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.open()
|
function M.open()
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ vim.g.avante_login = vim.g.avante_login
|
|||||||
---@field temperature? number
|
---@field temperature? number
|
||||||
---@field max_tokens? number
|
---@field max_tokens? number
|
||||||
---@field reasoning_effort? string
|
---@field reasoning_effort? string
|
||||||
|
---@field display_name? string
|
||||||
---
|
---
|
||||||
---@class AvanteLLMUsage
|
---@class AvanteLLMUsage
|
||||||
---@field input_tokens number
|
---@field input_tokens number
|
||||||
|
|||||||
Reference in New Issue
Block a user