Skip to content

Commit 8847cab

Browse files
committed
fix: client
1 parent 900a6f9 commit 8847cab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

backend/src/main/java/ch/xxx/aidoclibchat/adapter/client/OpenLibraryRestClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class OpenLibraryRestClient implements OpenLibraryClient {
3232
private static final Logger LOGGER = LoggerFactory.getLogger(OpenLibraryRestClient.class);
3333
private final String baseUrl = "https://openlibrary.org/search.json";
3434
private final RestClient restClient;
35-
@Value("${openlibrary.result-size:10}")
35+
@Value("${openlibrary.result-size:5}")
3636
private int resultLimit;
3737

3838
public OpenLibraryRestClient(RestClient restClient) {
@@ -46,7 +46,7 @@ public Response apply(Request request) {
4646
var subjectOpt = this.createParamOpt(request.subject(), "subject");
4747
var paramsStr = List.of(authorOpt, titleOpt, subjectOpt).stream().flatMap(Optional::stream)
4848
.collect(Collectors.joining("&"));
49-
var urlStr = String.format("%s?%s&limit=%d", this.baseUrl, paramsStr, this.resultLimit);
49+
var urlStr = String.format("%s?%s&fields=*&limit=%d", this.baseUrl, paramsStr, this.resultLimit);
5050
LOGGER.info(urlStr);
5151
var response = this.restClient.get().uri(urlStr).retrieve().body(Response.class);
5252
return response;

backend/src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ management.endpoint.health.show-details=always
4040
embedding-token-limit=2000
4141
document-token-limit=2000
4242
image.result-size=20
43-
openlibrary.result-size=10
43+
openlibrary.result-size=5

0 commit comments

Comments
 (0)