Error training on new docs
Getting this error out of the gate when trying to train on a single new .rst file. Any thoughts?
Traceback (most recent call last):
File "/home/pshriwise/soft/doc-gpt/docsgpt/scripts/ingest_rst.py", line 36, in <module>
store = FAISS.from_texts(docs, OpenAIEmbeddings(), metadatas=metadatas)
File "/home/pshriwise/.pyenv/versions/3.9.1/lib/python3.9/site-packages/langchain/vectorstores/faiss.py", line 192, in from_texts
index = faiss.IndexFlatL2(len(embeddings[0]))
IndexError: list index out of range
@pshriwise Could you provide the .rst file that causes the error?
Sure thing! https://github.com/openmc-dev/openmc/blob/develop/docs/source/index.rst
@pshriwise Hey Patrick,
If you haven't already, create a folder named "scikit-learn" inside the "scripts" folder and toss your index.rst inside of it. That should fix your problem.
You can really name the folder anything you would like, just make sure it matches the path in the ingest_rst.py and ingest_rst_sphinx.py files:
ps = list(Path("<FolderName>").glob("**/*.rst"))

Let me know if that works for you so I can close the issue. :)
It did. Thanks! I appreciate the help!
No problem! Glad to help.