(part: Record<string, any>, expectedContents: string[])
| 36 | } |
| 37 | |
| 38 | function assertCounted(part: Record<string, any>, expectedContents: string[]) { |
| 39 | assert.deepEqual(extractToolContent(part), expectedContents) |
| 40 | assert.equal(countToolTokens(part), estimateTokensBatch(expectedContents)) |
| 41 | assert.equal( |
| 42 | countAllMessageTokens(buildToolMessage(part)), |
| 43 | estimateTokensBatch(expectedContents), |
| 44 | ) |
| 45 | } |
| 46 | |
| 47 | test("counting includes input for large built-in tool calls", () => { |
| 48 | const cases = [ |
no test coverage detected