mirror of
https://github.com/NCBM/plyngent.git
synced 2026-11-07 23:47:54 +08:00
127 lines
5.3 KiB
TOML
127 lines
5.3 KiB
TOML
# Example plyngent configuration (no real secrets).
|
|
# Copy to the path shown by: plyngent config path
|
|
# Then set access_key_or_token and adjust models.
|
|
|
|
# Optional. If omitted (or SQLite url unset/empty), the CLI uses a durable file under
|
|
# the platform user data dir (e.g. ~/.local/share/plyngent/chat.db).
|
|
# url = ":memory:" → true in-memory SQLite (CLI warns; useful for tests).
|
|
# [database]
|
|
# implementation = "sqlite"
|
|
# url = "/path/to/chat.db"
|
|
# # url = ":memory:"
|
|
|
|
# Third-party plugins (entry-point names). Default: load none.
|
|
# Today the CLI loads allowlisted ``plyngent.tools`` entry points; the section is
|
|
# not tool-specific so other extension points can share the same allowlist later.
|
|
# See doc/plugins.md.
|
|
# [plugins]
|
|
# enable = ["acme"]
|
|
# enable = ["*"]
|
|
# disable = ["legacy"]
|
|
|
|
# Host network / SSRF policy for tools such as ``fetch``.
|
|
# Clash TUN + Fake-IP often resolves public names to 198.18.0.0/15; list that
|
|
# pool so fetch does not treat every site as private/loopback.
|
|
# Metadata (169.254.169.254) stays forbidden even if listed.
|
|
# [networking]
|
|
# ssrf_assume_public_cidrs = ["198.18.0.0/15"]
|
|
|
|
[agent]
|
|
# Persona (omit → built-in coding-agent line). tool_directives is the tool playbook.
|
|
# Override with multi-line literals (prefer ''' so nested " is fine):
|
|
# system_prompt = '''
|
|
# Your custom persona...
|
|
# '''
|
|
# tool_directives = '''
|
|
# ### Workspace
|
|
# ...
|
|
# '''
|
|
# system_prompt = "" # persona off; keep default tool_directives unless also cleared
|
|
# tool_directives = "" # playbook off (set both "" to disable system entirely)
|
|
max_tool_result_chars = 32000
|
|
parallel_tools = true
|
|
confirm_destructive = true
|
|
path_denylist = ["/secrets/", ".ssh/", ".gnupg/"]
|
|
# Soft context budget in estimated tokens (~4 chars/token when API usage missing).
|
|
max_context_tokens = 200000
|
|
# How open-todo nags are injected into model context:
|
|
# developer (default) | user | synthetic_tool | none
|
|
# (legacy system is treated as developer)
|
|
# todo_nag_strategy = "developer"
|
|
# Append-only developer playbook checkpoints every N prompt_tokens (0 = off).
|
|
# directive_reminder_tokens = 100000
|
|
# directive_reminder_text = ""
|
|
|
|
# Optional: custom compact/summarisation prompts (empty = built-in defaults).
|
|
# compact_system_prompt = ""
|
|
# compact_user_prefix = "Summarize the following conversation:\n\n{transcript}"
|
|
# compact_seed_text = "Compacted from {src}:\n\n{summary}\n\nCarry on."
|
|
|
|
# --- OpenAI-compatible (vLLM, LiteLLM, OpenAI, …) ---
|
|
[providers.openai_compat]
|
|
preset = "openai-compatible"
|
|
url = "https://api.openai.com/v1"
|
|
access_key_or_token = "sk-replace-me"
|
|
# HTTP timeouts for LLM API calls (seconds). Default if omitted: connect=10, read=600.
|
|
# timeout = 120
|
|
# timeout = { connect = 10, read = 600 }
|
|
|
|
[providers.openai_compat.models]
|
|
"gpt-4o-mini" = { text = true, cost_factor = 1.0 }
|
|
|
|
# --- OpenAI platform (Responses API; tag is "openai") ---
|
|
# If ``preset`` is omitted, it defaults to "openai".
|
|
# If ``models`` is omitted, defaults: gpt-5.4, gpt-5.4-mini, gpt-5.4-nano.
|
|
# [providers.openai]
|
|
# preset = "openai"
|
|
# access_key_or_token = "sk-replace-me"
|
|
# url = "https://api.openai.com/v1"
|
|
# # Hosted/provider-side tools (OpenAI runs them; not local ToolRegistry).
|
|
# # Default if omitted: [{ type = "web_search" }]. Use [] to disable.
|
|
# # Examples: web_search, file_search (+ vector_store_ids), code_interpreter, mcp.
|
|
# provider_tools = [
|
|
# { type = "web_search" },
|
|
# # { type = "file_search", vector_store_ids = ["vs_xxx"] },
|
|
# # { type = "code_interpreter", container = { type = "auto" } },
|
|
# ]
|
|
#
|
|
# [providers.openai.models]
|
|
# "gpt-4o-mini" = { text = true }
|
|
# # Model-level preset/url overrides let one provider route models via different APIs.
|
|
# # `preset = "openai"` means /responses; `openai-compatible` means /chat/completions;
|
|
# # `anthropic` means native /messages.
|
|
# # "claude-sonnet" = { text = true, preset = "anthropic", url = "https://api.anthropic.com/v1" }
|
|
|
|
# --- Anthropic (Messages API) ---
|
|
# [providers.anthropic]
|
|
# preset = "anthropic"
|
|
# access_key_or_token = "sk-ant-replace-me"
|
|
# # url defaults to https://api.anthropic.com/v1 when empty
|
|
# timeout = { connect = 10, read = 600 }
|
|
#
|
|
# [providers.anthropic.models]
|
|
# "claude-sonnet-4-20250514" = { text = true }
|
|
# "claude-opus-4-20250514" = { text = true }
|
|
|
|
# --- DeepSeek (OpenAI-compatible / Responses / Anthropic conventions) ---
|
|
# Default models if [providers.*.models] is omitted: deepseek-v4-flash, deepseek-v4-pro.
|
|
# [providers.deepseek]
|
|
# preset = "deepseek"
|
|
# access_key_or_token = "sk-replace-me"
|
|
# # url defaults by convention: https://api.deepseek.com (chat/responses),
|
|
# # https://api.deepseek.com/anthropic (anthropic). Set explicitly to override.
|
|
# # Convention selects the API surface:
|
|
# # "" / "openai" → OpenAI-compatible chat completions (default)
|
|
# # "responses" → OpenAI Responses API (POST /responses; today only
|
|
# # deepseek-v4-flash supports it)
|
|
# # "anthropic" → Anthropic Messages API (POST /messages on
|
|
# # https://api.deepseek.com/anthropic; claude-* model ids
|
|
# # map server-side to deepseek-v4-*)
|
|
# convention = "responses"
|
|
# # Legacy location (parsed but ignored; prefer the typed field above):
|
|
# # extras = { convention = "openai" }
|
|
#
|
|
# [providers.deepseek.models]
|
|
# "deepseek-v4-flash" = { text = true, convention = "responses" }
|
|
# "deepseek-v4-pro" = { text = true }
|