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

feat: Allow setting metadata for ByteStream when created from file or from string #6857

Merged
merged 7 commits into from
Feb 1, 2024

Conversation

ZanSara
Copy link
Contributor

@ZanSara ZanSara commented Jan 31, 2024

Related Issues

Proposed Changes:

  • Add meta parameter to ByteStream.from_file_path() and ByteStream.from_string().
  • Improve docstrings
  • Add tests

How did you test it?

Unit tests

Notes for the reviewer

n/a

Checklist

@ZanSara ZanSara requested a review from a team as a code owner January 31, 2024 11:41
@ZanSara ZanSara requested review from anakin87 and removed request for a team January 31, 2024 11:41
@github-actions github-actions bot added topic:tests 2.x Related to Haystack v2.0 type:documentation Improvements on the docs labels Jan 31, 2024
@ZanSara ZanSara requested a review from a team as a code owner January 31, 2024 11:42
@ZanSara ZanSara requested review from dfokina and removed request for a team January 31, 2024 11:42
@ZanSara ZanSara marked this pull request as draft January 31, 2024 11:58
@coveralls
Copy link
Collaborator

coveralls commented Jan 31, 2024

Pull Request Test Coverage Report for Build 7740469769

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 88.962%

Totals Coverage Status
Change from base Build 7729093798: 0.0%
Covered Lines: 4626
Relevant Lines: 5200

💛 - Coveralls

@ZanSara ZanSara marked this pull request as ready for review January 31, 2024 16:28
@anakin87
Copy link
Member

The PR looks good to me.
Should we also unfreeze the dataclass?

Slightly (un)related:
I have some doubts about the serialization of a ByteStream when it is part of a Document.
It seems to me that meta is ignored in this case.
If so, we should also take care of this in another PR.

@ZanSara
Copy link
Contributor Author

ZanSara commented Feb 1, 2024

Here the issue: #6884

@ZanSara ZanSara merged commit 1039c73 into main Feb 1, 2024
22 checks passed
@ZanSara ZanSara deleted the meta-in-bytestream branch February 1, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to Haystack v2.0 topic:tests type:documentation Improvements on the docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow setting metadata for ByteStream when created from file or from string
3 participants