New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Retrieve Documents when using AiService #1015
base: main
Are you sure you want to change the base?
[FEATURE] Retrieve Documents when using AiService #1015
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KaisNeffati thank you a lot for your contribution!
langchain4j/src/test/java/dev/langchain4j/service/AiServicesWithRagIT.java
Outdated
Show resolved
Hide resolved
langchain4j/src/test/java/dev/langchain4j/service/AiServicesWithRagIT.java
Outdated
Show resolved
Hide resolved
langchain4j/src/test/java/dev/langchain4j/service/AiServicesWithRagIT.java
Outdated
Show resolved
Hide resolved
langchain4j/src/test/java/dev/langchain4j/service/AiServicesWithRagIT.java
Outdated
Show resolved
Hide resolved
langchain4j/src/test/java/dev/langchain4j/service/AiServicesWithRagIT.java
Outdated
Show resolved
Hide resolved
langchain4j/src/main/java/dev/langchain4j/service/WithSources.java
Outdated
Show resolved
Hide resolved
langchain4j-core/src/main/java/dev/langchain4j/rag/RetrievalAugmentor.java
Outdated
Show resolved
Hide resolved
langchain4j/src/main/java/dev/langchain4j/service/WithSources.java
Outdated
Show resolved
Hide resolved
951bc77
to
7cfac82
Compare
7cfac82
to
2d16e44
Compare
Hi @KaisNeffati, do you mind if I will do and push some changes? |
Feel free to do it @langchain4j |
@KaisNeffati could you please add me as collaborator to your repo? I can't push to this branch/PR :( |
Done |
- WithSources<T> -> Result<T> - AugmentationRequest, AugmentationResult, RetrievalAugmentor and ContentInjector to use ChatMessage instead of UserMessage
- WithSources<T> -> Result<T> - AugmentationRequest, AugmentationResult, RetrievalAugmentor and ContentInjector to use ChatMessage instead of UserMessage
- WithSources<T> -> Result<T> - AugmentationRequest, AugmentationResult, RetrievalAugmentor and ContentInjector to use ChatMessage instead of UserMessage
@KaisNeffati thank you! I have pushed my changes, could you please review? I hope now it is a bit more generic (Result instead of WithSources). I have also changed UserMessage to ChatMessage right away in all places to avoid doing breaking changes one more time in the near future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor comment below !
And Yeah, Result
is a very wise choice. It confirms what I had in mind initially when I thought about 'ResponsePrompt' or 'ResponseMessage'. I'm glad to hear that you've found the right name 👏
Atherwise , all is good for me
private static void log(UserMessage augmentedUserMessage) { | ||
log.trace("Augmented user message: " + escapeNewlines(augmentedUserMessage.singleText())); | ||
private static void log(ChatMessage augmentedChatMessage) { | ||
log.trace("Augmented chat message: " + escapeNewlines(augmentedChatMessage.text())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too Minor : Placeholder instead of concatenation
log.trace("Augmented chat message: {}", escapeNewlines(augmentedChatMessage.text()));
Context
#660
Change
Checklist
Before submitting this PR, please check the following points:
Checklist for adding new embedding store integration