Skip to content

Commit 859f4b3

Browse files
committed
Update Embed Documents with Easy Rag
1 parent 70f5075 commit 859f4b3

10 files changed

Lines changed: 266 additions & 215 deletions
35 KB
Loading
41.7 KB
Loading

documentation/modules/ROOT/nav.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
** xref:18_chains_memory.adoc[Chains and Memory]
2828
** xref:19_agents_tools.adoc[Agents/Tools]
2929
** xref:20_embed_documents.adoc[Embedding Documents]
30-
** xref:21_local_models.adoc[Working with local models]
31-
** xref:22_kubernetes_kafka_ai.adoc[Bringing Kubernetes and Kafka to the party]
30+
//** xref:21_podman_ai[Working with Podman Desktop AI]
31+
** xref:22_local_models.adoc[Working with local models]
32+
//** xref:23_kubernetes_kafka_ai.adoc[Bringing Kubernetes and Kafka to the party]

documentation/modules/ROOT/pages/17_prompts.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Maven::
1818
[.console-input]
1919
[source,bash,subs="+macros,+attributes"]
2020
----
21-
./mvnw "io.quarkus.platform:quarkus-maven-plugin:create" -DprojectGroupId="com.redhat.developers" -DprojectArtifactId="{project-ai-name}" -DprojectVersion="1.0-SNAPSHOT" -Dextensions=rest,langchain4j-openai
21+
./mvnw "io.quarkus.platform:quarkus-maven-plugin:create" -DprojectGroupId="com.redhat.developers" -DprojectArtifactId="{project-ai-name}" -DprojectVersion="1.0-SNAPSHOT" -Dextensions=rest,langchain4j-core,langchain4j-openai
2222
cd {project-ai-name}
2323
----
2424
--
@@ -29,7 +29,7 @@ Quarkus CLI::
2929
[.console-input]
3030
[source,bash,subs="+macros,+attributes"]
3131
----
32-
quarkus create app -x rest -x langchain4j-openai com.redhat.developers:{project-ai-name}:1.0-SNAPSHOT
32+
quarkus create app -x rest -x langchain4j-openai -x langchain4j-core com.redhat.developers:{project-ai-name}:1.0-SNAPSHOT
3333
cd {project-ai-name}
3434
----
3535
--

documentation/modules/ROOT/pages/18_chains_memory.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
So far we explored how to use prompts with LLMs, however to really leverage the power of LLMs it is essential that you
66
can build a conversation by referring to previous questions and answers and manage concurrent interactions.
77

8-
In this section we'll cover how we can acchieve this with the LangChain4j extension in Quarkus.
8+
In this section we'll cover how we can achieve this with the LangChain4j extension in Quarkus.
99

1010
== Create an AI service with memory
1111

@@ -317,7 +317,7 @@ Save this YAML file as `sample-app-deployment.yaml` and apply it using the `kube
317317

318318
We can use the LangChain4j extension to index a conversation so we can reuse it.
319319

320-
Let's inject an instance of the AssistenWithMemory class and add a new `guessWho()` method to our `DeveloperResource`:
320+
Let's inject an instance of the AssistantWithMemory class and add a new `guessWho()` method to our `DeveloperResource`:
321321

322322
[.console-input]
323323
[source,java]

documentation/modules/ROOT/pages/19_agents_tools.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
:project-ai-name: quarkus-langchain-app
44

5-
The real deal to bring AI for your development process is when you can create a real interaction between services you build and/or use with the LLM.
5+
Things become more interesting when you can bring the AI LLM into your application and get it to interact with specific functions you build for it.
66

77
This section will use AI to trigger an email service from our local application. To do this, we'll use LangChain4j's concept of Agents and Tools.
88

99
Agents operate by utilizing a language model to decipher a series of actions, unlike chains where actions are pre-programmed. Ie. agents leverage a language model as a cognitive engine to decide on the actions (tools) and their order.
1010

11-
You can read more about this concept in the https://docs.quarkiverse.io/quarkus-langchain4j/dev/agent-and-tools.html[Quarkus LangChain4j Documentation]
11+
You can read more about this in the https://docs.quarkiverse.io/quarkus-langchain4j/dev/agent-and-tools.html[Quarkus LangChain4j Documentation]
1212

1313
== Add the Mailer and Mailpit extensions
1414

@@ -148,9 +148,10 @@ public class EmailMeAPoemResource {
148148
Update the following properties in your `application.properties`
149149

150150
IMPORTANT: The LangChain4j `demo` key currently does not support tools, so you will need to use a real OpenAI key for the email service to be called by the OpenAI model.
151-
You can create an account over at https://platform.openai.com/[OpenAI] if you'd like to see this in action.
151+
You can create an account over at https://platform.openai.com/[OpenAI] if you'd like to see this in action.
152+
Note that OpenAI requires you to fund your account with credits to be able to use the API. The minimum is $5 but this amount will go a long way to test the scenarios in this tutorial.
152153

153-
NOTE: If you do not want to create an OpenAI key, you can still test the below scenario, it just won't send an email.
154+
NOTE: If you do not want to create an OpenAI key, you can still test the below scenario, it just won't send an email since the "Tool" functionality unfortunately won't work.
154155

155156
[#quarkuspdb-update-props]
156157
[.console-input]

0 commit comments

Comments
 (0)