Skip to content

Commit 324d273

Browse files
committed
A few tiny fixes and additions
1 parent 49edc93 commit 324d273

1 file changed

Lines changed: 32 additions & 5 deletions

File tree

documentation/modules/ROOT/pages/prompts.adoc

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Maven::
1616
[.console-input]
1717
[source,bash,subs="+macros,+attributes"]
1818
----
19-
mvn "io.quarkus.platform:quarkus-maven-plugin:create" -DprojectGroupId="com.redhat.developers" -DprojectArtifactId="{project-ai-name}" -DprojectVersion="1.0-SNAPSHOT" -Dextensions=rest,langchain4j-openai
19+
./mvnw "io.quarkus.platform:quarkus-maven-plugin:create" -DprojectGroupId="com.redhat.developers" -DprojectArtifactId="{project-ai-name}" -DprojectVersion="1.0-SNAPSHOT" -Dextensions=rest,langchain4j-openai
2020
cd {project-ai-name}
2121
----
2222
--
@@ -27,15 +27,15 @@ Quarkus CLI::
2727
[.console-input]
2828
[source,bash,subs="+macros,+attributes"]
2929
----
30-
quarkus create app -x rest langchain4j-openai com.redhat.developers:{project-ai-name}:1.0-SNAPSHOT
30+
quarkus create app -x rest -x langchain4j-openai com.redhat.developers:{project-ai-name}:1.0-SNAPSHOT
3131
cd {project-ai-name}
3232
----
3333
--
3434
====
3535

3636
IMPORTANT: All the remaining parts of this section assume that you'll be working inside the project folder that was just created. In this case, `{project-ai-name}`.
3737

38-
This tutorial was explicitly tested with LangChain4j OpenAI version 0.4.0. So, to guarantee that everything will work as expected, we'll need to update it on our POM file:
38+
This tutorial was explicitly tested with LangChain4j OpenAI version 0.4.0. So, to guarantee that everything will work as expected, we'll need to update it on our POM file, so replace the existing dependency with the following:
3939

4040
[.console-input]
4141
[source,xml]
@@ -80,7 +80,7 @@ public interface Assistant {
8080

8181
Now we're going to implement a resource that send prompts using the AI service.
8282

83-
Create a new `ExistencialQuestionResource` Java class in `src/main/java` in the `com.redhat.developers` package with the following contents:
83+
Create a new `ExistentialQuestionResource` Java class in `src/main/java` in the `com.redhat.developers` package with the following contents:
8484

8585
[.console-input]
8686
[source,java]
@@ -94,7 +94,7 @@ import jakarta.ws.rs.Produces;
9494
import jakarta.ws.rs.core.MediaType;
9595
9696
@Path("/earth")
97-
public class ExistencialQuestionResource {
97+
public class ExistentialQuestionResource {
9898
9999
@Inject
100100
Assistant assistant;
@@ -110,6 +110,33 @@ public class ExistencialQuestionResource {
110110

111111
== Invoke the endpoint
112112

113+
Start the app in Quarkus Dev Mode:
114+
115+
[tabs%sync]
116+
====
117+
118+
Maven::
119+
+
120+
--
121+
[.console-input]
122+
[source,bash,subs="+macros,+attributes"]
123+
----
124+
./mvnw quarkus:dev
125+
----
126+
--
127+
Quarkus CLI::
128+
+
129+
--
130+
131+
[.console-input]
132+
[source,bash,subs="+macros,+attributes"]
133+
----
134+
quarkus create app -x rest -x langchain4j-openai com.redhat.developers:{project-ai-name}:1.0-SNAPSHOT
135+
quarkus dev
136+
----
137+
--
138+
====
139+
113140
You can check your prompt implementation by pointing your browser to http://localhost:8080/earth/flat[window=_blank]
114141

115142
You can also run the following command:

0 commit comments

Comments
 (0)