Skip to content

Commit c647e3a

Browse files
authored
Remove deprecated APIs (#120)
## Change This is part of langchain4j/langchain4j#2726 ## General checklist - [ ] There are no breaking changes - [ ] I have added unit and/or integration tests for my change - [ ] The tests cover both positive and negative cases - [x] I have manually run all the unit and integration tests in the module I have added/changed, and they are all green - [ ] I have added/updated the [documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs) - [ ] I have added an example in the [examples repo](https://github.com/langchain4j/langchain4j-examples) (only for "big" features)
1 parent 64dbf90 commit c647e3a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

langchain4j-spring-boot-starter/src/test/java/dev/langchain4j/service/spring/mode/automatic/withRetrievalAugmentor/AiServiceWithRetrievalAugmentorApplication.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package dev.langchain4j.service.spring.mode.automatic.withRetrievalAugmentor;
22

33
import dev.langchain4j.data.message.UserMessage;
4+
import dev.langchain4j.rag.AugmentationResult;
45
import dev.langchain4j.rag.RetrievalAugmentor;
56
import org.springframework.boot.SpringApplication;
67
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -11,7 +12,9 @@ class AiServiceWithRetrievalAugmentorApplication {
1112

1213
@Bean
1314
RetrievalAugmentor retrievalAugmentor() {
14-
return (userMessage, metadata) -> UserMessage.from("My name is Klaus." + userMessage);
15+
return augmentationRequest -> AugmentationResult.builder()
16+
.chatMessage(UserMessage.from("My name is Klaus." + augmentationRequest.chatMessage()))
17+
.build();
1518
}
1619

1720
public static void main(String[] args) {

0 commit comments

Comments
 (0)