Polyman Documentation - v3.1.0
    Preparing search index...

    A manager backed by one model, the chat model by default.

    Implements

    Index
    • Parameters

      • spec: string
      • recipe:
            | "build_problem"
            | "fix_verify"
            | "strengthen_tests"
            | "prove_idea"
            | "find_ideas"
      • signal: AbortSignal

      Returns Promise<Plan>

    • Asks the model up to MANAGER_STEPS times until it calls tool with arguments that parse accepts. parse returns the value or an error text for the model. Returns null when every try failed. The idea workflow uses it too, for its one-tool calls.

      Type Parameters

      • T

      Parameters

      • system: string
      • userText: string
      • tool: ToolSpec
      • parse: (args: unknown) => string | T
      • signal: AbortSignal

      Returns Promise<T | null>

    • Runs one model call and collects its text and tool calls.

      Parameters

      Returns Promise<
          {
              text: string;
              calls: { id: string; name: string; args: unknown; argsError?: string }[];
          },
      >