Find answers from the community

Updated last month

LlamaIndex Update Causes ServiceContext Deprecation

At a glance
Hi guys,
after updating all the LLamaIndex libs I faced this problem: "ServiceContext is deprecated. Use llama_index.settings.Settings" after checking the documentation, my impression is that I can pass the parameter that I used in the sevicecontext, right into, say, VectorStoreIndex. I didn't find the chunk_size parameter, though. How can I pass it there? Thanks!
```
L
Z
2 comments
Plain Text
from llama_index.core.node_parser import SentenceSplitter

splitter = SentenceSplitter(chunk_size=512)

index = VectorStoreIndex.from_documents(..., transformations=[splitter])
Thank you!
Add a reply
Sign up and join the conversation on Discord