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: generators (2.0) #5690

Merged
merged 8 commits into from
Aug 31, 2023
Merged

feat: generators (2.0) #5690

merged 8 commits into from
Aug 31, 2023

Conversation

ZanSara
Copy link
Contributor

@ZanSara ZanSara commented Aug 30, 2023

Related Issues

Proposed Changes:

  • Adds a generators module
  • Adds a single helper to enforce tokens count for LLMs
  • Adds tests for the helper.

How did you test it?

Local tests run

Notes for the reviewer

This PR introduces no LLM backends yet. I will follow up with ChatGPT and GPT4 components, see:

Checklist

@ZanSara ZanSara requested a review from a team as a code owner August 30, 2023 14:26
@ZanSara ZanSara requested review from bogdankostic and removed request for a team August 30, 2023 14:26
@ZanSara ZanSara added the 2.x Related to Haystack v2.0 label Aug 30, 2023
@github-actions github-actions bot added topic:tests type:documentation Improvements on the docs labels Aug 30, 2023
@coveralls
Copy link
Collaborator

coveralls commented Aug 30, 2023

Pull Request Test Coverage Report for Build 6027145703

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 48.542%

Totals Coverage Status
Change from base Build 6025550638: 0.02%
Covered Lines: 11571
Relevant Lines: 23837

💛 - Coveralls

@ZanSara ZanSara requested a review from a team as a code owner August 30, 2023 15:49
@ZanSara ZanSara requested review from dfokina and removed request for a team August 30, 2023 15:49
@ZanSara ZanSara mentioned this pull request Aug 30, 2023
Copy link
Contributor

@bogdankostic bogdankostic left a comment

Choose a reason for hiding this comment

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

Let's add a type hint for tokenizer and tokenize the prompt only once.

haystack/preview/components/generators/_helpers.py Outdated Show resolved Hide resolved
haystack/preview/components/generators/_helpers.py Outdated Show resolved Hide resolved
Copy link
Contributor

@bogdankostic bogdankostic left a comment

Choose a reason for hiding this comment

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

LGTM

@ZanSara ZanSara merged commit 5f1256a into main Aug 31, 2023
56 of 66 checks passed
@ZanSara ZanSara deleted the generators-module branch August 31, 2023 15:33
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.

None yet

3 participants