feat: system_prompt can be a function (#1571)

This commit is contained in:
yetone
2025-03-12 19:57:17 +08:00
committed by GitHub
parent f9f92dc9d4
commit 8b37cfc306
2 changed files with 7 additions and 3 deletions

View File

@@ -17,7 +17,6 @@ local Utils = require("avante.utils")
---@class avante.CoreConfig: avante.Config
local M = {}
---@class avante.Config
---@field custom_tools AvanteLLMToolPublic[]
M._defaults = {
debug = false,
---@alias ProviderName "claude" | "openai" | "azure" | "gemini" | "vertex" | "cohere" | "copilot" | "bedrock" | "ollama" | string
@@ -34,6 +33,7 @@ M._defaults = {
-- For most providers that we support we will determine this automatically.
-- If you wish to use a given implementation, then you can override it here.
tokenizer = "tiktoken",
---@type string | (fun(): string) | nil
system_prompt = nil,
rag_service = {
enabled = false, -- Enables the rag service, requires OPENAI_API_KEY to be set