{"id":3925,"date":"2022-12-06T16:45:09","date_gmt":"2022-12-06T15:45:09","guid":{"rendered":"https:\/\/gdksoftware.com\/knowledgebase\/delphi-and-chatgpt"},"modified":"2023-07-10T13:30:44","modified_gmt":"2023-07-10T12:30:44","slug":"delphi-e-chatgpt","status":"publish","type":"knowledge","link":"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt","title":{"rendered":"Delphi e ChatGPT"},"content":{"rendered":"<p>Sem d\u00favida voc\u00ea j\u00e1 ouviu falar sobre o novo hype ChatGPT nas not\u00edcias. Caso contr\u00e1rio, o ChatGPT \u00e9 a nova ferramenta do OpenAI (Chat.OpenAI.com) que lhe permite &#8216;falar&#8217; com a IA do OpenAI muito rapidamente atrav\u00e9s de uma interface de mensagens. Voc\u00ea pode falar sobre tudo, desde id\u00e9ias para uma festa de 8 anos, o funcionamento de um computador qu\u00e2ntico e linguagens de programa\u00e7\u00e3o como Delphi. E depois fica interessante.<\/p>\n<p>O ChatGPT pode, de fato, programar. N\u00e3o como um verdadeiro desenvolvedor, mas como uma IA pode programar. Isso significa que h\u00e1 um limite para o c\u00f3digo que voc\u00ea pode gerar, mas, ao mesmo tempo, pode absolutamente ajud\u00e1-lo no desenvolvimento. Est\u00e1 na hora de uma pequena demonstra\u00e7\u00e3o. Escrevi-a neste post do blog, mas se voc\u00ea preferir assistir do que l\u00ea-la, voc\u00ea pode encontrar o v\u00eddeo sobre ChatGPT e Delphi aqui. Voc\u00ea tamb\u00e9m ver\u00e1 o processo ao vivo, por isso \u00e9 definitivamente recomendado assistir ao v\u00eddeo.<\/p>\n<p>Come\u00e7amos com uma pergunta simples; voc\u00ea pode criar uma classe no Delphi para gerenciar uma empresa?<\/p>\n<p>&nbsp;<\/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>A beleza do ChatGPT \u00e9 que voc\u00ea pode ent\u00e3o continuar com o mesmo t\u00f3pico:<\/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>&nbsp;<\/p>\n<p>Al\u00e9m de gerar classes rapidamente, tamb\u00e9m \u00e9 poss\u00edvel configurar chamadas API. Como exemplo, vamos levar a chamada para a pr\u00f3pria api OpenAI:<\/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>Como voc\u00ea pode ver, \u00e9 poss\u00edvel usar uma IA para pe\u00e7as simples de c\u00f3digo para criar c\u00f3digo Delphi b\u00e1sico rapidamente. Agora podemos ir um passo al\u00e9m e implement\u00e1-lo no pr\u00f3prio Delphi.<\/p>\n<p>Infelizmente, o ChatGPT n\u00e3o tem uma API p\u00fablica dispon\u00edvel no momento da escrita, mas podemos interagir com api normal do OpenAI. Isto ainda funciona um pouco menos avan\u00e7ado, mas espero que a api ChatGPT tamb\u00e9m fique dispon\u00edvel em breve. De qualquer forma, acabei de criar rapidamente um plugin Delphi que usa a api OpenAI e coloca o c\u00f3digo no Delphi.<\/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>Como voc\u00ea pode ver, o c\u00f3digo gerado ainda n\u00e3o \u00e9 compil\u00e1vel. O ChatGPT atualmente d\u00e1 resultados significativamente melhores, e n\u00e3o posso esperar pelo momento em que poderemos integr\u00e1-lo na IDE Delphi. Assim que esse tempo chegar, fornecerei o c\u00f3digo para o plugin Delphi tamb\u00e9m. Por enquanto, pelo menos, voc\u00ea pode come\u00e7ar com o ChatGPT aqui. Se voc\u00ea encontrar algum resultado interessante de suas conversas com o ChatGPT, por favor me avise!<\/p>\n","protected":false},"featured_media":0,"parent":0,"template":"","class_list":["post-3925","knowledge","type-knowledge","status-publish","hentry","knowledge-category-arquivo-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 e ChatGPT - GDK Software<\/title>\n<meta name=\"description\" content=\"GDK Software explora o uso do Delphi e do ChatGPT API, entenda como usar essa novidade!\" \/>\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\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Delphi e ChatGPT\" \/>\n<meta property=\"og:description\" content=\"GDK Software explora o uso do Delphi e do ChatGPT API, entenda como usar essa novidade!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt\" \/>\n<meta property=\"og:site_name\" content=\"GDK Software\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-10T12:30:44+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=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\\\/base-de-conhecimento\\\/delphi-e-chatgpt\",\"url\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\\\/base-de-conhecimento\\\/delphi-e-chatgpt\",\"name\":\"Delphi e ChatGPT - GDK Software\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\\\/base-de-conhecimento\\\/delphi-e-chatgpt#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\\\/base-de-conhecimento\\\/delphi-e-chatgpt#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/gdksoftware.com\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/Delphi-and-ChatGPT-1.png\",\"datePublished\":\"2022-12-06T15:45:09+00:00\",\"dateModified\":\"2023-07-10T12:30:44+00:00\",\"description\":\"GDK Software explora o uso do Delphi e do ChatGPT API, entenda como usar essa novidade!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\\\/base-de-conhecimento\\\/delphi-e-chatgpt#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gdksoftware.com\\\/pt-br\\\/base-de-conhecimento\\\/delphi-e-chatgpt\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"pt-BR\",\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\\\/base-de-conhecimento\\\/delphi-e-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\\\/pt-br\\\/base-de-conhecimento\\\/delphi-e-chatgpt#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Knowledgebase\",\"item\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\\\/base-de-conhecimento\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Delphi\",\"item\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\\\/knowledgebase-category\\\/arquivo-delphi\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Delphi e ChatGPT\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br#website\",\"url\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br\",\"name\":\"GDK Software\",\"description\":\"Zet de stip op je horizon\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gdksoftware.com\\\/pt-br?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"pt-BR\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Delphi e ChatGPT - GDK Software","description":"GDK Software explora o uso do Delphi e do ChatGPT API, entenda como usar essa novidade!","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\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt","og_locale":"pt_BR","og_type":"article","og_title":"Delphi e ChatGPT","og_description":"GDK Software explora o uso do Delphi e do ChatGPT API, entenda como usar essa novidade!","og_url":"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt","og_site_name":"GDK Software","article_modified_time":"2023-07-10T12:30:44+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":{"Est. tempo de leitura":"3 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt","url":"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt","name":"Delphi e ChatGPT - GDK Software","isPartOf":{"@id":"https:\/\/gdksoftware.com\/pt-br#website"},"primaryImageOfPage":{"@id":"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt#primaryimage"},"image":{"@id":"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt#primaryimage"},"thumbnailUrl":"https:\/\/gdksoftware.com\/wp-content\/uploads\/2022\/12\/Delphi-and-ChatGPT-1.png","datePublished":"2022-12-06T15:45:09+00:00","dateModified":"2023-07-10T12:30:44+00:00","description":"GDK Software explora o uso do Delphi e do ChatGPT API, entenda como usar essa novidade!","breadcrumb":{"@id":"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt"]}]},{"@type":"ImageObject","inLanguage":"pt-BR","@id":"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento\/delphi-e-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\/pt-br\/base-de-conhecimento\/delphi-e-chatgpt#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gdksoftware.com\/pt-br"},{"@type":"ListItem","position":2,"name":"Knowledgebase","item":"https:\/\/gdksoftware.com\/pt-br\/base-de-conhecimento"},{"@type":"ListItem","position":3,"name":"Delphi","item":"https:\/\/gdksoftware.com\/pt-br\/knowledgebase-category\/arquivo-delphi"},{"@type":"ListItem","position":4,"name":"Delphi e ChatGPT"}]},{"@type":"WebSite","@id":"https:\/\/gdksoftware.com\/pt-br#website","url":"https:\/\/gdksoftware.com\/pt-br","name":"GDK Software","description":"Zet de stip op je horizon","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gdksoftware.com\/pt-br?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"pt-BR"}]}},"_links":{"self":[{"href":"https:\/\/gdksoftware.com\/pt-br\/wp-json\/wp\/v2\/knowledge\/3925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gdksoftware.com\/pt-br\/wp-json\/wp\/v2\/knowledge"}],"about":[{"href":"https:\/\/gdksoftware.com\/pt-br\/wp-json\/wp\/v2\/types\/knowledge"}],"acf:post":[{"embeddable":true,"href":"https:\/\/gdksoftware.com\/pt-br\/wp-json\/wp\/v2\/team\/414"}],"wp:attachment":[{"href":"https:\/\/gdksoftware.com\/pt-br\/wp-json\/wp\/v2\/media?parent=3925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}