Skip to main content
Skip table of contents

ChatGPT - Add Comments to Code

Overview

Takes in a script as a file or typed out and returns a script as a file with comments in the code to help with readability. Either the script file or the script typed out is required. The program will fail if both or neither are provided

Variables

NameReferenceTypeRequiredDefaultOptionsDescription
ModelCHATGPT_MODELSelectgpt-5GPT-5: gpt-5

GPT-5-Mini: gpt-5-mini

GPT-5 Nano: gpt-5-nano

GPT-4.1: gpt-4.1
Model to use
Initial Code ScriptCHATGPT_TEXT_FILEAlphanumeric--Select the file you want to send to ChatGPT for comments. Have this or the typed input, not both
Code Script Typed OutCHATGPT_TYPED_SCRIPTAlphanumeric--Type out the code to send to ChatGPT for comments. Have this or the file input, not both
Exported Code Script NameCHATGPT_DESTINATION_FILE_NAMEAlphanumeric--File to save the commented code to
Workflows folder nameCHATGPT_DESTINATION_FOLDER_NAMEAlphanumeric--Folder to save commented script in, defaults to current directory

YAML

Below is the YAML template

YAML

source:
  template: ChatGPT - Add Comments to Code
  inputs:
    CHATGPT_MODEL: gpt-5
    CHATGPT_TEXT_FILE:
    CHATGPT_TYPED_SCRIPT:
    CHATGPT_DESTINATION_FILE_NAME:
    CHATGPT_DESTINATION_FOLDER_NAME:
  type: TEMPLATE
guardrails:
  retry_count: 0
  retry_wait: 0h0m0s
  runtime_cutoff: 1h0m0s
  exclude_exit_code_ranges:
    - 201
    - 202
    - 203

      
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.