| ▲ | nosianu 16 hours ago | |
Here is a short example from my daily live, A D96A INVOIC EDI message containing multiple invoices transformed into an Excel file. I used the ChatGPT web interface for this one-off task. Input: A D96A INVOIC text message. Here is what those look like, a short example, the one I had was much larger with multiple invoices and tens of thousands of items: https://developer.kramp.com/edi-edifact-d96a-invoic The result is not code but a transformed file. This exact scenario can be made into code easily though by changing the request from "do this" to "provide a [Python|whatever] script to do this". Internally the AI produces code and runs it, and gives you the result. You actually make it do less work if you just ask for the script and to not run them. Only what I said. I had to ask for some corrections because it made a few mistakes in code interpretations. > (message uploaded as file) > Analyze this D.96A message > This message contains more than one invoice, you only parsed the first one (it finds all 27 now) > The invoice amount is in segment "MOA+77". See https://www.publikationen.gs1-germany.de/Complete/ae_schuhe/... for a list of MOA codes (German - this is a German company invoice). > Invoice 19 is a "credit note", code BGM+381. See https://www.gs1.org/sites/default/files/docs/eancom/ean02s4/... for a list of BGM codes, column "Description" in the row under "C002 DOCUMENT/MESSAGE NAME" > Generate Excel report > No. Go back and generate a detailed Excel report with all details including the line items, with each invoice in a separate sheet. > Create a variant: All 27 invoices in one sheet, with an additional column for the invoice or credit note number > Add a second sheet with a table with summary data for each invoice, including all MOA codes for each invoice as a separate column The result was an Excel file with an invoice per worksheet, and meta data in an additional sheet. Similarly, by simply doing what I wrote above, at the start telling the AI to not do anything but to instead give me a Python script, and similar instructions, I got a several hundred lines ling Python script that processed my collected DESADV EDI messages in XML format ("Process a folder of DESADV XML files and generate an Excel report.") If I had had to actually write that code myself, it would have taken me all day and maybe more, mostly because I would have had to research a lot of things first. I'm not exactly parsing various format EDI messages every day after all. For this, I wrote a pretty lengthy and very detailed request though, 44 long lines of text, detailing exactly which items with which path I wanted from the XML, and how to name and type them in the result-Excel. ChatGPT Query: https://pastebin.com/1uyzgicx Result (Python script): https://pastebin.com/rTNJ1p0c | ||