{"id":2216,"date":"2026-12-03T13:12:49","date_gmt":"2026-12-03T12:12:49","guid":{"rendered":"https:\/\/www.loicmathieu.fr\/wordpress\/fr\/?p=2216"},"modified":"2026-12-03T13:16:41","modified_gmt":"2026-12-03T12:16:41","slug":"create-a-chatbot-with-google-generative-ai-and-quarkus","status":"publish","type":"post","link":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/","title":{"rendered":"Create a chatbot with Google Generative AI and Quarkus"},"content":{"rendered":"<p>I recently created a Quarkus extension that provides access to <a href=\"https:\/\/cloud.google.com\/ai\/generative-ai\">Google Generative AI<\/a>.\nIn this article, I\u2019ll use this extension to create a chatbot.<\/p>\n<p>The first step is to create a Quarkus project that includes the <strong>REST<\/strong> and <strong>Google Cloud Gen AI<\/strong> extensions.<\/p>\n<p>Here are the extensions to add to your dependencies file:<\/p>\n<pre class=\"brush: xml; notranslate\">\n&lt;dependency&gt;\n        &lt;groupId&gt;io.quarkus&lt;\/groupId&gt;\n        &lt;artifactId&gt;quarkus-rest&lt;\/artifactId&gt;\n&lt;\/dependency&gt;\n&lt;dependency&gt;\n        &lt;groupId&gt;io.quarkiverse.googlecloudservices&lt;\/groupId&gt;\n        &lt;artifactId&gt;quarkus-google-cloud-genai&lt;\/artifactId&gt;\n&lt;\/dependency&gt;\n<\/pre>\n<p>Or, simpler, here&#8217;s a link that will let you create a project from <a href=\"https:\/\/code.quarkus.io\/?g=fr.loicmathieu.google.genai&amp;a=quarkus-gen-ai&amp;e=rest&amp;extension-search=rest,google-cloud-genai\">code.quarkus.io<\/a>.<\/p>\n<p>The extension allows you to inject a <code>Client<\/code> object into a Quarkus application to access the Google Cloud Generartive AI service. This service lets you use the <strong>Gemini<\/strong> generative AI model in a Google Cloud project.<\/p>\n<p>We\u2019ll use this extension in a REST endpoint to build a chatbot. Since I\u2019m not too keen on developing UIs, I\u2019ll use cURL to call the chatbot.<\/p>\n<p>Here\u2019s the starting code for a chatbot:<\/p>\n<pre class=\"brush: java; notranslate\">\npackage fr.loicmathieu.google.genai;\n\n\/\/ [...] imports omitted for brevity\n\n\/\/ 1. Standard REST endpoint available on \/chat\n@Path(&quot;\/chat&quot;)\npublic class GenAIResource {\n    \/\/ 2. System message telling the LLM it is a chatbot\n    private static final String SYSTEM_INSTRUCTION = &quot;&quot;&quot;\n        You are a chatbot named Lo\u00efc.\n        Don&#039;t pretend you know everything,\n        but be helpful with a touch of humour.&quot;&quot;&quot;;\n\n    private GenerateContentConfig config;\n\n    \/\/ 3. Injection of the provided GenAI Client object\n    @Inject\n    Client client;\n\n    \/\/ 4. Init the configuration with the system instruction\n    @PostConstruct\n    void init() {\n        var systemInstruction = Content.fromParts(Part.fromText(SYSTEM_INSTRUCTION));\n        config = GenerateContentConfig.builder()\n            .systemInstruction(systemInstruction).build();\n    }\n\n    \/\/ 5. Generate a chat response on each call to \/chat\n    @GET\n    public String chat(@QueryParam(&quot;prompt&quot;) String prompt) {\n        return client.models\n            .generateContent(&quot;gemini-3.8-flash&quot;, prompt, config).text() + &quot;\\n&quot;;\n    }\n}\n<\/pre>\n<ol><li>A REST endpoint using the JAX-RS standard, available at the <code>\/chat<\/code> path in the application.<\/li>\n<li>System message informing the model that it is a chatbot and asking it to respond with a touch of humor.<\/li>\n<li>Injection of the <code>Client<\/code> GenAI service, which is provided by the <strong>Quarkus Google Cloud GenAI<\/strong> extension.<\/li>\n<li>Initialization of the configuration in the REST endpoint\u2019s post-construct method.<\/li>\n<li>Each time the endpoint is called, we\u2019ll invoke the model and return the first generated response. A real-world application would certainly implement something more advanced. Here, we\u2019re using <strong>Gemini Flash 3.8<\/strong> because Gemini Flash is a model that combines performance with cost efficiency; exactly what we want for a chatbot that needs to respond quickly and doesn\u2019t require overly complex <em>reasoning<\/em>.<\/li>\n<\/ol>\n<p>To start the application in dev mode, you can use the Quarkus CLI: <code>quarkus dev<\/code>; the application will then be available on port 8080.<\/p>\n<p>To call the chatbot, I use the following cURL command: <code>curl -G localhost:8080\/chat --data-urlencode &quot;prompt=Tell me a joke&quot;<\/code>. For those who aren\u2019t familiar with this, using <code>-G<\/code> forces cURL to perform a GET request, which will then pass the data as a query string in the URL. This helps avoid any encoding issues with spaces by using <code>--data-urlencode<\/code>.<\/p>\n<p>Here\u2019s an example conversation:<\/p>\n<img data-recalc-dims=\"1\" height=\"294\" width=\"640\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/loicmathieu.fr\/wordpress\/wp-content\/uploads\/Capture-decran-du-2026-11-13-15-42-22-1024x470.png?resize=640%2C294&#038;ssl=1\" alt=\"Capture d\u2019\u00e9cran du 2026-11-13 15-42-22\" title=\"\" class=\"alignnone\" \/>\n<p>As you can see, everything is going well until I ask him what my name is! Even though I just told him, he doesn&#8217;t know it because he has no memory.<\/p>\n<p>We&#8217;re going to add a memory to the chatbot so we can have a real conversation with it; this is done through a chat session.<\/p>\n<pre class=\"brush: java; notranslate\">\npackage fr.loicmathieu.quarkus.vertexai;\n\n\/\/ [...] Imports omitted for brevity\n\n\/\/ 1. Standard REST endpoint available on \/chat\n@Path(&quot;\/chat&quot;)\npublic class GenAIResource {\n    \/\/ 2. System message telling the LLM it is a chatbot\n    private static final String SYSTEM_INSTRUCTION = &quot;&quot;&quot;\n        You are a chatbot named Lo\u00efc.\n        Don&#039;t pretend you know everything;\n            but be helpful with a touch of humour.&quot;&quot;&quot;;\n\n    private Chat chat;\n\n    \/\/ 3. Injection of the provided GenAI Client object\n    @Inject\n    Client client;\n\n    \/\/ 4. Init the configuration with the system instruction and a chat session\n    @PostConstruct\n    void init() {\n        var systemInstruction = Content.fromParts(Part.fromText(SYSTEM_INSTRUCTION));\n        var config = GenerateContentConfig.builder().\n            systemInstruction(systemInstruction).build();\n\n        chat = client.chats.create(&quot;gemini-3.8-flash&quot;, config);\n    }\n\n    \/\/ 5. Generate a chat response on each call to \/chat\n    @GET\n    public String chat(@QueryParam(&quot;prompt&quot;) String prompt) {\n        return chat.sendMessage(prompt).text() + &quot;\\n&quot;;\n    }\n}\n<\/pre>\n<p>With a memory, the chatbot works much better!<\/p>\n<img data-recalc-dims=\"1\" height=\"294\" width=\"640\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/loicmathieu.fr\/wordpress\/wp-content\/uploads\/Capture-decran-du-2026-11-13-15-46-20-1024x470.png?resize=640%2C294&#038;ssl=1\" alt=\"Capture d\u2019\u00e9cran du 2026-11-13 15-46-20\" title=\"\" class=\"alignnone\" \/>\n<p>Here, I used a single chat session for the entire application, stored in memory (RAM). In a real-world scenario, you\u2019ll of course need to use one chat session per user, ideally stored persistently.<\/p>\n<p>That\u2019s all for today; we\u2019ve learned how to create a chatbot in Quarkus using Google Generative AI and the Gemini model.\nGoogle GenAI supports many other features: RAG, multimodal completion, tools, and more. You can find more information in its <a href=\"https:\/\/github.com\/googleapis\/java-genai\/tree\/main\">documentation<\/a>.<\/p>\n<p>You can find the project code on GitHub: <a href=\"https:\/\/github.com\/loicmathieu\/quarkus-gen-ai\">quarkus-gen-ai<\/a>.<\/p>\n<p>Thank you to Google for providing Google Cloud credits to write this article.<\/p>","protected":false},"excerpt":{"rendered":"<p>I recently created a Quarkus extension that provides access to Google Generative AI. In this article, I\u2019ll use this extension to create a chatbot. The first step is to create a Quarkus project that includes the REST and Google Cloud Gen AI extensions. Here are the extensions to add to your dependencies file: Or, simpler, here&#8217;s a link that will let you create a project from code.quarkus.io. The extension allows you to inject a Client object into a Quarkus application&#8230;<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"federated","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false,"_members_access_role":[],"_members_access_error":""},"categories":[9],"tags":[227,228,11,167],"class_list":["post-2216","post","type-post","status-publish","format-standard","hentry","category-informatique","tag-ai","tag-genai","tag-java","tag-quarkus"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.6.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"I recently created a Quarkus extension that provides access to Google Generative AI. In this article, I\u2019ll use this extension to create a chatbot. The first step is to create a Quarkus project that includes the REST and Google Cloud Gen AI extensions. Here are the extensions to add to your dependencies file: Or, simpler,\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"admin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.6.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Loic&#039;s Blog | Blog about IT developement, and some more stuff (travel, ecology, ...)\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Create a chatbot with Google Generative AI and Quarkus | Loic&#039;s Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"I recently created a Quarkus extension that provides access to Google Generative AI. In this article, I\u2019ll use this extension to create a chatbot. The first step is to create a Quarkus project that includes the REST and Google Cloud Gen AI extensions. Here are the extensions to add to your dependencies file: Or, simpler,\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-12-03T12:12:49+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-12-03T12:16:41+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Create a chatbot with Google Generative AI and Quarkus | Loic&#039;s Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I recently created a Quarkus extension that provides access to Google Generative AI. In this article, I\u2019ll use this extension to create a chatbot. The first step is to create a Quarkus project that includes the REST and Google Cloud Gen AI extensions. Here are the extensions to add to your dependencies file: Or, simpler,\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#article\",\"name\":\"Create a chatbot with Google Generative AI and Quarkus | Loic's Blog\",\"headline\":\"Create a chatbot with Google Generative AI and Quarkus\",\"author\":{\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/loicmathieu.fr\\\/wordpress\\\/wp-content\\\/uploads\\\/Capture-decran-du-2026-11-13-15-42-22-1024x470.png\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#articleImage\"},\"datePublished\":\"2026-12-03T13:12:49+01:00\",\"dateModified\":\"2026-12-03T13:16:41+01:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#webpage\"},\"articleSection\":\"informatique, ai, genai, java, quarkus\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/category\\\/informatique\\\/#listItem\",\"name\":\"informatique\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/category\\\/informatique\\\/#listItem\",\"position\":2,\"name\":\"informatique\",\"item\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/category\\\/informatique\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#listItem\",\"name\":\"Create a chatbot with Google Generative AI and Quarkus\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#listItem\",\"position\":3,\"name\":\"Create a chatbot with Google Generative AI and Quarkus\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/category\\\/informatique\\\/#listItem\",\"name\":\"informatique\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/#organization\",\"name\":\"Loic's Blog\",\"description\":\"Blog about IT developement, and some more stuff (travel, ecology, ...)\",\"url\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/author\\\/admin\\\/\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/2b39eb909797d1241a4191e41489c1fbe0b3d68daf31e77779b61ce2f4422b52?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"admin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#webpage\",\"url\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/\",\"name\":\"Create a chatbot with Google Generative AI and Quarkus | Loic's Blog\",\"description\":\"I recently created a Quarkus extension that provides access to Google Generative AI. In this article, I\\u2019ll use this extension to create a chatbot. The first step is to create a Quarkus project that includes the REST and Google Cloud Gen AI extensions. Here are the extensions to add to your dependencies file: Or, simpler,\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/informatique\\\/create-a-chatbot-with-google-generative-ai-and-quarkus\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2026-12-03T13:12:49+01:00\",\"dateModified\":\"2026-12-03T13:16:41+01:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/#website\",\"url\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/\",\"name\":\"Loic's Blog\",\"description\":\"Blog about IT developement, and some more stuff (travel, ecology, ...)\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.loicmathieu.fr\\\/wordpress\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Create a chatbot with Google Generative AI and Quarkus | Loic's Blog","description":"I recently created a Quarkus extension that provides access to Google Generative AI. In this article, I\u2019ll use this extension to create a chatbot. The first step is to create a Quarkus project that includes the REST and Google Cloud Gen AI extensions. Here are the extensions to add to your dependencies file: Or, simpler,","canonical_url":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#article","name":"Create a chatbot with Google Generative AI and Quarkus | Loic's Blog","headline":"Create a chatbot with Google Generative AI and Quarkus","author":{"@id":"https:\/\/www.loicmathieu.fr\/wordpress\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/www.loicmathieu.fr\/wordpress\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/loicmathieu.fr\/wordpress\/wp-content\/uploads\/Capture-decran-du-2026-11-13-15-42-22-1024x470.png","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#articleImage"},"datePublished":"2026-12-03T13:12:49+01:00","dateModified":"2026-12-03T13:16:41+01:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#webpage"},"isPartOf":{"@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#webpage"},"articleSection":"informatique, ai, genai, java, quarkus"},{"@type":"BreadcrumbList","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/#listItem","position":1,"name":"Home","item":"https:\/\/www.loicmathieu.fr\/wordpress\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/#listItem","name":"informatique"}},{"@type":"ListItem","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/#listItem","position":2,"name":"informatique","item":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#listItem","name":"Create a chatbot with Google Generative AI and Quarkus"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#listItem","position":3,"name":"Create a chatbot with Google Generative AI and Quarkus","previousItem":{"@type":"ListItem","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/#listItem","name":"informatique"}}]},{"@type":"Organization","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/#organization","name":"Loic's Blog","description":"Blog about IT developement, and some more stuff (travel, ecology, ...)","url":"https:\/\/www.loicmathieu.fr\/wordpress\/"},{"@type":"Person","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/author\/admin\/#author","url":"https:\/\/www.loicmathieu.fr\/wordpress\/author\/admin\/","name":"admin","image":{"@type":"ImageObject","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/2b39eb909797d1241a4191e41489c1fbe0b3d68daf31e77779b61ce2f4422b52?s=96&d=mm&r=g","width":96,"height":96,"caption":"admin"}},{"@type":"WebPage","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#webpage","url":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/","name":"Create a chatbot with Google Generative AI and Quarkus | Loic's Blog","description":"I recently created a Quarkus extension that provides access to Google Generative AI. In this article, I\u2019ll use this extension to create a chatbot. The first step is to create a Quarkus project that includes the REST and Google Cloud Gen AI extensions. Here are the extensions to add to your dependencies file: Or, simpler,","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.loicmathieu.fr\/wordpress\/#website"},"breadcrumb":{"@id":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/#breadcrumblist"},"author":{"@id":"https:\/\/www.loicmathieu.fr\/wordpress\/author\/admin\/#author"},"creator":{"@id":"https:\/\/www.loicmathieu.fr\/wordpress\/author\/admin\/#author"},"datePublished":"2026-12-03T13:12:49+01:00","dateModified":"2026-12-03T13:16:41+01:00"},{"@type":"WebSite","@id":"https:\/\/www.loicmathieu.fr\/wordpress\/#website","url":"https:\/\/www.loicmathieu.fr\/wordpress\/","name":"Loic's Blog","description":"Blog about IT developement, and some more stuff (travel, ecology, ...)","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.loicmathieu.fr\/wordpress\/#organization"}}]},"og:locale":"en_US","og:site_name":"Loic's Blog | Blog about IT developement, and some more stuff (travel, ecology, ...)","og:type":"article","og:title":"Create a chatbot with Google Generative AI and Quarkus | Loic's Blog","og:description":"I recently created a Quarkus extension that provides access to Google Generative AI. In this article, I\u2019ll use this extension to create a chatbot. The first step is to create a Quarkus project that includes the REST and Google Cloud Gen AI extensions. Here are the extensions to add to your dependencies file: Or, simpler,","og:url":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/","article:published_time":"2026-12-03T12:12:49+00:00","article:modified_time":"2026-12-03T12:16:41+00:00","twitter:card":"summary","twitter:title":"Create a chatbot with Google Generative AI and Quarkus | Loic's Blog","twitter:description":"I recently created a Quarkus extension that provides access to Google Generative AI. In this article, I\u2019ll use this extension to create a chatbot. The first step is to create a Quarkus project that includes the REST and Google Cloud Gen AI extensions. Here are the extensions to add to your dependencies file: Or, simpler,"},"aioseo_meta_data":{"post_id":"2216","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"created":"2026-11-13 13:57:25","updated":"2026-12-03 12:16:41","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.loicmathieu.fr\/wordpress\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/\" title=\"informatique\">informatique<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tCreate a chatbot with Google Generative AI and Quarkus\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.loicmathieu.fr\/wordpress\/"},{"label":"informatique","link":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/"},{"label":"Create a chatbot with Google Generative AI and Quarkus","link":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/create-a-chatbot-with-google-generative-ai-and-quarkus\/"}],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1560,"url":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/quarkus-tip-tester-une-fonction-google-cloud\/","url_meta":{"origin":2216,"position":0},"title":"Quarkus Tip: Testing a Google Cloud function","author":"admin","date":"Thursday December 29th, 2022","format":false,"excerpt":"I recently contributed a PR to Quarkus that contains a testing framework for Google Cloud functions. Quarkus supports creating Google Cloud functions three different ways: Using the Google Cloud API. Using a Quarkus HTTP extension: RESTEasy, Reactive routes, Servlet, Spring Web. Using Funqy, the cloud provider agnostic Quarkus function API.\u2026","rel":"","context":"In &quot;informatique&quot;","block_context":{"text":"informatique","link":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1005,"url":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/quarkus-et-testcontainers\/","url_meta":{"origin":2216,"position":1},"title":"Quarkus and Testcontainers","author":"admin","date":"Monday February 17th, 2020","format":false,"excerpt":"If you did not know Quarkus, here is an introductory article: Zoom sur Quarkus (french). Quarkus offers Unit Test (TU) support with JUnit 5 via the @QuarkusTest annotation, documentation for Quarkus TU support can be found here. Here is an example of a TU from the Hibernate ORM Quickstart :\u2026","rel":"","context":"In &quot;informatique&quot;","block_context":{"text":"informatique","link":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1353,"url":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/quarkus-tip-comment-ne-pas-creer-une-extension-quarkus\/","url_meta":{"origin":2216,"position":2},"title":"Quarkus Tip: How NOT to create a Quarkus extension","author":"admin","date":"Tuesday November 16th, 2021","format":false,"excerpt":"When you develop an application composed of several components, it is frequent to want to share some code in an external library, for example via an external JAR integrated as a dependency of your components. Quarkus is an extension framework, each extension it offers allows to integrate a technology (BDD\u2026","rel":"","context":"In &quot;informatique&quot;","block_context":{"text":"informatique","link":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1345,"url":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/quarkus-et-les-google-cloud-functions\/","url_meta":{"origin":2216,"position":3},"title":"Quarkus and  the Google Cloud Functions","author":"admin","date":"Tuesday November  2nd, 2021","format":false,"excerpt":"Quarkus is a microservice framework designed for the cloud and the containers. It is designed to have a reduced memory usage and the shortest possible startup time. It is mainly based on standards (Jakarta EE, Eclipse MicroProfile, ...) and allows the use of mature and widespread Java libraries via its\u2026","rel":"","context":"In &quot;informatique&quot;","block_context":{"text":"informatique","link":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2089,"url":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/deploy-a-quarkus-application-in-cloud-run\/","url_meta":{"origin":2216,"position":4},"title":"Deploy a Quarkus application in Cloud Run","author":"admin","date":"Tuesday December 30th, 2025","format":false,"excerpt":"Quarkus is a microservice development framework designed for the cloud and containers. It is designed to have reduced memory usage and the shortest possible startup time. It is mainly based on standards (Jakarta EE, Eclipse MicroProfile, etc.) and allows the use of mature and widely used Java libraries via its\u2026","rel":"","context":"In &quot;informatique&quot;","block_context":{"text":"informatique","link":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1532,"url":"https:\/\/www.loicmathieu.fr\/wordpress\/informatique\/tester-une-java-google-cloud-function\/","url_meta":{"origin":2216,"position":5},"title":"Testing a Java Google Cloud Function","author":"admin","date":"Tuesday October  4th, 2022","format":false,"excerpt":"Until recently, testing a Google Cloud Function written in Java could be done via the invoker provided by the Google Cloud Functions SDK but not via a unit test. But this changed recently! Let's take the following HTTP function as an example: public class HelloHttpFunction implements HttpFunction { @Override public\u2026","rel":"","context":"In &quot;informatique&quot;","block_context":{"text":"informatique","link":"https:\/\/www.loicmathieu.fr\/wordpress\/category\/informatique\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/posts\/2216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/comments?post=2216"}],"version-history":[{"count":5,"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/posts\/2216\/revisions"}],"predecessor-version":[{"id":2225,"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/posts\/2216\/revisions\/2225"}],"wp:attachment":[{"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/media?parent=2216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/categories?post=2216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.loicmathieu.fr\/wordpress\/wp-json\/wp\/v2\/tags?post=2216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}