如何导入Llamaindex中的文档

问题描述 投票:0回答:1

我正在尝试使用 llama 索引,并且不断遇到加载文档的错误。 #使用Llama Index的simpleDirectoryReader加载数据并建立索引 reader = SimpleDirectoryReader(input_files=["./modals/llamaindex test/data/paul_graham_essay.txt"]) 文档 = readr.load_data() print(f"Loaded{len(docs)}docs") 这是我的代码。 Basically the error says document is not in the desired location and dont know the exact reason why is it so.

我正在尝试提供 llama 索引和文档,然后提出相关问题。我严格遵循该网站,并且对这个人工智能和编码完全陌生。

artificial-intelligence huggingface-transformers llama-index
1个回答
0
投票

而不是

SimpleDirectoryReader(input_files=["./modals/llamaindex test/data/paul_graham_essay.txt"])

使用

SimpleDirectoryReader(input_files=["./modals/llamaindex test/data)
© www.soinside.com 2019 - 2024. All rights reserved.