-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix for Tokens Limit/Context issue | GPT4FREE | Auto Install Windows | Folders collapse/expand Monaco Editor #539
Open
Reiko69420
wants to merge
11
commits into
stitionai:main
Choose a base branch
from
Reiko69420:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Idk what the f*ck did i do, i somehow deleted every commit that i've done
On the Monaco Editor there is now folder that are collapsed and you can expand them! And now you can click on the little eye in the monacoEditor to block the context of the file for the AI
Fixed an issue with update_config where Python will glitch out and write random stuff in the config file because the code keeps opening, read, add value, write, close very fast... Now it just write the update in the self.config and THEN save_config Made some optimization on the save func in MonacoEditor Added some smooth animation in the folder collapse/expanding~
It seems that the line needed to be split on ":" instead of "`", because there will always be a colon when the line starts with "File: ".
@Reiko69420 Dude such a awesome work you did here Having some issue with free GPT-4 models |
Thx! |
Prakashmaheshwaran
approved these changes
Jun 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
[FEATURE] - Added "Blacklist Folder/File" in Settings, where you can specify folders and files that Devika shouldn't read for context.
In the Monaco Editor you can also easily block the context of files/folder automaticly with a button.
This prevents situations where it reads everything in the projects folder (Even dependencies) and ends up exceeding gigantic tokens usage in some case.
[FEATURE] - Added support for GPT4FREE, with a lot of models
[FEATURE] - Automatic Installer and launcher for Windows "start.cmd" that install bun, uv and python if not already installed, create the environnement, install requirements with uv and then start UI and server
[FEATURE] - A text will appear if config canot be loaded in UI
[FEATURE] - Added folders collapse and Expand in Monaco Editor for much better readability (With smooth animation!)
[BUG] - Fixed asyncio.set_event_loop_policy on some Windows machine
On some Windows machine, some API could make an infinite loop and freeze the server. Because the Event Loop Policy was set to the default, switch to "WindowsSelectorEventLoopPolicy()" when the inference is made fixed the issue
[BUG] - Fixed an issue with update_config where Python will glitch out and write random stuff in the config file because the code keeps opening, read, add value, write, close very fast... It's very random but in my use it was very frequent and because of that everytime the server just randomly broke
Now it just write the update in the self.config and THEN save_config
Resolve Issues git
#366
Test plan
Here we can see in the logs all the skipped files:
Before blacklist token exceed 438k+ example:
It was not even able to finish the task because of the tokens limit...
After blacklist, token is just fine, 2k:
Here's almost all the GPT4FREE models:
When Config can be loaded by UI:
When config CANNOT be loaded:
And Here's a video of the folders in Monaco Editor and GPT4FREE:
https://github.com/stitionai/devika/assets/34484331/32051947-ff86-43d8-a70e-5427a5bf20cb
(I have added smooooth looking animation on a new commit, so we don't see it on the video)