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 tokenCount on the DocumentNode #4251

Merged
merged 1 commit into from
Oct 25, 2024
Merged

Conversation

JoviDeCroock
Copy link
Member

This way people can add this to metrics and inform themselves about sane values to use with the maxTokens option on parse. This was added as a non-enumerable property to increase backwards compatability.

Currently there is now way to know the tokens and by extension set sane defaults.

This way people can add this to metrics and inform themselves about
sane values to use with the `maxTokens` option on `parse`.
This was added as a non-enumerable property to increase backwards
compatability.
@JoviDeCroock JoviDeCroock requested a review from a team as a code owner October 23, 2024 17:26
Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit 54bca6a
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/671931d51dea400008960574
😎 Deploy Preview https://deploy-preview-4251--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

Hi @JoviDeCroock, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@JoviDeCroock JoviDeCroock merged commit cf1c080 into main Oct 25, 2024
36 checks passed
@JoviDeCroock JoviDeCroock deleted the expose-token-count branch November 5, 2024 12:26
JoviDeCroock added a commit that referenced this pull request Nov 8, 2024
Backports #4251 from v17

Backporting this so we can document the `maxTokens` for production use
cases. The performance of this change looks to be neutral
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