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

[Feature Request]: Batch add chunks #4016

Open
1 task done
panzi opened this issue Dec 12, 2024 · 0 comments
Open
1 task done

[Feature Request]: Batch add chunks #4016

panzi opened this issue Dec 12, 2024 · 0 comments
Labels

Comments

@panzi
Copy link

panzi commented Dec 12, 2024

Is there an existing issue for the same feature request?

  • I have checked the existing issues.

Is your feature request related to a problem?

We do our own automated preprocessing of somewhat big data sets. Uploading it all as a single generated XSLX document would be too big. We need to record the relation of chunk IDs to our own database entries anyway, so we can properly update the chunks without re-doing everything.

Describe the feature you'd like

API method to batch add multiple chunks at once.

Document.add_chunks(chunks: list[str]) -> list[str]

The return value are the new chunk IDs, correctly correlated to the chunks as passed as the parameter.

Alternatively including the important_keywords parameter and returning Chunk objects:

from typing import TypedDict, NotRequired

class ChunkParams(TypedDict):
    content: str
    important_keywords: NotRequired[str]

Document.add_chunks(chunks: list[ChunkParams]) -> list[Chunk]

Describe implementation you've considered

No response

Documentation, adoption, use case

No response

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants