Package dev.langchain4j.adaptiverag
Class QuestionRouter
java.lang.Object
dev.langchain4j.adaptiverag.QuestionRouter
- All Implemented Interfaces:
Function<String,
QuestionRouter.Type>
Router for user queries to the most relevant datasource.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionApplies a given question to an AI model and extracts the data source from the response.
-
Constructor Details
-
QuestionRouter
public QuestionRouter()
-
-
Method Details
-
apply
Applies a given question to an AI model and extracts the data source from the response.- Specified by:
apply
in interfaceFunction<String,
QuestionRouter.Type> - Parameters:
question
- The question to be applied to the AI model.- Returns:
- The extracted data source from the model's response.
-