declarative/RetrievalAugmentorSupplier.java

langchain4j · langchain4j-agentic/src/main/java/dev/langchain4j/agentic/declarative/RetrievalAugmentorSupplier.java · java · Apache-2.0
ai

Annotation marking a static method that supplies a RetrievalAugmentor for an agent, enabling retrieval augmentation.

// Source: https://github.com/langchain4j/langchain4j | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package dev.langchain4j.agentic.declarative;

import dev.langchain4j.rag.RetrievalAugmentor;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Marks a method as a supplier of a retrieval augmentor that an agent can utilize during its operation.
 * The annotated method must be static, with no arguments other than the ones resolved through a
 * {@link SupplierParameterResolver}, and return an instance of {@link RetrievalAugmentor}.
 * <

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key