基于知识库的机器人示例运行报错
Andrew-ppppeng opened this issue · comments
Andrew_peng commented
用的默认参数,没做任何更改。
好像是依赖库近期的更新导致 https://github.com/jerryjliu/llama_index/releases?page=1
报错信息如下
[<ipython-input-9-039079498604>](https://localhost:8080/#) in construct_index(directory_path)
21 documents = SimpleDirectoryReader(directory_path).load_data()
22
---> 23 index = GPTSimpleVectorIndex(
24 documents, llm_predictor=llm_predictor, prompt_helper=prompt_helper
25 )
[/usr/local/lib/python3.9/dist-packages/gpt_index/indices/vector_store/vector_indices.py](https://localhost:8080/#) in __init__(self, nodes, index_struct, service_context, text_qa_template, simple_vector_store_data_dict, **kwargs)
92 )
93
---> 94 super().__init__(
95 nodes=nodes,
96 index_struct=index_struct,
[/usr/local/lib/python3.9/dist-packages/gpt_index/indices/vector_store/base.py](https://localhost:8080/#) in __init__(self, nodes, index_struct, service_context, text_qa_template, vector_store, use_async, **kwargs)
56 self.text_qa_template = text_qa_template or DEFAULT_TEXT_QA_PROMPT
57 self._use_async = use_async
---> 58 super().__init__(
59 nodes=nodes,
60 index_struct=index_struct,
TypeError: __init__() got an unexpected keyword argument 'llm_predictor'
xifengxx commented
我试了一下也是报错:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[<ipython-input-19-92a7906c98e5>](https://localhost:8080/#) in <cell line: 1>()
----> 1 construct_index('Jimmy-Newsletter-Corpus')
2 frames
[/usr/local/lib/python3.9/dist-packages/gpt_index/indices/vector_store/base.py](https://localhost:8080/#) in __init__(self, nodes, index_struct, service_context, text_qa_template, vector_store, use_async, **kwargs)
56 self.text_qa_template = text_qa_template or DEFAULT_TEXT_QA_PROMPT
57 self._use_async = use_async
---> 58 super().__init__(
59 nodes=nodes,
60 index_struct=index_struct,
TypeError: __init__() got an unexpected keyword argument 'llm_predictor'
weeky周 commented
我也是 需要自行下载到本地试试嘛
Jimmy Wong commented
抱歉,这两天在更新 Midjourney 的教程,待我发布完,我来看看这个问题。
Jimmy Wong commented
问题重复:#36