Skip to content

Commit c4d79bf

Browse files
authored
Merge pull request #1179 from rsvoboda/typo.fixes.2024-12-23
Typo fixes in samples and JandexUtil + EmbeddingStoreJsonRPCService from core
2 parents 6274d69 + c235cf1 commit c4d79bf

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

core/deployment/src/main/java/io/quarkiverse/langchain4j/deployment/JandexUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ private static List<Type> mapTypeArguments(Type appliedType, List<Type> typeArgu
229229
// figure out which arguments we passed to the supertype
230230
List<Type> appliedArguments;
231231

232-
// we passed them explicitely
232+
// we passed them explicitly
233233
if (appliedType.kind() == Type.Kind.PARAMETERIZED_TYPE) {
234234
appliedArguments = appliedType.asParameterizedType().arguments();
235235
} else {

core/runtime/src/main/java/io/quarkiverse/langchain4j/runtime/devui/EmbeddingStoreJsonRPCService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public EmbeddingStoreJsonRPCService(
7272
private static final Pattern COMMA_OR_NEWLINE = Pattern.compile(",|\\r?\\n");
7373

7474
public String add(String id, String text, String metadata) {
75-
verifyEmbedingModelAndStore();
75+
verifyEmbeddingModelAndStore();
7676
if (id == null || id.isEmpty()) {
7777
return embeddingStore.add(embeddingModel.embed(text).content(), TextSegment.from(text, parseMetadata(metadata)));
7878
} else {
@@ -96,7 +96,7 @@ private Metadata parseMetadata(String metadata) {
9696
// FIXME: the limit argument can be changed to int after https://github.com/quarkusio/quarkus/issues/37481 is fixed
9797
// LangChain4jDevUIJsonRpcTest will need to be adjusted accordingly
9898
public JsonArray findRelevant(String text, String limit) {
99-
verifyEmbedingModelAndStore();
99+
verifyEmbeddingModelAndStore();
100100
int limitInt = Integer.parseInt(limit);
101101
JsonArray result = new JsonArray();
102102
for (EmbeddingMatch<TextSegment> match : embeddingStore.findRelevant(embeddingModel.embed(text).content(), limitInt)) {
@@ -119,7 +119,7 @@ public JsonArray findRelevant(String text, String limit) {
119119
return result;
120120
}
121121

122-
private void verifyEmbedingModelAndStore() {
122+
private void verifyEmbeddingModelAndStore() {
123123
if (embeddingModel == null) {
124124
throw new RuntimeException("No embedding model found in CDI. Please add an embedding model to your application.");
125125
}

samples/email-a-poem/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ echo http://localhost:$GRAFANA_PORT
7777

7878
Open your browser at `http://localhost:${GRAFANA_PORT}`
7979

80-
When prompted to login, use `admin:admin` as the username / password combination.
80+
When prompted to log in, use `admin:admin` as the username / password combination.
8181

8282
From the menu on the top left, click on `Explore`. On the page, select `Tempo` as the datasource (next to `Outline`), then go to `Query type`, select `Search` and select `quarkus-langchain4j-sample-poem` from the dropdown options of `Service Name`.
8383
Now hit `Run query` in the top right corner.

samples/secure-fraud-detection/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To enable fraud detection, we provide the LLM with access to the custom [FraudDe
2323

2424
`FraudDetectionContentRetriever` is registered by [FraudDetectionRetrievalAugmentor](./src/main/java/io/quarkiverse/langchain4j/samples/FraudDetectionRetrievalAugmentor.java).
2525

26-
It can only be accessed securely and it retrieves transaction data for the currently authenticated user through two Panache repositories:
26+
It can only be accessed securely, and it retrieves transaction data for the currently authenticated user through two Panache repositories:
2727

2828
- [CustomerRepository.java](./src/main/java/io/quarkiverse/langchain4j/samples/CustomerRepository.java)
2929
- [TransactionRepository.java](./src/main/java/io/quarkiverse/langchain4j/samples/TransactionRepository.java)

samples/secure-poem-multiple-models/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ This advanced secure poem demo showcases how users authenticated with Google can
44

55
## The Demo
66

7-
Demo asks either Vertex AI Gemini or Azure OpenAI LLM to write a short 1 paragraph poem, using the access token acquired during the OIDC authorization code flow with either Google or Microsoft Entra ID OpenId Connect provider.
7+
Demo asks either Vertex AI Gemini or Azure OpenAI LLM to write a short 1-paragraph poem, using the access token acquired during the OIDC authorization code flow with either Google or Microsoft Entra ID OpenId Connect provider.
88

9-
### OpenId Connect authenticaion
9+
### OpenId Connect authentication
1010

1111
This demo requires users to authenticate with either Google or Microsoft Entra ID.
1212

@@ -96,7 +96,7 @@ quarkus.langchain4j.azure-openai.openai.log-responses=true
9696

9797
### ChatLanguageModel
9898

99-
This demo leverages ChatLanguageModel instead of the the AI service abstraction to simplify managing multiple models, with the interaction between the LLM and the application handled through the ChatLanguageModel interface.
99+
This demo leverages ChatLanguageModel instead of the AI service abstraction to simplify managing multiple models, with the interaction between the LLM and the application handled through the ChatLanguageModel interface.
100100

101101
```java
102102
package io.quarkiverse.langchain4j.sample;
@@ -167,7 +167,7 @@ mvn quarkus:dev
167167
```
168168

169169
Access `http://localhost:8080`, login to Quarkus PoemResource using either Google or Microsoft Entra ID, and follow a provided application link to read the poem.
170-
Use the logout link to logout and try another OpenId Connect provider and model. For example, if you've started with Google and Vertex AI Gemini, try Microsoft Entra ID and Azure OpenAI next, or vice versa.
170+
Use the logout link to log out and try another OpenId Connect provider and model. For example, if you've started with Google and Vertex AI Gemini, try Microsoft Entra ID and Azure OpenAI next, or vice versa.
171171

172172
You do not have to have both Google and Microsoft Entra ID accounts enabled in order to run this demo.
173173

samples/secure-sql-chatbot/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ It eliminates a risk of non-authenticated users attempting to trick LLM.
8080
Even though browsers do not enforce Single Origin Policy (SOP) for WebSockets HTTP upgrade requests, enabling
8181
CORS origin check can add an extra protection in combination with verifying the expected authentication credentials.
8282

83-
For example, attackers can set `Origin` themselves but they will not have the HTTPS bound authentication session cookie
83+
For example, attackers can set `Origin` themselves, but they will not have the HTTPS bound authentication session cookie
8484
which can be used to authenticate a WSS WebSockets upgrade request.
85-
Or if the authenticated user is tricked into visiting an unfriendly web site, then a WSS WebSockets upgrade request will fail
85+
Or if the authenticated user is tricked into visiting an unfriendly website, then a WSS WebSockets upgrade request will fail
8686
at the Quarkus CORS check level.
8787

8888
### Custom WebSocket ticket system

0 commit comments

Comments
 (0)