48 lines
2.4 KiB
Python
48 lines
2.4 KiB
Python
"""
|
|
AutoDev - Configuration
|
|
LLM backend settings and application constants.
|
|
"""
|
|
|
|
# ============================================================
|
|
# LLM BACKEND CONFIGURATION — Edit these to match your setup
|
|
# ============================================================
|
|
LLM_BACKEND = "ollama" # "ollama" or "vllm"
|
|
OLLAMA_URL = "http://localhost:11434"
|
|
VLLM_URL = "http://localhost:8000"
|
|
MODEL_NAME = "gemma4:e4b"
|
|
|
|
# ============================================================
|
|
# Timeouts and limits
|
|
# ============================================================
|
|
LLM_TIMEOUT = 300 # seconds per LLM call
|
|
COMPILE_TIMEOUT = 120 # seconds per compile/build
|
|
EXEC_TIMEOUT = 60 # seconds per test execution
|
|
MAX_DEBUG_CYCLES = 10 # max consecutive fix attempts before halting
|
|
MAX_CONTEXT_TOKENS = 12000 # approximate local context window size (chars)
|
|
CYCLE_DETECTION_WINDOW = 6 # number of recent actions to check for loops
|
|
TOKEN_CHAR_RATIO = 3.5 # average chars per token (for estimation)
|
|
|
|
# ============================================================
|
|
# File names
|
|
# ============================================================
|
|
DESCRIPTION_FILE = "description.txt"
|
|
MANUALS_DIR = "manuals"
|
|
WORKLOG_FILE = "worklog.json"
|
|
DEPENDENCY_FILE = "dependency.txt"
|
|
PLAN_FILE = "plan.json"
|
|
|
|
# ============================================================
|
|
# Expert system prompt — injected into every LLM interaction
|
|
# ============================================================
|
|
EXPERT_IDENTITY = """You are a senior software engineer with 20+ years of experience across all major languages and platforms. You approach every task like a principal engineer:
|
|
|
|
- You think before you code. You consider edge cases, error handling, and maintainability.
|
|
- You write production-quality code, never prototypes or stubs.
|
|
- You understand build systems, compilers, linkers, and runtime environments deeply.
|
|
- When you see an error, you reason about root cause, not just symptoms.
|
|
- You never repeat a failed approach. If something didn't work, you try a fundamentally different strategy.
|
|
- You are aware that you are an AI and may hallucinate. When uncertain, you keep code simple and conservative rather than guessing at APIs or syntax.
|
|
- You always consider: does this compile? Does this link? Are all imports/includes correct? Are all dependencies declared?
|
|
- You write complete files, never partial snippets or placeholders like "// ... rest of code".
|
|
"""
|