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

Add support to select context files #20

Open
trehak1 opened this issue Jul 14, 2023 · 5 comments
Open

Add support to select context files #20

trehak1 opened this issue Jul 14, 2023 · 5 comments
Milestone

Comments

@trehak1
Copy link

trehak1 commented Jul 14, 2023

Hi!
I think it would be very helpful to be able to select "context files" that would be sent with every request. For example when working with Repositories I would select liquibase changelog file and domain files, supply them to ChatGPT as context and then query ChatGPT to perform larger actions (i.e. extend domain object with some property and it would also modify repository, SQL, etc.)

@jcraane
Copy link
Owner

jcraane commented Jul 15, 2023

Great idea!

I am going to investigate. On the other hand, the new IntelliJ IDEA EAP also has an AI assistant which is similar as my plugin. I am unsure if I still need to invest int his one or just the one from Jetbrains.

@trehak1
Copy link
Author

trehak1 commented Jul 15, 2023

It does not look like they support this feature. It would be cool to have it! I can imagine a context menu on a file, selection "Add to GPT context" and then a simple list of files attached to current query context (would be necessary to add display token count). I can imagine, using gpt-4-32k, that I could easily replace like 6 junior developers 😆

@jcraane
Copy link
Owner

jcraane commented Jul 15, 2023

Yes, I like the idea and indeed might be worth to add it to the plugin. I am going to see how I can integrate this (with token count and an indicator that context files (and even which files) are added to the chat). I can even include an option later to save/restore different contexts based on the task you are working on.

@trehak1
Copy link
Author

trehak1 commented Jul 15, 2023

You can find java tokenizer for GPT here - https://github.com/knuddelsgmbh/jtokkit - I am using in my projects and it is accurate. Different contexts are something that I had in my mind as well but if I was going to implement it I would do it in the next stage. According to my experience it is crucial to carefully select as much as right context to the prompt as possible. I had a chat with BITO.AI and they are thinking about implementing this as well (The repo context is something we are working on and hoping to launch in the next few weeks. See https://bito.ai/next-gen/) but I really like simplicity and speed of this plugin of yours.

@jcraane
Copy link
Owner

jcraane commented Jul 15, 2023

Cool! Will take a look at the tokenizer as well.

@jcraane jcraane added this to the 0.0.9 milestone Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants