(parts: list[Part], limit: int)
| 6340 | image: Part = {"type": "anthropic_image"} |
| 6341 | |
| 6342 | def fit(parts: list[Part], limit: int) -> tuple[str, bool]: |
| 6343 | values, truncated = fit_content({OUTPUT: [{"role": "assistant", "parts": parts}]}, limit) |
| 6344 | return to_json(json.loads(values[OUTPUT])[0]["parts"]), truncated |
| 6345 | |
| 6346 | def size(parts: list[Part]) -> int: |
| 6347 | return len(to_json([{"role": "assistant", "parts": parts}])) |
nothing calls this directly
no test coverage detected