{"id":3808,"date":"2022-12-06T16:46:13","date_gmt":"2022-12-06T15:46:13","guid":{"rendered":"https:\/\/gdksoftware.com\/?post_type=knowledge&#038;p=3808"},"modified":"2022-12-06T16:48:10","modified_gmt":"2022-12-06T15:48:10","slug":"delphi-and-chatgpt","status":"publish","type":"knowledge","link":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt","title":{"rendered":"Delphi en ChatGPT"},"content":{"rendered":"<p>Ongetwijfeld heb je in het nieuws van de nieuwe hype ChatGPT gehoord. Zo niet; ChatGPT is een nieuwe tool van OpenAI (<a href=\"http:\/\/Chat.OpenAI.com\" target=\"_blank\" rel=\"noopener\">Chat.OpenAI.com<\/a>) waarmee je via een berichteninterface heel eenvoudig kunt \u2018praten\u2019 met de AI van de OpenAI. Je kunt het over allerlei onderwerpen hebben, van idee\u00ebn voor een feestje van een 8-jarige, de werking van een kwantumcomputer en over programmeertalen zoals Delphi. En dan wordt het interessant.<\/p>\n<p>ChatGPT kan namelijk programmeren. Niet zoals een echte ontwikkelaar, maar zoals een AI kan programmeren. Dat betekent dat er een behoorlijke limiet zit op de code die je kunt genereren, maar tegelijk dat het je bij het ontwikkelen absoluut wel kan helpen. Het is tijd voor een korte demo. Ik heb het uitgeschreven in deze blog post, maar als je liever kijkt dan leest kun je hier de bijbehorende <a href=\"https:\/\/youtu.be\/FMMcOVR_EQQ\" target=\"_blank\" rel=\"noopener\">video over ChatGPT en Delphi<\/a> vinden. Daar zie je het proces ook live, dus het is zeker aan te raden om de video even te kijken.<\/p>\n<p>We starten met een simpele vraag; kun je een class maken in Delphi voor het managen van een bedrijf:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-3809\" src=\"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1.png\" alt=\"\" width=\"993\" height=\"946\" srcset=\"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1.png 993w, https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1-300x286.png 300w, https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1-768x732.png 768w\" sizes=\"(max-width: 993px) 100vw, 993px\" \/><\/p>\n<p>Het mooie van ChatGPT is dat je vervolgens door kunt gaan met hetzelfde onderwerp:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-3812\" src=\"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-2.png\" alt=\"\" width=\"1004\" height=\"892\" srcset=\"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-2.png 1004w, https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-2-300x267.png 300w, https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-2-768x682.png 768w\" sizes=\"(max-width: 1004px) 100vw, 1004px\" \/><\/p>\n<p>De ChatGPT geeft nog meer informatie, bijvoorbeeld hoe je de salarissen kunt berekenen.<\/p>\n<p>Naast het snel genereren van classes, is het ook mogelijk om API calls op te zetten. Als voorbeeld nemen we de aanroep van een call naar de OpenAI api zelf:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-3818\" src=\"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-3.png\" alt=\"\" width=\"994\" height=\"972\" srcset=\"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-3.png 994w, https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-3-300x293.png 300w, https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-3-768x751.png 768w\" sizes=\"(max-width: 994px) 100vw, 994px\" \/><\/p>\n<p>Zoals je ziet is het mogelijk om voor eenvoudige stukken code een AI te gebruiken om snel een basisopzet te maken van Delphi code. We kunnen nu nog een stap verder gaan, en dit implementeren in Delphi zelf.<\/p>\n<p>Helaas heeft de ChatGPT op het moment van schrijven nog geen publieke API beschikbaar, maar we kunnen wel met normale OpenAI api communiceren. Deze werkt nog wat minder geavanceerd, maar ik verwacht dat de ChatGPT api binnenkort ook beschikbaar komt. In ieder geval; ik heb even snel een Delphi plugin gemaakt die gebruik maakt van de OpenAI api en de code in Delphi zet.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-3821\" src=\"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-4.png\" alt=\"\" width=\"1717\" height=\"1146\" srcset=\"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-4.png 1717w, https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-4-300x200.png 300w, https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-4-768x513.png 768w, https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-4-1536x1025.png 1536w\" sizes=\"(max-width: 1717px) 100vw, 1717px\" \/><\/p>\n<p>Zoals je kunt zien is de gegenereerde code nog niet compileerbaar. De ChatGPT geeft op dit moment significant betere resultaten, en ik kan niet wachten op het moment dat we dit kunnen integreren in de Delphi IDE. Zodra dat moment er is zal ik de code voor de Delphi plugin ook geven. Voor nu kun je <a href=\"http:\/\/Chat.OpenAI.com\" target=\"_blank\" rel=\"noopener\">hier<\/a> in ieder geval aan de slag met de ChatGPT. Als je interessante resultaten vindt uit je chats met ChatGPT, laat het me dan weten!<\/p>\n","protected":false},"featured_media":0,"parent":0,"template":"","class_list":["post-3808","knowledge","type-knowledge","status-publish","hentry","knowledge-category-delphi"],"acf":{"author":414,"type_hero":"compact","hero_image":3824,"hero_image_position":"","hero_title":"Delphi and ChatGPT","hero_content":"","hero_link":null,"hero_show_h1":false},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Delphi en ChatGPT - GDK Software<\/title>\n<meta name=\"description\" content=\"GDK Software explores the use of Delphi and the ChatGPT API\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt\" \/>\n<meta property=\"og:locale\" content=\"nl_NL\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Delphi en ChatGPT\" \/>\n<meta property=\"og:description\" content=\"GDK Software explores the use of Delphi and the ChatGPT API\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt\" \/>\n<meta property=\"og:site_name\" content=\"GDK Software\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-06T15:48:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Geschatte leestijd\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank\\\/delphi-and-chatgpt\",\"url\":\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank\\\/delphi-and-chatgpt\",\"name\":\"Delphi en ChatGPT - GDK Software\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/nl#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank\\\/delphi-and-chatgpt#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank\\\/delphi-and-chatgpt#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gdksoftware.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Delphi-and-ChatGPT-1.png\",\"datePublished\":\"2022-12-06T15:46:13+00:00\",\"dateModified\":\"2022-12-06T15:48:10+00:00\",\"description\":\"GDK Software explores the use of Delphi and the ChatGPT API\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank\\\/delphi-and-chatgpt#breadcrumb\"},\"inLanguage\":\"nl-NL\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank\\\/delphi-and-chatgpt\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"nl-NL\",\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank\\\/delphi-and-chatgpt#primaryimage\",\"url\":\"https:\\\/\\\/gdksoftware.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Delphi-and-ChatGPT-1.png\",\"contentUrl\":\"https:\\\/\\\/gdksoftware.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Delphi-and-ChatGPT-1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank\\\/delphi-and-chatgpt#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gdksoftware.com\\\/nl\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledgebase\",\"item\":\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Delphi\",\"item\":\"https:\\\/\\\/gdksoftware.com\\\/nl\\\/kennisbank-categorie\\\/delphi\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Delphi en ChatGPT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/nl#website\",\"url\":\"https:\\\/\\\/gdksoftware.com\\\/nl\",\"name\":\"GDK Software\",\"description\":\"Zet de stip op je horizon\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gdksoftware.com\\\/nl?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"nl-NL\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Delphi en ChatGPT - GDK Software","description":"GDK Software explores the use of Delphi and the ChatGPT API","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt","og_locale":"nl_NL","og_type":"article","og_title":"Delphi en ChatGPT","og_description":"GDK Software explores the use of Delphi and the ChatGPT API","og_url":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt","og_site_name":"GDK Software","article_modified_time":"2022-12-06T15:48:10+00:00","og_image":[{"url":"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Geschatte leestijd":"3 minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt","url":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt","name":"Delphi en ChatGPT - GDK Software","isPartOf":{"@id":"https:\/\/gdksoftware.com\/nl#website"},"primaryImageOfPage":{"@id":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt#primaryimage"},"image":{"@id":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt#primaryimage"},"thumbnailUrl":"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1.png","datePublished":"2022-12-06T15:46:13+00:00","dateModified":"2022-12-06T15:48:10+00:00","description":"GDK Software explores the use of Delphi and the ChatGPT API","breadcrumb":{"@id":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt#breadcrumb"},"inLanguage":"nl-NL","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt"]}]},{"@type":"ImageObject","inLanguage":"nl-NL","@id":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt#primaryimage","url":"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1.png","contentUrl":"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/gdksoftware.com\/nl\/kennisbank\/delphi-and-chatgpt#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gdksoftware.com\/nl"},{"@type":"ListItem","position":2,"name":"Knowledgebase","item":"https:\/\/gdksoftware.com\/nl\/kennisbank"},{"@type":"ListItem","position":3,"name":"Delphi","item":"https:\/\/gdksoftware.com\/nl\/kennisbank-categorie\/delphi"},{"@type":"ListItem","position":4,"name":"Delphi en ChatGPT"}]},{"@type":"WebSite","@id":"https:\/\/gdksoftware.com\/nl#website","url":"https:\/\/gdksoftware.com\/nl","name":"GDK Software","description":"Zet de stip op je horizon","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gdksoftware.com\/nl?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"nl-NL"}]}},"_links":{"self":[{"href":"https:\/\/gdksoftware.com\/nl\/wp-json\/wp\/v2\/knowledge\/3808","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gdksoftware.com\/nl\/wp-json\/wp\/v2\/knowledge"}],"about":[{"href":"https:\/\/gdksoftware.com\/nl\/wp-json\/wp\/v2\/types\/knowledge"}],"acf:post":[{"embeddable":true,"href":"https:\/\/gdksoftware.com\/nl\/wp-json\/wp\/v2\/team\/414"}],"wp:attachment":[{"href":"https:\/\/gdksoftware.com\/nl\/wp-json\/wp\/v2\/media?parent=3808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}