- ping the board every 2 s so an unplugged or silent board shows as gone within seconds - never nudge the pointer right after the board connects or while the phone is not mirroring - read and log the board's hello (last reset reason, uptime) - serve the web UI with Cache-Control: no-cache so updates show on refresh - LLM_TOKEN_PARAM (auto by default) for models that want max_completion_tokens Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
1.3 KiB
Bash
28 lines
1.3 KiB
Bash
# Copy to .env and edit. Any OpenAI-compatible vision model works: a cloud API or one you host yourself.
|
|
# ACTOR_* / PLANNER_* override LLM_* for one role (e.g. a fast actor and a stronger planner).
|
|
|
|
# --- Cloud API (OpenAI-compatible) ---
|
|
LLM_BASE_URL=https://api.openai.com/v1
|
|
LLM_MODEL=gpt-4o-mini # any vision-capable chat model
|
|
LLM_API_KEY=
|
|
LLM_EXTRA_BODY='{}'
|
|
# Newer OpenAI models want max_completion_tokens instead of max_tokens; "auto" (default) detects it.
|
|
# LLM_TOKEN_PARAM=auto # auto | max_tokens | max_completion_tokens
|
|
|
|
# --- Local model (optional): vLLM, SGLang, llama.cpp server, Ollama, ... ---
|
|
# LLM_BASE_URL=http://localhost:8000/v1
|
|
# LLM_MODEL=Qwen3.8-Flash-Next
|
|
# LLM_API_KEY=
|
|
# Qwen3.8 is tested; turn its thinking mode off for fast, short replies:
|
|
# LLM_EXTRA_BODY='{"chat_template_kwargs": {"enable_thinking": false}}'
|
|
|
|
# --- Per-role overrides (optional) ---
|
|
# ACTOR_MODEL=... picks one action per screenshot: fast matters most
|
|
# PLANNER_MODEL=... writes and repairs the plan
|
|
|
|
AIRPLAY_NAME='iPhone Agent' # receiver name shown in the phone's Screen Mirroring list
|
|
PORT=8890 # web UI
|
|
DEVICE_PORT=7300 # the ESP32 board connects here
|
|
# 1: verbose logs + one trace folder per agent run (prompts, replies, screenshots) in ~/.hidagent/traces
|
|
HIDAGENT_DEBUG=0
|