description: Creating JSON Data
defs:
  data:
    read: ./gen-data.yaml
    parser: yaml
    spec: { questions: [str], answers: [obj] }
text:
  - model: replicate/ibm-granite/granite-3.0-8b-instruct
    def: model_output
    spec: {name: str, age: int}
    input:
      text:
      - for: 
          question: ${ data.questions }
          answer: ${ data.answers }
        repeat: |
            ${ question }
            ${ answer }
      - > 
        Question: Create a JSON object with fields 'name' and 'age' 
        and set them appropriately. Write the age in letters.
    parser: yaml
    parameters:
      stop_sequences: "\n"
      temperature: 0
