Closed aleksandar-devedzic closed 1 year ago
I think we were discussing this on discord
The correct usage is as follows:
from llama_index import GPTVectorStoreIndex, ServiceContext
...
service_context = ServiceContext.from_defualts(llm_predictor=llm_predictor, prompt_helper=prompt_helper)
index = GPTVectorStoreIndex.from_documents(documents, service_context=service_context)
Going to close this for now!
Question Validation
Question
I want to train LLM on custom dataset. This is my code:
I am getting this error:
I have tried with and without index_name="my_index", error is the same.
"gpt_data" is folder with 1 txt file.
This line:
data = SimpleDirectoryReader(path).load_data() Gives me this:
[Document(text="Kimberlites are ... m thermochemica, doc_id='5bbe7a75-7817-4c00-bce1-db9256fde270', embedding=None, doc_hash='87fb32e4834c847365178498a6ce166a68df5d5547c8631df46d577616dd37e8', extra_info=None)]
So I manage to read the document, i added it to data variable, but GPTVectorStoreIndex treat it like an empty.
I am using:
Version: 0.6.20