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

expose decoder #792

Merged
merged 9 commits into from
Oct 23, 2024
Merged

expose decoder #792

merged 9 commits into from
Oct 23, 2024

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Oct 23, 2024


Pull Request Summary

Documentation 📚

  • Added a new tokenizers.md file to the documentation, providing an overview of the tokenizers module and its functionalities, including count, truncate, and chunk.

Code Enhancements 🛠️

  • Refactored resolveTokenEncoder to return an object with encode and decode methods, improving code clarity and consistency.
  • Implemented a new chunk function in the encoders module to split text into chunks based on token size, enhancing text processing capabilities.

Tests ✅

  • Updated tests to use the new encode method from the resolveTokenEncoder function.
  • Added a test for the chunk function to ensure it splits text correctly and maintains line numbers.

Bug Fixes 🐛

  • Fixed an issue with promptyParse to correctly handle undefined filenames, improving robustness.

New Features ✨

  • Introduced a new sample script chunk.genai.mjs demonstrating the use of the chunk function to process and summarize text chunks.

Miscellaneous 🔄

  • Updated various function calls to align with the new resolveTokenEncoder return structure.

generated by prd

Copy link

Investigator report

, 5af3bff

generated by gai

@pelikhan pelikhan marked this pull request as ready for review October 23, 2024 19:06
@pelikhan pelikhan merged commit b8cc987 into main Oct 23, 2024
7 of 12 checks passed
@pelikhan pelikhan deleted the decode branch October 23, 2024 19:06
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.

1 participant