intellibrix v1.0.0
    Preparing search index...

    Interface TextToolCallParser

    Recognizes one text-based tool-call format that some models emit in place of native tool calls.

    interface TextToolCallParser {
        markers: string[];
        name: string;
        parse(
            text: string,
            accept?: (toolName: string) => boolean,
        ): { calls: ParsedToolCall[]; text: string };
    }
    Index
    markers: string[]

    Literal strings that begin a tool call. Used to hold markup back while streaming.

    name: string
    • Extracts every tool call from text, returning them with the text that remains. A block that can't be parsed, or that contains a call accept rejects, must be left in text untouched.

      Parameters

      • text: string
      • Optionalaccept: (toolName: string) => boolean

      Returns { calls: ParsedToolCall[]; text: string }