devika icon indicating copy to clipboard operation
devika copied to clipboard

Fix for Tokens Limit/Context issue | GPT4FREE | Auto Install Windows | Folders collapse/expand Monaco Editor

Open Reiko69420 opened this issue 1 year ago • 2 comments

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

https://github.com/stitionai/devika/issues/366

Test plan

Here we can see in the logs all the skipped files: image

Before blacklist token exceed 438k+ example: image It was not even able to finish the task because of the tokens limit...

After blacklist, token is just fine, 2k: image

Here's almost all the GPT4FREE models: image

When Config can be loaded by UI: image

When config CANNOT be loaded: image

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)

Reiko69420 avatar May 08 '24 00:05 Reiko69420

@Reiko69420 Dude such a awesome work you did here

Having some issue with free GPT-4 models image i belive if you extend time limit that would be enough to counter it

Prakashmaheshwaran avatar Jun 10 '24 11:06 Prakashmaheshwaran

@Reiko69420 Dude such a awesome work you did here

Having some issue with free GPT-4 models image i belive if you extend time limit that would be enough to counter it

Thx! You can change the Timeout settings! ^^

Reiko69420 avatar Jun 10 '24 15:06 Reiko69420