diff --git a/package.json b/package.json index dc7b4f3..3cd56a7 100644 --- a/package.json +++ b/package.json @@ -3,16 +3,16 @@ "license": "UNLICENSED", "dependencies": { "@polymer/polymer": "3.5.2", - "@vaadin/bundles": "24.5.1", + "@vaadin/bundles": "24.5.3", "@vaadin/common-frontend": "0.0.19", - "@vaadin/polymer-legacy-adapter": "24.5.1", - "@vaadin/react-components": "24.5.1", - "@vaadin/react-components-pro": "24.5.1", + "@vaadin/polymer-legacy-adapter": "24.5.3", + "@vaadin/react-components": "24.5.3", + "@vaadin/react-components-pro": "24.5.3", "@vaadin/router": "2.0.0", "@vaadin/vaadin-development-mode-detector": "2.0.7", - "@vaadin/vaadin-lumo-styles": "24.5.1", - "@vaadin/vaadin-material-styles": "24.5.1", - "@vaadin/vaadin-themable-mixin": "24.5.1", + "@vaadin/vaadin-lumo-styles": "24.5.3", + "@vaadin/vaadin-material-styles": "24.5.3", + "@vaadin/vaadin-themable-mixin": "24.5.3", "@vaadin/vaadin-usage-statistics": "2.1.3", "construct-style-sheets-polyfill": "3.1.0", "date-fns": "2.29.3", @@ -40,22 +40,22 @@ "vite": "5.4.9", "vite-plugin-checker": "0.8.0", "workbox-build": "7.1.1", - "workbox-core": "7.1.0", - "workbox-precaching": "7.1.0" + "workbox-core": "7.3.0", + "workbox-precaching": "7.3.0" }, "vaadin": { "dependencies": { "@polymer/polymer": "3.5.2", - "@vaadin/bundles": "24.5.1", + "@vaadin/bundles": "24.5.3", "@vaadin/common-frontend": "0.0.19", - "@vaadin/polymer-legacy-adapter": "24.5.1", - "@vaadin/react-components": "24.5.1", - "@vaadin/react-components-pro": "24.5.1", + "@vaadin/polymer-legacy-adapter": "24.5.3", + "@vaadin/react-components": "24.5.3", + "@vaadin/react-components-pro": "24.5.3", "@vaadin/router": "2.0.0", "@vaadin/vaadin-development-mode-detector": "2.0.7", - "@vaadin/vaadin-lumo-styles": "24.5.1", - "@vaadin/vaadin-material-styles": "24.5.1", - "@vaadin/vaadin-themable-mixin": "24.5.1", + "@vaadin/vaadin-lumo-styles": "24.5.3", + "@vaadin/vaadin-material-styles": "24.5.3", + "@vaadin/vaadin-themable-mixin": "24.5.3", "@vaadin/vaadin-usage-statistics": "2.1.3", "construct-style-sheets-polyfill": "3.1.0", "date-fns": "2.29.3", @@ -83,10 +83,10 @@ "vite": "5.4.9", "vite-plugin-checker": "0.8.0", "workbox-build": "7.1.1", - "workbox-core": "7.1.0", - "workbox-precaching": "7.1.0" + "workbox-core": "7.3.0", + "workbox-precaching": "7.3.0" }, - "hash": "d46a19ed6c007d00e0136a97e2f3e40f39c49e44a8304d8ca834a88848d2d5c7" + "hash": "16d27362325cb02d9c7d840288637ef2dc599169d9484a3c28f7d6f7abf5592c" }, "overrides": { "@vaadin/bundles": "$@vaadin/bundles", diff --git a/pom.xml b/pom.xml index e6abf60..1e4f8f7 100644 --- a/pom.xml +++ b/pom.xml @@ -16,8 +16,8 @@ 23 1.0.0-M3 - 24.5.2 - 2.17.1 + 24.5.4 + 2.18.0 2.1.0 1.0.0 7.2.5 diff --git a/src/main/java/ch/climbd/newsfeed/controller/MlController.java b/src/main/java/ch/climbd/newsfeed/controller/MlController.java index 32ecd38..7b7c15a 100644 --- a/src/main/java/ch/climbd/newsfeed/controller/MlController.java +++ b/src/main/java/ch/climbd/newsfeed/controller/MlController.java @@ -66,15 +66,18 @@ public void summarize() { private void summarizeNormalText(NewsEntry news) { if (!news.getLink().startsWith("https://www.youtube.com/watch?v=")) { - news.setSummary(chatClient.prompt() + var content = chatClient.prompt() .system("As a professional summarizer, create a concise and comprehensive summary of the provided text, be it an article, post, conversation, or passage, while adhering to these guidelines:\n" + "* Craft a summary that is detailed, thorough, in-depth, and complex, while maintaining clarity and conciseness.\n" + "* Rely strictly on the provided text, without including external information.\n" + "* Format the summary in paragraph form for easy understanding.") .user("Summaries the following:\n" + news.getContent()) .call() - .content()); - LOG.debug("Summary: {}", news.getSummary()); + .content(); + + content = content.replaceAll("\n", "

"); + news.setSummary(content); + LOG.debug("Summary: {}", content); mongo.update(news); LOG.info("Summarized the article: {}", news.getTitle()); }