-
Notifications
You must be signed in to change notification settings - Fork 52
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
[ERNIEBot Researcher] update llama_index #311
Conversation
# TODO: Adapt to llamaindex | ||
pass | ||
retriever = self.db.as_retriever(similarity_top_k=top_k) | ||
nodes = retriever.retrieve(query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
给erniebot-agent/src/erniebot_agent/tools/llama_index_retrieval_tool.py和lanchain retrieval tool加上单测,参考我的PR。
return index | ||
if not abstract and not origin_data: | ||
documents = preprocess(path, url_path=url_path, use_langchain=False) | ||
text_splitter = SentenceSplitter(chunk_size=1024, chunk_overlap=20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SentenceSplitter和langchain 的spacy splitter,哪个更好呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.