Add initial llm-bridge project
This commit is contained in:
@@ -0,0 +1,109 @@
|
||||
# llm-gateway global configuration.
|
||||
# Copied to ~/.llm-gateway/config.toml on first run; edits there win.
|
||||
# Precedence: CLI flags > LLM_GATEWAY_* environment variables > this file > defaults.
|
||||
|
||||
[server]
|
||||
# Bind address. Keep it on the loopback interface unless you set an api_key.
|
||||
host = "127.0.0.1"
|
||||
port = 8080
|
||||
# Optional bearer token required from clients. Empty disables authentication.
|
||||
api_key = ""
|
||||
# Adds an "x_gateway_warnings" array to responses describing ignored parameters.
|
||||
include_warnings = true
|
||||
# Maximum accepted request body, in bytes.
|
||||
request_body_limit = 33554432
|
||||
|
||||
[browser]
|
||||
# Path to the Chrome/Chromium/Edge/Brave executable. Empty = auto-detect
|
||||
# (honours the CHROME environment variable, then well-known install paths).
|
||||
executable = ""
|
||||
# Headless hides the window; keep it false so you can log in and solve captchas.
|
||||
headless = false
|
||||
# Root of the persistent browser profiles. Empty = <state dir>/profiles.
|
||||
profile_dir = ""
|
||||
# Concurrent turns allowed per provider account, i.e. how many tabs stay open.
|
||||
# 1 serialises the turns of an account; a larger value lets several requests
|
||||
# (or the variants of one "n": 4 request) run in parallel.
|
||||
max_tabs = 1
|
||||
# How long a request waits for a free tab before it is refused with 429.
|
||||
busy_wait_s = 30
|
||||
launch_timeout_s = 60
|
||||
request_timeout_s = 60
|
||||
# Extra Chromium command line switches.
|
||||
extra_args = [
|
||||
"--disable-blink-features=AutomationControlled",
|
||||
"--no-first-run",
|
||||
"--no-default-browser-check",
|
||||
]
|
||||
|
||||
# How much the browser hides that it is automated:
|
||||
# off leave the page alone (default). The switch above already hides
|
||||
# navigator.webdriver and the user agent stays genuine, which is
|
||||
# what sign-in pages expect.
|
||||
# minimal additionally patch navigator.webdriver from an injected script.
|
||||
# aggressive full stealth, including a spoofed user agent. Warning: it
|
||||
# advertises an outdated Chrome version, which some sign-in
|
||||
# providers reject as an insecure browser.
|
||||
stealth = "off"
|
||||
|
||||
# Attach to a browser you started instead of launching one. Use it when a
|
||||
# sign-in provider refuses a browser the gateway launched: start Chrome
|
||||
# yourself with a debugging port (llm-gateway login <provider> --manual prints
|
||||
# the exact command), keep it open, and set attach = true.
|
||||
attach = false
|
||||
debug_port = 9222
|
||||
|
||||
[conversation]
|
||||
# Thread store file. Empty = <state dir>/conversations.json.
|
||||
store = ""
|
||||
# auto = reuse the web conversation when possible, otherwise replay the history
|
||||
# reuse = always reuse (fails if the web conversation is gone)
|
||||
# replay = always send the full history into a new conversation
|
||||
strategy = "auto"
|
||||
# fingerprint = derive an id from the opening messages (works with header-less clients)
|
||||
# header = only trust the X-Conversation-Id header (else a fresh uuid per request)
|
||||
# uuid = never reuse a conversation unless the header is supplied
|
||||
id_source = "fingerprint"
|
||||
|
||||
[capture]
|
||||
# DOM polling interval while waiting for the answer.
|
||||
poll_interval_ms = 400
|
||||
# The answer is considered finished after this much silence and no streaming indicator.
|
||||
quiet_ms = 1500
|
||||
# Hard budget for one generated answer.
|
||||
response_timeout_s = 180
|
||||
# auto | insert_text | exec_command | type_str
|
||||
inject_method = "auto"
|
||||
# Fidelity of the captured answer:
|
||||
# auto the provider's copy button (Markdown through the clipboard) when
|
||||
# it has one, the DOM conversion otherwise. Default.
|
||||
# clipboard always the copy button; falls back to the DOM when the clipboard
|
||||
# cannot be read.
|
||||
# dom always convert the answer HTML to Markdown.
|
||||
# text the visible text only, formatting flattened (historical behaviour).
|
||||
markdown = "auto"
|
||||
# How long the clipboard read is given before the DOM conversion wins.
|
||||
clipboard_timeout_ms = 1500
|
||||
# Upper bound accepted for the OpenAI "n" parameter. Values above it are clamped
|
||||
# and reported in x_gateway_warnings.
|
||||
max_variants = 4
|
||||
|
||||
[tokens]
|
||||
# tiktoken encoding used for the estimated usage block.
|
||||
encoding = "o200k_base"
|
||||
# Fall back to a characters/4 heuristic when the encoding cannot be loaded.
|
||||
fallback_heuristic = true
|
||||
|
||||
[debug]
|
||||
# never | on_error | always
|
||||
screenshots = "on_error"
|
||||
# Empty = <state dir>/debug.
|
||||
dir = ""
|
||||
|
||||
[logging]
|
||||
# trace | debug | info | warn | error
|
||||
level = "info"
|
||||
# pretty | json
|
||||
format = "pretty"
|
||||
# Additional JSON log file. Empty = <state dir>/logs/llm-gateway.log
|
||||
file = ""
|
||||
Reference in New Issue
Block a user