Skip to content
New issue

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

Got error when running: https://colab.research.google.com/drive/1Fr1hxYOG5lss9vbvZlaw-11wM2U6N7cQ #36

Closed
morningman opened this issue Apr 2, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@morningman
Copy link

When running construct_index('Jimmy-Newsletter-Corpus'), error reports:

TypeError                                 Traceback (most recent call last)
[<ipython-input-11-92a7906c98e5>](https://localhost:8080/#) in <cell line: 1>()
----> 1 construct_index('Jimmy-Newsletter-Corpus')

2 frames
[<ipython-input-8-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'

Could you help me with this?

@JAdpp
Copy link

JAdpp commented Apr 3, 2023

same problem...

@thinkingjimmy
Copy link
Owner

抱歉,这两天在更新 Midjourney 的教程,待我发布完,我来看看这个问题。

@lingxide
Copy link

lingxide commented Apr 7, 2023

同样遇到这个问题找过来的……
顺便问一嘴,这个索引一旦建立,本质上是不是通过LlamaIndex库在本地将自己的问题洗一遍再发给GPT?

@thinkingjimmy
Copy link
Owner

问题已修复,现在可以运行了,是 LLAMA 他们更新了代码:
https://github.com/jerryjliu/llama_index/blob/main/docs/guides/primer/usage_pattern.md#customizing-llms

@thinkingjimmy
Copy link
Owner

同样遇到这个问题找过来的…… 顺便问一嘴,这个索引一旦建立,本质上是不是通过LlamaIndex库在本地将自己的问题洗一遍再发给GPT?

你可以看看这篇文章

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants