From 0bb563ce402567e5c68886e22ded572adb2bee32 Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Wed, 10 Jan 2024 11:49:00 +0100 Subject: [PATCH] Add support for the custom SmallRye fault tolerance annotations (like rate limiting) --- .../langchain4j/deployment/AiServicesProcessor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/deployment/src/main/java/io/quarkiverse/langchain4j/deployment/AiServicesProcessor.java b/core/deployment/src/main/java/io/quarkiverse/langchain4j/deployment/AiServicesProcessor.java index fbfcc1b01..4f697b8f6 100644 --- a/core/deployment/src/main/java/io/quarkiverse/langchain4j/deployment/AiServicesProcessor.java +++ b/core/deployment/src/main/java/io/quarkiverse/langchain4j/deployment/AiServicesProcessor.java @@ -567,7 +567,9 @@ public void handleAiServices(AiServicesRecorder recorder, for (AnnotationInstance annotationInstance : methodInfo.declaredAnnotations()) { // TODO: we need to review this if (annotationInstance.name().toString() - .startsWith("org.eclipse.microprofile.faulttolerance")) { + .startsWith("org.eclipse.microprofile.faulttolerance") + || annotationInstance.name().toString() + .startsWith("io.smallrye.faulttolerance.api")) { mc.addAnnotation(annotationInstance); } }