Sharing config
This commit is contained in:
@@ -4,12 +4,25 @@ return {
|
||||
require('codecompanion').setup {
|
||||
adapters = {
|
||||
http = {
|
||||
openrouter = function()
|
||||
default = function()
|
||||
if (require('helpers').has_copilot()) then
|
||||
return require('codecompanion.adapters').extend('copilot', {
|
||||
schema = {
|
||||
model = {
|
||||
default = vim.env.DEFAULT_AI_MODEL,
|
||||
},
|
||||
max_tokens = {
|
||||
default = 1000000,
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
return require('codecompanion.adapters').extend('openai_compatible', {
|
||||
env = {
|
||||
url = vim.env.DEFAULT_OPENAI_API_BASE,
|
||||
api_key = vim.env.DEFAULT_OPENAI_API_KEY,
|
||||
chat_url = '/v1/chat/completions',
|
||||
chat_url = '/chat/completions',
|
||||
models_endpoint = '/models',
|
||||
},
|
||||
schema = {
|
||||
model = {
|
||||
@@ -31,7 +44,7 @@ return {
|
||||
},
|
||||
strategies = {
|
||||
chat = {
|
||||
adapter = 'openrouter',
|
||||
adapter = 'default',
|
||||
slash_commands = {
|
||||
-- codebase = require('vectorcode.integrations').codecompanion.chat.make_slash_command(),
|
||||
},
|
||||
@@ -63,13 +76,13 @@ return {
|
||||
},
|
||||
inline = {
|
||||
adapter = {
|
||||
name = 'openrouter',
|
||||
name = 'default',
|
||||
model = vim.env.FAST_MODEL,
|
||||
},
|
||||
},
|
||||
cmd = {
|
||||
adapter = {
|
||||
name = 'openrouter',
|
||||
name = 'default',
|
||||
model = vim.env.FAST_MODEL,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user