We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@xuwenhao 最新的llama-index 不再支持GPTSimpleVectorIndex
https://github.com/xuwenhao/geektime-ai-course/blob/main/10_llama_index_to_read_a_book.ipynb
import openai, os from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader openai.api_key = os.environ.get("OPENAI_API_KEY") documents = SimpleDirectoryReader('./data/mr_fujino').load_data() index = GPTSimpleVectorIndex.from_documents(documents) index.save_to_disk('index_mr_fujino.json')
上面的代码会报错,GPTSimpleVectorIndex要改成GPTVectorStoreIndex
需要改成下面的代码
import openai, os from llama_index import GPTVectorStoreIndex, SimpleDirectoryReader openai.api_key = os.environ.get("OPENAI_API_KEY") documents = SimpleDirectoryReader('./data/mr_fujino').load_data() index = GPTVectorStoreIndex.from_documents(documents) index.storage_context.persist('index_mr_fujino.json')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@xuwenhao 最新的llama-index 不再支持GPTSimpleVectorIndex
https://github.com/xuwenhao/geektime-ai-course/blob/main/10_llama_index_to_read_a_book.ipynb
上面的代码会报错,GPTSimpleVectorIndex要改成GPTVectorStoreIndex
需要改成下面的代码
The text was updated successfully, but these errors were encountered: