File tree Expand file tree Collapse file tree
src/main/java/net/ladenthin/llama Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # SPDX-FileCopyrightText: 2026 Bernard Ladenthin <bernard.ladenthin@gmail.com>
2+ #
3+ # SPDX-License-Identifier: MIT
4+
5+ name : SonarQube
6+ on :
7+ push :
8+ branches :
9+ - main
10+ pull_request :
11+ types : [opened, synchronize, reopened]
12+ jobs :
13+ build :
14+ name : Build and analyze
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
18+ with :
19+ fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
20+ - name : Set up JDK 21
21+ uses : actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
22+ with :
23+ java-version : 21
24+ distribution : ' zulu'
25+ - name : Cache SonarQube packages
26+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
27+ with :
28+ path : ~/.sonar/cache
29+ key : ${{ runner.os }}-sonar
30+ restore-keys : ${{ runner.os }}-sonar
31+ - name : Cache Maven packages
32+ uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
33+ with :
34+ path : ~/.m2
35+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
36+ restore-keys : ${{ runner.os }}-m2
37+ - name : Build and analyze
38+ env :
39+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
40+ run : mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=bernardladenthin_java-llama.cpp
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ SPDX-License-Identifier: MIT
4949 </distributionManagement >
5050
5151 <properties >
52+ <sonar .organization>bernardladenthin</sonar .organization>
5253 <jna .version>5.19.0</jna .version>
5354 <jspecify .version>1.0.0</jspecify .version>
5455 <lombok .version>1.18.46</lombok .version>
Original file line number Diff line number Diff line change @@ -158,19 +158,6 @@ public CompletionResult completeWithStats(InferenceParameters parameters) {
158158 return completionParser .parseCompletionResult (json );
159159 }
160160
161- /**
162- * Cancellable variant of {@link #complete(InferenceParameters)}. Runs in streaming mode
163- * internally so the inference loop can observe a {@link net.ladenthin.llama.callback.CancellationToken#cancel()} call
164- * from another thread and return early with whatever text was accumulated so far.
165- * <p>
166- * The token is rebound to this call (any prior {@code cancel} state is cleared on entry).
167- * On return — whether by natural stop or cancellation — the token is unbound.
168- * </p>
169- *
170- * @param parameters the inference configuration (its {@code stream} flag will be set to true)
171- * @param token cancellation handle; {@link net.ladenthin.llama.callback.CancellationToken#cancel()} aborts the loop
172- * @return the text generated up to the point of stop or cancellation
173- */
174161 /**
175162 * Dispatch a list of completion requests in parallel and return the generated texts
176163 * in the same order. Each request is sent immediately; the native scheduler dispatches
You can’t perform that action at this time.
0 commit comments