export type ToolContentBlock = Record<string, unknown>;
export function normalizeToolContentType(value: unknown): string { returntypeof value === "string" ? value.toLowerCase() : "";
}
export function isToolCallContentType(value: unknown): boolean { const type = normalizeToolContentType(value); return type === "toolcall" || type === "tool_call" || type === "tooluse" || type === "tool_use";
}
export function isToolResultContentType(value: unknown): boolean { const type = normalizeToolContentType(value); return type === "toolresult" || type === "tool_result";
}
export function isToolCallBlock(block: ToolContentBlock): boolean { return isToolCallContentType(block.type);
}
export function isToolResultBlock(block: ToolContentBlock): boolean { return isToolResultContentType(block.type);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.