Repository navigation
Expand file tree
/
Copy pathbot.example.toml
More file actions
81 lines (72 loc) · 3.6 KB
/
Copy pathbot.example.toml
File metadata and controls
81 lines (72 loc) · 3.6 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
# Config of the catalogue bot. Copy it to bot.toml, which git ignores, and fill it in.
# `catalogue bot` reads --config, else $CATALOGUE_BOT_CONFIG, else ./bot.toml.
# A relative path below resolves against the directory of this file.
# The file holds no secret. Keep the private key in its own file.
# The repo the bot works on.
owner = "ml-rust"
repo = "ml-rust.github.io"
# The App needs these repository permissions:
# - Issues: read and write. Comments, labels and issue events.
# - Contents: read and write. The data files, the tier snapshots and the bot branches.
# - Pull requests: read and write. The data PRs.
# Branch protection on `main` must not list the App as a bypass actor.
# Its data PRs then merge only through the review that protection asks for.
# From the GitHub App settings page.
app_id = 123456
# From the URL of the App installation on the owner: .../installations/<id>.
installation_id = 12345678
# The App private key in PEM form. Run `chmod 600` on it: the bot refuses a key
# that group or other can read. The deploy keeps the key at
# /etc/catalogue-bot/app.pem, owned by the bot user, mode 0400.
# A key file with a user ACL reads as group-readable, so the bot refuses it.
# The bot expands no variable in this path.
private_key_path = "/etc/catalogue-bot/app.pem"
# Optional. The directory for the bot lock and state cache.
# Default: $STATE_DIRECTORY under systemd, else the user cache directory.
# state_dir = "/var/lib/catalogue-bot"
# Optional. The advisory LLM link check of the evidence links on submit and
# judgment issues. Its result is a collapsed comment section only. No label,
# tier or approval reads it. The bot host never fetches an evidence link:
# GitHub pages come through the GitHub API, other pages through Ollama web_fetch.
# Without this section the check is off. With it, `enabled` defaults to true.
[triage]
enabled = false
# The links checked per issue. Later links show as not checked.
max_links = 5
# The seconds one model or web_fetch request waits for an answer.
request_timeout_secs = 90
# The attempts per model before the next model.
max_attempts_per_model = 2
# The seconds before a check that no model answered runs again.
retry_after_secs = 3600
# The providers, tried in order. Each model is tried in order within its provider.
# Keys never go in this file. `api_key_env` names a variable, and the bot reads
# it at the start of each run. Under systemd, set the variables in a file named
# by `EnvironmentFile=`. The deploy reads /etc/catalogue-bot/env, owned by
# root, mode 0600. Systemd reads it before it drops to the bot user.
# A provider whose variable is unset or empty is skipped with a warning.
[[triage.providers]]
name = "ollama"
base_url = "https://ollama.com/v1"
api_key_env = "OLLAMA_API_KEY"
# Example model ids. Replace them with models your account can use.
models = ["example-model-a", "example-model-b"]
[[triage.providers]]
name = "openrouter"
base_url = "https://openrouter.ai/api/v1"
api_key_env = "OPENROUTER_API_KEY"
# Example model id. Replace it with a model your account can use.
models = ["example-org/example-model"]
# Optional. Extra request headers. The bot sets Authorization, Content-Type,
# Accept and User-Agent itself.
[triage.providers.headers]
X-Title = "ml-rust catalogue"
# Optional. Extra request body fields. The bot sets model, messages,
# response_format and stream itself.
# [triage.providers.request]
# provider = { sort = "latency" }
# Optional. The web_fetch service for links outside GitHub. Without it, or with
# its variable unset, those links show as not read.
[triage.fetch]
web_fetch_url = "https://ollama.com/api/web_fetch"
api_key_env = "OLLAMA_API_KEY"