description: Parse a block output using a regex
defs:
  output:
    model: ollama_chat/granite3.2:2b
    parameters:
      temperature: 0
    input: Write a Python function that perform the addition of two numbers.
    parser:
      spec:
        code: str
      regex: (.|\n)*```python\n(?P<code>(.|\n)*)```(.|\n)*
text: ${ output.code }