From 2ada6811861add6a109c18a3e5c2922a918ca6a3 Mon Sep 17 00:00:00 2001 From: kdubois Date: Fri, 12 Jul 2024 15:27:25 +0000 Subject: [PATCH] [docs] Publishing the docs for commit(s) dc51ffb2f03167b3c775fed31a902034204ab418 --- quarkus-tutorial/20_embed_documents.html | 49 +++++++++++++----------- sitemap.xml | 48 +++++++++++------------ 2 files changed, 51 insertions(+), 46 deletions(-) diff --git a/quarkus-tutorial/20_embed_documents.html b/quarkus-tutorial/20_embed_documents.html index d6ebf94..764861c 100644 --- a/quarkus-tutorial/20_embed_documents.html +++ b/quarkus-tutorial/20_embed_documents.html @@ -230,13 +230,16 @@

(1) -quarkus.langchain4j.easy-rag.path=src/main/resources/catalog (2) +quarkus.langchain4j.openai.chat-model.temperature=0.0 +quarkus.langchain4j.easy-rag.path=src/main/resources/catalog -booking.daystostart=1 +booking.daystostart=1 (3) booking.daystoend=3 +booking.firstname=john +booking.lastname=doe +booking.number=123-456 -quarkus.langchain4j.openai.chat-model.model-name=gpt-4o (3) +quarkus.langchain4j.openai.chat-model.model-name=gpt-4o (4)
@@ -251,6 +254,10 @@

3 +Sample booking data + + +4 The specific model to use. IMPORTANT: gpt3.5-turbo is much cheaper but the results will be slower and less reliable. @@ -384,27 +391,24 @@

package com.redhat.developers; import java.time.LocalDate; +import java.util.Map; + import org.eclipse.microprofile.config.inject.ConfigProperty; import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; @ApplicationScoped public class BookingService { - @ConfigProperty(name="booking.daystostart") - int daystostart; - - @ConfigProperty(name="booking.daystoend") - int daystoend; - - private static String FIRSTNAME="john"; - private static String LASTNAME="doe"; - private static String BOOKINGNUMBER ="123-456"; (1) + @Inject + @ConfigProperty(name = "booking") (1) + Map<String, String> booking; public Booking getBookingDetails(String bookingNumber, String customerName, String customerSurname) { ensureExists(bookingNumber, customerName, customerSurname); - LocalDate bookingFrom = LocalDate.now().plusDays(daystostart); - LocalDate bookingTo = LocalDate.now().plusDays(daystoend); + LocalDate bookingFrom = LocalDate.now().plusDays(Long.parseLong(booking.get("daystostart"))); + LocalDate bookingTo = LocalDate.now().plusDays(Long.parseLong(booking.get("daystoend"))); // Retrieval from DB mocking Customer customer = new Customer(customerName, customerSurname); return new Booking(bookingNumber, bookingFrom, bookingTo, customer); @@ -413,15 +417,16 @@

1 -We hardcoded a booking entry for simplicity’s sake. Of course, in a real world scenario this would likely come from a database. +Retrieve a single booking from the application.properties file. (in the real world this data would likely come from a DB instead :) )

@@ -531,7 +536,7 @@

package com.redhat.developers;
 
-import jakarta.websocket.OnOpen;
+import io.quarkus.websockets.next.OnOpen;
 import io.quarkus.websockets.next.OnTextMessage;
 import io.quarkus.websockets.next.WebSocket;
 
@@ -550,7 +555,7 @@ 

https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/01_setup.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/02_basics.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/03_configuration.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/04_panache.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/05_kubernetes.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/06_dev-services.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/07_spring.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/08_rest-client.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/09_fault-tolerance.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/10_health.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/11_observability.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/12_security.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/13_security-oidc.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/14_reactive.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/15_reactive-messaging.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/16_kafka-and-streams.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/17_prompts.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/18_chains_memory.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/19_agents_tools.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/20_embed_documents.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/21_podman_ai.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/22_local_models.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/23_kubernetes_kafka_ai.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z https://redhat-developer-demos.github.io/quarkus-tutorial/quarkus-tutorial/index.html -2024-07-04T08:02:37.457Z +2024-07-12T15:27:22.798Z