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",
|
||||
"api_key_name",
|
||||
"timeout",
|
||||
"display_name",
|
||||
-- internal
|
||||
"local",
|
||||
"_shellenv",
|
||||
|
||||
@@ -8,11 +8,12 @@ local M = {}
|
||||
---@param cfg table
|
||||
---@return table?
|
||||
local function create_model_entry(provider, cfg)
|
||||
return cfg.model and {
|
||||
name = provider .. "/" .. cfg.model,
|
||||
provider = provider,
|
||||
model = cfg.model,
|
||||
}
|
||||
return cfg.model
|
||||
and {
|
||||
name = cfg.display_name or (provider .. "/" .. cfg.model),
|
||||
provider = provider,
|
||||
model = cfg.model,
|
||||
}
|
||||
end
|
||||
|
||||
function M.open()
|
||||
|
||||
@@ -215,6 +215,7 @@ vim.g.avante_login = vim.g.avante_login
|
||||
---@field temperature? number
|
||||
---@field max_tokens? number
|
||||
---@field reasoning_effort? string
|
||||
---@field display_name? string
|
||||
---
|
||||
---@class AvanteLLMUsage
|
||||
---@field input_tokens number
|
||||
|
||||
Reference in New Issue
Block a user