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

[ERNIEBot Researcher] update llama_index #311

Merged
merged 7 commits into from
Jan 24, 2024

Conversation

qingzhong1
Copy link
Contributor

No description provided.

@w5688414 w5688414 changed the title update llama_index [ERNIEBot Researcher] update llama_index Jan 24, 2024
@w5688414 w5688414 self-requested a review January 24, 2024 06:01
# TODO: Adapt to llamaindex
pass
retriever = self.db.as_retriever(similarity_top_k=top_k)
nodes = retriever.retrieve(query)
Copy link
Collaborator

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。

https://github.com/PaddlePaddle/ERNIE-SDK/pull/258/files#diff-c2373d021a8bfd57cdd710d5cc38b078122c4a93c295af39fbfe659e665cd476

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SentenceSplitter和langchain 的spacy splitter,哪个更好呢?

Copy link
Collaborator

@w5688414 w5688414 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@w5688414 w5688414 merged commit 885addb into PaddlePaddle:develop Jan 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants