After installing, configuring and enabling the AI Coding Assistant with Developer Studio feature, perform the following steps to view and use the ChatGPT View:

  1. Click Window > Show View to open the Show View window.
  2. Click AssistAI > ChatGPT View and then click Open. The ChatGPT View is docked to the OpenEdge Editor.
    Note: If the ChatGPT View is blank and the Error Log View displays the Not implemented [WebView2 runtime not found] message, then you have to install the WebView2 runtime on your machine. This system-level component is not included with the Developer Studio and is provided by Microsoft.
  3. In the ChatGPT View, type your query and click Enter to initiate the generative AI process for creating an output for your query.
    Note:
    • The result generated by ChatGPT for code or any query is subject to variation with each use. You are responsible for assessing and adapting the results to suit your specific requirements.
    • You can drag and drop a code file into the input box and post queries within the context of the file.
  4. To clear the text within the ChaptGPT View, click Clear.
  5. To halt the query generation process, click Stop.
Examples: Use the ChaptGPT View
You can try the following scenarios from ChatGPT for generating ABL code:
  • Scenario 1—Enter the following query in the ChatGPT text chat:
    Write an output to a file in ABL.
    ChatGPT provides the following response:
    DEFINE VARIABLE fileHandle AS HANDLE.
    DEFINE VARIABLE outputString AS CHARACTER.
    
    OUTPUT TO VALUE("output.txt").
    PUT UNFORMATTED "Hello, World!" SKIP.
    OUTPUT CLOSE.
    
  • Scenario 2—Enter the following in the ChatGPT text chat:
    
    Define two temp tables and a dataset using ABL.
    ChatGPT provides the following response:
    DEFINE TEMP-TABLE tt-table1
        FIELD field1 AS CHARACTER
        FIELD field2 AS INTEGER
        INDEX field1 IS UNIQUE.
    
    DEFINE TEMP-TABLE tt-table2
        FIELD field1 AS CHARACTER
        FIELD field2 AS DECIMAL.
    
    DEFINE DATASET ds-dataset FOR tt-table1, tt-table2.
    
  • Scenario 3—Copy and paste the following code to ChatGPT as input and ask it to generate the comments for the addAndDisplaySum method.
    METHOD PUBLIC VOID addAndDisplaySum(INPUT i1 AS INTEGER, INPUT i2 AS INTEGER):
        DEFINE VARIABLE sum AS INTEGER NO-UNDO.
        sum = i1 + i2.
        MESSAGE "The sum of" i1 "and" i2 "is" sum VIEW-AS ALERT-BOX.
    END METHOD.
    
    ChatGPT provides the following response:
    /* 
     * This method calculates the sum of two input integers and displays the result.
     * @param i1 The first integer input.
     * @param i2 The second integer input.
     */