Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
129 lines (118 loc) · 6.22 KB
/
Copy path.env.example
File metadata and controls
129 lines (118 loc) · 6.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Runtime behavior
CODEBUDDY_AUTH_MODE=auto
CODEBUDDY_LOG_LEVEL=INFO
# Optional admin passkey RP ID override. Leave unset to use the request hostname.
# Must be a hostname only, without scheme, port, or path. Example: example.com or localhost
# CODEBUDDY_ADMIN_PASSKEY_RP_ID=example.com
# Whether the admin console trusts X-Forwarded-* headers, which it uses to build
# absolute URLs and to detect HTTPS when running behind a reverse proxy.
# Defaults to true. Set to false only when the console is reached directly and a
# client could spoof those headers.
# Accepts: true / false (also 1 / 0).
# CODEBUDDY_ADMIN_TRUST_PROXY=true
# Optional upstream overrides
# CODEBUDDY_API_ENDPOINT=https://copilot.tencent.com
# CODEBUDDY_INTERNET_ENVIRONMENT=ioa
# Minutes to wait for the first delta before aborting an upstream request.
# Defaults to 5. Fractional values are allowed; clamped to 0.1-1440.
# CODEBUDDY_API_TIMEOUT_MINUTES=5
# One of the web search engines, and its credentials. Every engine is offered in
# the console whatever is set here; these variables only seed the values.
#
# The instance must have the JSON output format enabled — under the "search"
# section of its settings.yml, set "formats: [html, json]". Many public
# instances disable it, and requests then fail with HTTP 403.
# SEARXNG_URL=https://searx.example.com
#
# Optional. Only sent when set, for instances behind a keyed proxy.
# SEARXNG_API_KEY=
# Optional. Restrict which engines are queried, space- or comma-separated,
# e.g. "google,bing" or "general". These become !bang tokens in the query
# (SearXNG has no "engines" request parameter), so each name must match an
# engine name, engine shortcut, or category on the instance.
# SEARXNG_ENGINES=
# Optional. Language code for results, e.g. en or zh
# SEARXNG_LANGUAGE=
# Optional. Results returned per query. Defaults to 5, clamped to 1-10.
# SEARXNG_MAX_RESULTS=5
# Optional. Per-query timeout in milliseconds. Defaults to 15000, clamped to 1000-60000.
# SEARXNG_TIMEOUT_MS=15000
# Which backend runs each server tool when a client declares one. Both are also
# settable in the console under Settings.
#
# Web search (web_search) — pick one engine:
# codebuddy — CodeBuddy's own /agenttool/v1/search runs it, using a saved
# credential. Needs no extra deployment.
# searxng — queries the SearXNG instance configured above. The default.
# duckduckgo — DuckDuckGo instant answers. Needs no credential at all.
# brave — Brave Search. Needs CODEBUDDY_BRAVE_API_KEY.
# tavily — Tavily, which returns page text. Needs CODEBUDDY_TAVILY_API_KEY.
# serper — Google results via Serper. Needs CODEBUDDY_SERPER_API_KEY.
# bing — Bing Web Search. Needs CODEBUDDY_BING_API_KEY.
# exa — Exa semantic search. Needs CODEBUDDY_EXA_API_KEY.
# none — never run web_search; the tool is dropped from the request.
# CODEBUDDY_WEB_SEARCH_BACKEND=searxng
#
# Web fetch (web_fetch) — any combination, comma-separated, tried in order:
# codebuddy — CodeBuddy's own /agenttool/v1/webfetch runs it and returns
# extracted text; if that call fails it falls back to a direct fetch. The
# default.
# codebuddy2api — this machine fetches the page itself. Private and loopback
# addresses are refused, and redirects are re-checked at every hop — which
# is also true of jina and browserable.
# browserable — a Browserable deployment drives a real browser. It needs
# CODEBUDDY_BROWSERABLE_URL, and CODEBUDDY_BROWSERABLE_API_KEY if the
# instance is keyed.
# jina — Jina Reader returns the page as markdown.
# CODEBUDDY_JINA_API_KEY is optional; without it the public endpoint is
# used at a lower rate limit.
# none — never run web_fetch; the tool is dropped from the request.
# CODEBUDDY_WEB_FETCH_BACKEND=codebuddy
#
# Per-backend credentials and addresses, all also settable in the console:
# CODEBUDDY_SEARXNG_URL=https://searx.example.com # overrides SEARXNG_URL
# CODEBUDDY_SEARXNG_API_KEY=
# CODEBUDDY_DUCKDUCKGO_REGION=wt-wt # e.g. cn-zh, us-en, jp-jp
# CODEBUDDY_BRAVE_API_KEY=
# CODEBUDDY_TAVILY_API_KEY=
# CODEBUDDY_SERPER_API_KEY=
# CODEBUDDY_BING_API_KEY=
# CODEBUDDY_EXA_API_KEY=
# CODEBUDDY_BROWSERABLE_URL=http://127.0.0.1:8000
# CODEBUDDY_BROWSERABLE_API_KEY=
# CODEBUDDY_JINA_API_KEY=
#
# An engine whose key is empty resolves to no backend, and the tool is then
# dropped from the request rather than advertised and left to fail. `local` is
# still accepted as the old name for `codebuddy2api`.
# Models are discovered from each saved credential. No model-list setting is needed.
# Optional file-backend data directory. Default: .codebuddy_data
# CODEBUDDY_STORAGE_FILE_DIR=.codebuddy_data
# Optional credentials directory for the file backend. Default: .codebuddy_creds
# CODEBUDDY_CREDENTIALS_DIR=.codebuddy_creds
#
# Legacy compatibility only. Prefer CODEBUDDY_STORAGE_FILE_DIR instead.
# CODEBUDDY_CONFIG_PATH=.codebuddy_data/runtime.json
# Storage backend selection
# Default is file. If DATABASE_URL or CODEBUDDY_STORAGE_PG_URL is set,
# storage auto-switches to pg unless explicitly forced back to file.
#
# Switching an existing file deployment to sqlite or pg does not move
# everything: the one-shot legacy import only carries config, admin auth,
# access keys, debug settings and credentials. Usage events and debug traces
# stay in the old files, so export what you need from the console first, then
# set CODEBUDDY_STORAGE_IMPORT_LEGACY_FILES=false once the import is done.
# CODEBUDDY_STORAGE_BACKEND=file
# CODEBUDDY_STORAGE_PERSISTENCE=file
# PostgreSQL storage
# DATABASE_URL=postgres://user:password@127.0.0.1:5432/codebuddy2api
# CODEBUDDY_STORAGE_PG_URL=postgres://user:password@127.0.0.1:5432/codebuddy2api
# CODEBUDDY_STORAGE_IMPORT_LEGACY_FILES=true
# CODEBUDDY_STORAGE_ENCRYPTION_KEY=replace-me
#
# Only the sqlite and pg backends use this key; they refuse to start without it.
# The file backend stores plain JSON with 0600 permissions and ignores the key
# altogether, so switching to a database backend is what turns encryption on.
# Back the key up: losing it locks every document written with it.
# SQLite storage. Default path: .codebuddy_data/storage.sqlite
# CODEBUDDY_STORAGE_SQLITE_PATH=.codebuddy_data/storage.sqlite