Jan 23, 2024
Yes, we can integrate selectors into our router query engine. We can either use LLM selectors or Pydantic selectors (currently only supported by gpt-4-0613 and gpt-3.5-turbo-0613 (the default)).
Refer the sample code :
query_engine = RouterQueryEngine(
selector=PydanticSingleSelector.from_defaults(),
query_engine_tools=[
simple_tool,
single_step_tool,
multi_step_tool,
sub_question_tool,
],
)
Hope it answers your question :)