Skip to content

Commit 8033a77

Browse files
committed
Minor improvements
1 parent 31d90b3 commit 8033a77

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

documentation/modules/ROOT/pages/21_podman_ai.adoc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Podman Desktop is a GUI tool that helps with running and managing containers on
1212

1313
First, if you haven't yet, you must download and install Podman Desktop on your operating system. https://podman-desktop.io/downloads[The instructions can be found here, window="_blank"].
1414

15-
Once installed, go ahead and start the application and go through the setup process. After that, you should see an "AI Lab" extension in the left menu
15+
Once installed, go ahead and start the application and go through the setup process. After that, you should see an "AI Lab" extension in the left menu. If you don't, you may need to install the extension first. For that, go to Extensions -> Catalog and install Podman AI Lab.
1616

1717
image::podman-desktop-ai.png[]
1818

@@ -110,7 +110,7 @@ import jakarta.enterprise.context.SessionScoped;
110110
public interface AssistantForInstructLab {
111111
112112
@SystemMessage({
113-
"You are a Java developer who likes to over engineer things" #<1>
113+
"You are a Java developer who likes to over engineer things" //<1>
114114
})
115115
String chat(@UserMessage String userMessage);
116116
}
@@ -143,7 +143,9 @@ public class InstructLabResource {
143143
144144
@GET
145145
@Produces(MediaType.TEXT_PLAIN)
146-
public String prompt(@QueryParam("message") String message) {
146+
public String prompt() {
147+
// feel free to update this message to any question you may have for the LLM.
148+
String message = "Generate a class that returns the square root of a given number";
147149
return assistant.chat(message);
148150
}
149151
}
@@ -153,14 +155,14 @@ public class InstructLabResource {
153155

154156
Let's ask our model to create a class that returns the square root of a given number:
155157

156-
You can check your prompt implementation by pointing your browser to http://localhost:8080/instructlab?message=generate%20a%20class%20that%20returns%20the%20square%20root%20of%20a%20given%20number[window=_blank]
158+
You can check your prompt implementation by pointing your browser to http://localhost:8080/instructlab[window=_blank]
157159

158160
You can also run the following command:
159161

160162
[.console-input]
161163
[source,bash]
162164
----
163-
curl http://localhost:8080/instructlab?message=generate%20a%20class%20that%20returns%20the%20square%20root%20of%20a%20given%20number
165+
curl http://localhost:8080/instructlab
164166
----
165167

166168
An example of output (remember, your result will likely be different):
@@ -195,6 +197,10 @@ public class SquareRootCalculator {
195197
This will allow you to calculate the square root of any given number, positive or negative, and handle non-integer inputs.
196198
----
197199

200+
NOTE: depending on your local resources, this might take a up to a few minutes. If you run into timeouts,
201+
you can try changing the `quarkus.langchain4j.openai.timeout` value in the application.properties file.
202+
If you're running on Mac/Windows, you could also try to give the podman machine more CPU/Memory resources.
203+
198204
Notice that (at least in our case) the LLM responded with a Java class, since we provided in the SystemMessage that the
199205
LLM should respond as if they were a Java engineer.
200206

0 commit comments

Comments
 (0)