While in the second case where I am trying to use
QueryEngineRouter, it fails. Below is the code for the same.
# construct list_index and vector_index from storage_context and service_context
list_index = ListIndex(nodes, service_context=service_context)
vector_index = VectorStoreIndex(nodes, service_context=service_context)
# define list_query_engine and vector_query_engine
list_query_engine = list_index.as_query_engine(
response_mode="tree_summarize",
use_async=True,
)
vector_query_engine = vector_index.as_query_engine()
list_tool = QueryEngineTool.from_defaults(
query_engine=list_query_engine,
description="Useful for summarization questions related to the data source",
)
vector_tool = QueryEngineTool.from_defaults(
query_engine=vector_query_engine,
description="Useful for retrieving specific context related to the data source",
)
# construct RouterQueryEngine
query_engine = RouterQueryEngine(
# selector=LLMSingleSelector.from_defaults(),
selector=PydanticSingleSelector.from_defaults(),
query_engine_tools=[
list_tool,
vector_tool,
],
)
response_str = query_engine.query(
"What is the maximum quantity that can be submitted for a First Leg Order in trading?"
).response
And the http log gives
404 Not Found.
HTTP Request: POST https://visdam-labs.openai.azure.com/chat/completions "HTTP/1.1 404 Resource Not Found"
Please let me know if I am doing something wrong here. Thank you for looking into it.