From 2b32d5b498b612327ac71d14aa9a43473723b630 Mon Sep 17 00:00:00 2001 From: aisi-inspect <166920645+aisi-inspect@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:01:43 +0000 Subject: [PATCH] docs on custom staffold --- docs/_tools-scaffold.md | 4 +++- docs/tools.qmd | 8 -------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/_tools-scaffold.md b/docs/_tools-scaffold.md index 53e110d9d..0c11e8886 100644 --- a/docs/_tools-scaffold.md +++ b/docs/_tools-scaffold.md @@ -24,7 +24,7 @@ This does everything that default `generate()` does, save for an outer loop to c def agent_loop(): async def solve(state: TaskState, generate: Generate): model = get_model() - while True: + while not state.completed: # call model output = await model.generate(state.messages, state.tools) @@ -43,6 +43,8 @@ def agent_loop(): return solve ``` +The `state.completed` flag is automatically set to `False` if `max_messages` for the task is exceeded, so we check it at the top of the loop. + You can imagine several ways you might want to customise this loop: 1. Adding another termination condition for the output satisfying some criteria. diff --git a/docs/tools.qmd b/docs/tools.qmd index 8094957a9..54045f995 100644 --- a/docs/tools.qmd +++ b/docs/tools.qmd @@ -264,14 +264,6 @@ See the [Agents](#sec-agents) section for more details on how to build evaluatio ## Web Browser {#sec-web-browser} -::: {.callout-note apperance="\"simple:"} -Note that the web browser tools described below is currently only available in the development version of Inspect. You can install the development version with: - -``` bash -pip install git+https://github.com/UKGovernmentBEIS/inspect_ai -``` -::: - The web browser tools provids models with the ability to browse the web using a headless Chromium browser. Navigation, history, and mouse/keyboard interactions are all supported. ### Configuration