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

Add start and end indices to Node extra info during index construction #265

Merged
merged 2 commits into from
Jan 21, 2023

Conversation

hongyishi
Copy link
Contributor

Only applies to BaseGPTIndex

Copy link
Collaborator

@jerryjliu jerryjliu left a comment

Choose a reason for hiding this comment

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

thanks for the change - could you add a test for this? maybe in tests/indices/list/test_base.py

for i, text_chunk in enumerate(text_chunks):
fmt_text_chunk = truncate_text(text_chunk, 50)
print(f"> Adding chunk: {fmt_text_chunk}")
index_pos_info = {"start": index_counter, "end": index_counter + len(text_chunk)}
Copy link
Collaborator

Choose a reason for hiding this comment

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

think you might need to add 1 due to separator

@hongyishi hongyishi merged commit 593e95f into main Jan 21, 2023
@hongyishi hongyishi deleted the hongyi-node-index branch January 21, 2023 05:28
viveksilimkhan1 pushed a commit to viveksilimkhan1/llama_index that referenced this pull request Oct 30, 2023
* remove redundant _examples field

* formatting
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