Build text content blocks from a string.
(text: str, label: str)
| 212 | |
| 213 | |
| 214 | def _text_blocks_from_string(text: str, label: str) -> list[dict[str, Any]]: |
| 215 | """Build text content blocks from a string.""" |
| 216 | return [ |
| 217 | { |
| 218 | "type": "text", |
| 219 | "text": f"--- {label} ---\n{text}\n--- end {label} ---", |
| 220 | } |
| 221 | ] |
| 222 | |
| 223 | |
| 224 | def _build_image_blocks(path: Path, mime: str) -> list[dict[str, Any]]: |
no outgoing calls
no test coverage detected