Skip to content

Commit 37a459a

Browse files
authored
Merge pull request #1843 from edeandrea/deprecate-auditing
Deprecate existing auditing events.
2 parents 80e6a91 + 2dcee31 commit 37a459a

20 files changed

+93
-0
lines changed

core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/AuditSourceInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
/**
77
* Contains information about the source of an audit event
8+
*
9+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
810
*/
11+
@Deprecated(forRemoval = true)
912
public interface AuditSourceInfo {
1013
/**
1114
* The fully-qualified name of the interface where the llm interaction was initialized

core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/InitialMessagesCreatedEvent.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
/**
99
* Invoked when the original user and system messages have been created
10+
*
11+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
1012
*/
13+
@Deprecated(forRemoval = true)
1114
public interface InitialMessagesCreatedEvent extends LLMInteractionEvent {
1215

1316
/**

core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/LLMInteractionCompleteEvent.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
/**
44
* Invoked when the final result of the AiService method has been computed
5+
*
6+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
57
*/
8+
@Deprecated(forRemoval = true)
69
public interface LLMInteractionCompleteEvent extends LLMInteractionEvent {
710
/**
811
* @return the result of the AiService method
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package io.quarkiverse.langchain4j.audit;
22

3+
/**
4+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
5+
*/
6+
@Deprecated(forRemoval = true)
37
public interface LLMInteractionEvent {
48
AuditSourceInfo sourceInfo();
59
}

core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/LLMInteractionFailureEvent.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
/**
44
* Invoked when there was an exception computing the result of the AiService method
5+
*
6+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
57
*/
8+
@Deprecated(forRemoval = true)
69
public interface LLMInteractionFailureEvent extends LLMInteractionEvent {
710
/**
811
* @return the error that occurred

core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/ResponseFromLLMReceivedEvent.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
/**
66
* Invoked with a response from an LLM. It is important to note that this can be invoked multiple times
77
* when tools exist.
8+
*
9+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
810
*/
11+
@Deprecated(forRemoval = true)
912
public interface ResponseFromLLMReceivedEvent extends LLMInteractionEvent {
1013
/**
1114
* @return the chat response

core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/ToolExecutedEvent.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
/**
66
* Invoked with a tool response from an LLM. It is important to note that this can be invoked multiple times
77
* when tools exist.
8+
*
9+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
810
*/
11+
@Deprecated(forRemoval = true)
912
public interface ToolExecutedEvent extends LLMInteractionEvent {
1013

1114
/**

core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/guardrails/GuardrailExecutedEvent.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
*
1313
* @param <P> the type of guardrail parameters used in the validation process
1414
* @param <R> the type of guardrail result produced by the validation process
15+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
1516
*/
17+
@Deprecated(forRemoval = true)
1618
public interface GuardrailExecutedEvent<P extends GuardrailRequest, R extends GuardrailResult<R>, G extends Guardrail<P, R>>
1719
extends LLMInteractionEvent {
1820
/**

core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/guardrails/InputGuardrailExecutedEvent.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
import dev.langchain4j.guardrail.InputGuardrailRequest;
66
import dev.langchain4j.guardrail.InputGuardrailResult;
77

8+
/**
9+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
10+
*/
11+
@Deprecated(forRemoval = true)
812
public interface InputGuardrailExecutedEvent
913
extends GuardrailExecutedEvent<InputGuardrailRequest, InputGuardrailResult, InputGuardrail> {
1014
/**

core/runtime/src/main/java/io/quarkiverse/langchain4j/audit/guardrails/OutputGuardrailExecutedEvent.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
import dev.langchain4j.guardrail.OutputGuardrailRequest;
55
import dev.langchain4j.guardrail.OutputGuardrailResult;
66

7+
/**
8+
* @deprecated In favor of https://docs.langchain4j.dev/tutorials/observability#ai-service-observability
9+
*/
10+
@Deprecated(forRemoval = true)
711
public interface OutputGuardrailExecutedEvent
812
extends GuardrailExecutedEvent<OutputGuardrailRequest, OutputGuardrailResult, OutputGuardrail> {
913
}

0 commit comments

Comments
 (0)