$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
inputs:
  source:
    type: string
    default: ./azure_open_ai.py
outputs:
  code:
    type: string
    reference: ${combine_code.output}
nodes:
- name: load_code
  type: python
  source:
    type: code
    path: load_code_tool.py
  inputs:
    source: ${inputs.source}
- name: divide_code
  type: python
  source:
    type: code
    path: divide_code_tool.py
  inputs:
    file_content: ${load_code.output}
- name: generate_docstring
  type: python
  source:
    type: code
    path: generate_docstring_tool.py
  inputs:
    divided: ${divide_code.output}
    connection: open_ai_connection
    model: gpt-35-turbo
- name: combine_code
  type: prompt
  source:
    type: code
    path: combine_code.jinja2
  inputs:
    divided: ${generate_docstring.output}
environment:
  python_requirements_txt: requirements.txt
