BadRequestError: Error code: 400 - {'error': {'message': "'$.tools' is too long. Maximum length is 128, but got 221 items.", 'type': 'invalid_request_error', 'param': None, 'code': None}}
hello guys i'm getting this error even for gpt-4-1106-preview for higher context and tokens, i'm trying to use rag. I have created a pandasqueryengine for csv based datas and UnstructuredReader to parse data from pdf
data sources format: pdf, txt, csv
trying to use gpt-4 and OpenAIEmbedding for embed model
here is my service context
llm = OpenAI(
model="gpt-4-1106-preview",
# model="gpt-4",
# model="gpt-3.5-turbo",
temperature=0.5,
)
OpenAI_embeddings = OpenAIEmbedding()
service_context = ServiceContext.from_defaults(
llm=llm,
embed_model=OpenAI_embeddings,
chunk_size=1024,
)
I use RouterQueryEngine and SubQuestionQueryEngine as well, testing out both.
root_query_engine_tool = QueryEngineTool(
# query_engine=root_query_engine,
query_engine=router_query_engine,
metadata=ToolMetadata(
name="router_query_engine",
# name="sub_question_query_engine",
description="useful for when you want to answer queries that require analyzing multiple sections documents",
),
)
# We combine all query engine tools as one tool
tools = individual_query_engine_tools + [root_query_engine_tool]
index is stored in local storage with persistent directory, and loading them in runtime
and i'm using OpenAI data agents with these tools.
How to resolve this error?