on_deny=continue (soft vs hard denies), denies counter, tokens of stopped runs
This commit is contained in:
1 parent
e668eb1b0d
commit
8c76da90e8
11 files changed
+310
-87
No files matched your search
@@ -18,6 +18,9 @@ def guard(name, args):
|
||||
ext.stdout.readline()
|
||||
ext.stdin.write(json.dumps({"jsonrpc": "2.0", "id": 2, "method": "event", "params": {"event": {"type": "tool_call", "name": name, "args": args}}}) + "\n"); ext.stdin.flush()
|
||||
return json.loads(ext.stdout.readline())["result"]
|
||||
if "CALL " in body: # a model turn that ends in tool calls is one request: its usage is streamed right away
|
||||
e({"type": "turn_start"})
|
||||
e({"type": "stream", "event": {"type": "done", "usage": {"input_tokens": 100, "output_tokens": 50, "cache_read_tokens": 1000, "cache_write_tokens": 10}}})
|
||||
for n, l in enumerate(x for x in body.splitlines() if x.startswith("CALL ")):
|
||||
_, name, arg = l.split(" ", 2)
|
||||
args = {"command": arg} if name == "bash" else {"path": arg}
|
||||
|
||||
Reference in new issue
Block a user