remove dev environment references from codebase
This commit is contained in:
1 parent
5747ad2fa6
commit
38cba33bbf
18 files changed
+327
-249
No files matched your search
+20
-3
@@ -1,6 +1,6 @@
|
||||
"""CLI entrypoint: interactive REPL, scripted JSONL mode, and subcommands.
|
||||
|
||||
Run on the box with SemIf + a GGUF + a local OpenAI-compatible server:
|
||||
Run on a host with SemIf + a GGUF + a local OpenAI-compatible server:
|
||||
|
||||
python -m semif_agent.cli run # REPL
|
||||
python -m semif_agent.cli run --script inputs.jsonl
|
||||
@@ -76,6 +76,23 @@ def _opt_float(value) -> float | None:
|
||||
return None if value is None else float(value)
|
||||
|
||||
|
||||
def _required_model(cfg: dict, provider: str) -> str:
|
||||
"""The configured model name, or a clear fatal error.
|
||||
|
||||
There is no default: which model an endpoint serves is deployment-specific,
|
||||
so the per-machine config must name it rather than the code guessing a model
|
||||
the endpoint may not have. Failing fast turns a missing model into an
|
||||
actionable config error instead of a request to a model that isn't there.
|
||||
"""
|
||||
model = str(cfg.get("model") or "").strip()
|
||||
if not model:
|
||||
raise SystemExit(
|
||||
f"config.json: {provider}.model is required "
|
||||
f"(set it to a model your {provider} endpoint serves)"
|
||||
)
|
||||
return model
|
||||
|
||||
|
||||
def _provider_endpoint(cfg: dict, default_base: str) -> dict:
|
||||
"""Endpoint kwargs shared by the llm/codegen clients.
|
||||
|
||||
@@ -127,7 +144,7 @@ def build_scheduler(config: dict) -> tuple[Scheduler, dict]:
|
||||
llm_endpoint = _provider_endpoint(llm_cfg, "http://localhost:11434/v1")
|
||||
llm = llm_cls(
|
||||
base_url=llm_endpoint["base_url"],
|
||||
model=llm_cfg.get("model", "qwen2.5:3b"),
|
||||
model=_required_model(llm_cfg, "llm"),
|
||||
timeout=float(llm_cfg.get("timeout", 600.0)),
|
||||
stream=bool(llm_cfg.get("stream", False)),
|
||||
idle_warn=float(llm_cfg.get("idle_warn", 30.0)),
|
||||
@@ -156,7 +173,7 @@ def build_scheduler(config: dict) -> tuple[Scheduler, dict]:
|
||||
)
|
||||
codegen = codegen_cls(
|
||||
base_url=codegen_endpoint["base_url"],
|
||||
model=codegen_cfg.get("model", "qwen38-iq3s"),
|
||||
model=_required_model(codegen_cfg, "codegen"),
|
||||
timeout=float(codegen_cfg.get("timeout", 1200.0)),
|
||||
stream=bool(codegen_cfg.get("stream", False)),
|
||||
idle_warn=float(codegen_cfg.get("idle_warn", 60.0)),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""Skill code-body generation through an OpenAI-compatible API.
|
||||
|
||||
The small `llm` provider authors a skill's title + description; writing the
|
||||
runnable body is a separate step: a larger OpenAI-compatible model (e.g.
|
||||
qwen38-iq3s on ollama) is prompted with the SKILL.md contract plus the request
|
||||
runnable body is a separate step: a larger OpenAI-compatible model (a
|
||||
code-capable model on your configured codegen endpoint) is prompted with the SKILL.md contract plus the request
|
||||
and the existing tree, and must reply with valid Python implementing `act` plus
|
||||
the `INTEGRATION` and `CONTRACT` module constants. The shared provider transport
|
||||
lives in `provider.py`.
|
||||
|
||||
@@ -8,9 +8,9 @@ request, answer a run paused for input, answer a deferred authoring question,
|
||||
resolve a repair offer, restart a skill write, and relabel a decision (human
|
||||
override).
|
||||
|
||||
The scheduler's engine and LLM are built lazily, so the dashboard runs on the
|
||||
thin dev box in replay mode (reads logs; submit degrades to a JSON error) and
|
||||
in live mode on the box with SemIf + a local LLM.
|
||||
The scheduler's engine and LLM are built lazily, so the dashboard runs in
|
||||
replay mode on a machine without the engine (reads logs; submit degrades to a
|
||||
JSON error) and in live mode on a host with SemIf + a local LLM.
|
||||
|
||||
python -m semif_agent.cli dashboard [--port 8765]
|
||||
"""
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class LLMClient(OpenAICompatClient):
|
||||
from config.
|
||||
|
||||
`disable_thinking` defaults **on**: the small local model is often a
|
||||
reasoning model (e.g. `qwen3.5:4b`) whose hidden chain-of-thought consumes
|
||||
reasoning model whose hidden chain-of-thought consumes
|
||||
the short reply budget and leaves `content` empty — the same cap problem
|
||||
codegen documents, but here the reply is a ~30-token JSON object, so the
|
||||
thinking is pure overhead. Set `llm.disable_thinking: false` for a
|
||||
|
||||
Reference in new issue
Block a user