-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Retrieve Documents when using AiService
- Loading branch information
1 parent
f7ac5f6
commit 951bc77
Showing
14 changed files
with
293 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
langchain4j-core/src/main/java/dev/langchain4j/data/message/AugmentationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package dev.langchain4j.data.message; | ||
|
||
|
||
import dev.langchain4j.rag.query.Metadata; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
/** | ||
* Represents a request for augmentation. | ||
*/ | ||
@Getter | ||
@Builder | ||
public class AugmentationRequest { | ||
/** | ||
* The user message to be augmented. | ||
*/ | ||
private final UserMessage userMessage; | ||
|
||
/** | ||
* Additional metadata related to the augmentation request. | ||
*/ | ||
private final Metadata metadata; | ||
} |
24 changes: 24 additions & 0 deletions
24
langchain4j-core/src/main/java/dev/langchain4j/data/message/AugmentationResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package dev.langchain4j.data.message; | ||
|
||
import dev.langchain4j.rag.content.Content; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Represents the result of an augmentation process. | ||
*/ | ||
@Getter | ||
@Builder | ||
public class AugmentationResult { | ||
/** | ||
* The augmented user message after processing. | ||
*/ | ||
private final UserMessage augmentedUserMessage; | ||
|
||
/** | ||
* The list of contents retrieved during augmentation. | ||
*/ | ||
private final List<Content> retrievedContents; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.