Skip to content

Streaming diff - error on max tokens reached (+recursive framework) #5481

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

Merged
merged 2 commits into from
May 2, 2025

Conversation

RomneyDa
Copy link
Collaborator

@RomneyDa RomneyDa commented May 2, 2025

Description

Throw an error in edit/apply diff streaming when max token limit reached. Prevents truncation of files

I've placed this inside a recursive streaming function that would be great to implement soon but is commented out for now:

  • Creates a recursive "Continue where you left off" generator that keeps track of tokens and recurses before hitting max tokens
  • not infinite but makes the limiting factor the context length not the maxTokens, which is a 10x for many models
  • with this implementation loses prediction abilities after first recursion
  • in draft state because seems to be having whitespace issues that cause extra diff lines at recursion boundaries (see pictures with three recursions and a problematic diff at between the 2nd and 3rd group of ~400 tokens
image

Copy link

netlify bot commented May 2, 2025

Deploy Preview for continuedev ready!

Name Link
🔨 Latest commit 2a91c4e
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/68154eb0e3e7940008dfeda9
😎 Deploy Preview https://deploy-preview-5481--continuedev.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.

@RomneyDa RomneyDa marked this pull request as ready for review May 2, 2025 23:01
@RomneyDa RomneyDa requested a review from a team as a code owner May 2, 2025 23:01
@RomneyDa RomneyDa requested review from Patrick-Erichsen and removed request for a team May 2, 2025 23:01
@RomneyDa RomneyDa changed the title Recursive streaming for infinite apply Streaming diff - error on max tokens reached (+recursive framework) May 2, 2025
@RomneyDa RomneyDa merged commit cf89f6a into main May 2, 2025
35 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Issues and PRs May 2, 2025
@RomneyDa RomneyDa deleted the dallin/infinite-apply branch May 2, 2025 23:53
@RomneyDa
Copy link
Collaborator Author

I have read the CLA Document and I hereby sign the CLA

Copy link

github-actions bot commented May 15, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@sestinj
Copy link
Contributor

sestinj commented May 15, 2025

recheck

github-actions bot added a commit that referenced this pull request May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants