Find answers from the community

Updated last year

Regarding the new Example for SQL Auto

Regarding the new Example for SQL Auto Vector Query Engine (https://gpt-index.readthedocs.io/en/latest/examples/query_engine/SQLAutoVectorQueryEngine.html) I think I found a small mistake:
Plain Text
# define node parser and LLM
llm_predictor = LLMPredictor(llm=ChatOpenAI(temperature=0, model_name="gpt-4", streaming=True))
service_context = ServiceContext.from_defaults(chunk_size_limit=1024, llm_predictor=llm_predictor)
text_splitter = TokenTextSplitter(chunk_size=service_context.chunk_size_limit)
node_parser = SimpleNodeParser(text_splitter=text_splitter)


Shouldn't the service_context also include node_parser=node_parser ?
L
1 comment
It could, but the one instansiated inside the service context will have the same setting

the node parser defined there seems to be used further down https://gpt-index.readthedocs.io/en/latest/examples/query_engine/SQLAutoVectorQueryEngine.html#build-vector-index
Add a reply
Sign up and join the conversation on Discord