-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
212 additions
and
19 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
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
49 changes: 49 additions & 0 deletions
49
core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/Audit.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,49 @@ | ||
package io.quarkiverse.langchain4j.audit; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
import dev.langchain4j.data.message.AiMessage; | ||
import dev.langchain4j.data.message.SystemMessage; | ||
import dev.langchain4j.data.message.ToolExecutionResultMessage; | ||
import dev.langchain4j.data.message.UserMessage; | ||
import dev.langchain4j.data.segment.TextSegment; | ||
import dev.langchain4j.model.output.Response; | ||
|
||
public abstract class Audit { | ||
|
||
public record CreateInfo(String interfaceName, String methodName, Object[] parameters, | ||
Optional<Integer> memoryIDParamPosition) { | ||
|
||
} | ||
|
||
private final CreateInfo createInfo; | ||
|
||
public Audit(CreateInfo createInfo) { | ||
this.createInfo = createInfo; | ||
} | ||
|
||
public void initialMessages(Optional<SystemMessage> systemMessage, UserMessage userMessage) { | ||
|
||
} | ||
|
||
public void addRelevantDocument(List<TextSegment> segments, UserMessage userMessage) { | ||
|
||
} | ||
|
||
public void addLLMToApplicationMessage(Response<AiMessage> response) { | ||
|
||
} | ||
|
||
public void addApplicationToLLMMessage(ToolExecutionResultMessage toolExecutionResultMessage) { | ||
|
||
} | ||
|
||
public void onCompletion(Object result) { | ||
|
||
} | ||
|
||
public void onFailure(Exception e) { | ||
|
||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/AuditService.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,8 @@ | ||
package io.quarkiverse.langchain4j.audit; | ||
|
||
public interface AuditService { | ||
|
||
Audit create(Audit.CreateInfo createInfo); | ||
|
||
void complete(Audit audit); | ||
} |
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.