Find answers from the community

s
F
Y
a
P
Updated last month

I m trying something out with `loader

I'm trying something out with loader = GithubRepositoryReader(...) but I do not know how to load the documents returned into an index.

I've tried
Plain Text
docs = loader.load_data(branch="html")
index = GPTSimpleVectorIndex().from_documents(docs)


However I receive this error:

ValueError: One of documents or index_struct must be provided.

Any idea what I should be doing?
L
M
3 comments
try this:

index = GPTSimpleVectorIndex.from_documents(docs)
I'll try that thanks

I've just had success with:

Plain Text
    index = GPTSimpleVectorIndex([]) #.from_documents(docs)
    for doc in docs:
        #print(doc.extra_info)
        index.insert(doc)
Both should work πŸ’ͺ
Add a reply
Sign up and join the conversation on Discord