From d6575a0a6a8c7fe61a6c278f9df99564e75d8f72 Mon Sep 17 00:00:00 2001
From: Ioannis Canellos
Date: Sat, 11 May 2024 13:03:48 +0300
Subject: [PATCH 1/2] feat: add a minimal index page for the email-me-a-poem
---
.../resources/META-INF/resources/index.html | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 samples/email-a-poem/src/main/resources/META-INF/resources/index.html
diff --git a/samples/email-a-poem/src/main/resources/META-INF/resources/index.html b/samples/email-a-poem/src/main/resources/META-INF/resources/index.html
new file mode 100644
index 000000000..b2c697d4d
--- /dev/null
+++ b/samples/email-a-poem/src/main/resources/META-INF/resources/index.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+ Email me a poem
+
+
+
Email me a poem
+ Click on the button to get a poem.
+
+
+
+
+
+
+
+
+
+
+
From ffe7133dcc5e367a5ff6346f28977f13713be37f Mon Sep 17 00:00:00 2001
From: Ioannis Canellos
Date: Sat, 11 May 2024 13:04:19 +0300
Subject: [PATCH 2/2] chore: email-me prompt requests incl of the poem
---
.../java/io/quarkiverse/langchain4j/sample/MyAiService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/email-a-poem/src/main/java/io/quarkiverse/langchain4j/sample/MyAiService.java b/samples/email-a-poem/src/main/java/io/quarkiverse/langchain4j/sample/MyAiService.java
index 06bace675..f306f2004 100644
--- a/samples/email-a-poem/src/main/java/io/quarkiverse/langchain4j/sample/MyAiService.java
+++ b/samples/email-a-poem/src/main/java/io/quarkiverse/langchain4j/sample/MyAiService.java
@@ -15,7 +15,7 @@ public interface MyAiService {
* @return the poem
*/
@SystemMessage("You are a professional poet")
- @UserMessage("Write a poem about {topic}. The poem should be {lines} lines long. Then send this poem by email.")
+ @UserMessage("Write a poem about {topic}. The poem should be {lines} lines long. Then send this poem by email. Your response should include the poem")
String writeAPoem(String topic, int lines);
}