Skip to content

Conversation

@roerohan
Copy link
Contributor

@roerohan roerohan commented Jan 7, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

if (tokenCount > MAX_TOKENS) {
const charsPerToken = 4
const maxChars = MAX_TOKENS * charsPerToken
output = output.slice(0, maxChars)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe instead of truncating using slice, I could store the response in a temporary file and the LLM could read that for context as required 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Perhaps something like this?

Copy link
Contributor Author

@roerohan roerohan Jan 7, 2026

Choose a reason for hiding this comment

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

Added this change in 7223a39, can abandon this commit if you'd rather go with the naive approach.

@roerohan roerohan force-pushed the webfetch-max-tokens branch from 06837f2 to 7223a39 Compare January 7, 2026 13:24
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