M2b:导入改造产出可审阅灵胚(启镜物化世谱)与组装管线(符文展开/火候进入 IR),Kernel 打通采样参数链路
This commit is contained in:
1 parent
e6a3b7121f
commit
5f36e3785c
86 files changed
+424
-14455
No files matched your search
@@ -87,6 +87,8 @@ class KernelRunLoop:
|
||||
seat_key: str | None = None,
|
||||
system_contract: str | None = None,
|
||||
on_final: OnRunFinal | None = None,
|
||||
temperature: float | None = None,
|
||||
max_tokens: int | None = None,
|
||||
) -> RunOutcome:
|
||||
assert character_id or seat_key, "Run 必须绑定人物或提供席位键(试演)"
|
||||
trace = trace_id or new_trace_id()
|
||||
@@ -101,6 +103,8 @@ class KernelRunLoop:
|
||||
seat_key=seat_key,
|
||||
system_contract=system_contract,
|
||||
outcome=outcome,
|
||||
temperature=temperature,
|
||||
max_tokens=max_tokens,
|
||||
)
|
||||
except TimeoutError:
|
||||
outcome.status = "interrupted"
|
||||
@@ -128,6 +132,8 @@ class KernelRunLoop:
|
||||
seat_key: str | None,
|
||||
system_contract: str | None,
|
||||
outcome: RunOutcome,
|
||||
temperature: float | None = None,
|
||||
max_tokens: int | None = None,
|
||||
) -> None:
|
||||
ctx = RunContext(run_id=run_id, character_id=character_id, trace_id=trace_id)
|
||||
try:
|
||||
@@ -151,6 +157,8 @@ class KernelRunLoop:
|
||||
prompt,
|
||||
system_contract or _SYSTEM_CONTRACT_PLACEHOLDER,
|
||||
outcome,
|
||||
temperature=temperature,
|
||||
max_tokens=max_tokens,
|
||||
)
|
||||
|
||||
async def _turn(
|
||||
@@ -161,6 +169,8 @@ class KernelRunLoop:
|
||||
prompt: str,
|
||||
system_contract: str,
|
||||
outcome: RunOutcome,
|
||||
temperature: float | None = None,
|
||||
max_tokens: int | None = None,
|
||||
) -> None:
|
||||
ctx = RunContext(
|
||||
run_id=run_id, character_id=character_id, trace_id=trace_id, payload={"prompt": prompt}
|
||||
@@ -179,6 +189,8 @@ class KernelRunLoop:
|
||||
run_id=run_id,
|
||||
trace_id=trace_id,
|
||||
character_id=character_id,
|
||||
temperature=temperature,
|
||||
max_tokens=max_tokens,
|
||||
)
|
||||
await self._emit(
|
||||
run_id,
|
||||
|
||||
Reference in new issue
Block a user