-
Notifications
You must be signed in to change notification settings - Fork 244
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
Option to include external libraries into context #437
Comments
If you know the path you should be able to do this yourself with |
I've tried using /include to do this, but the library I'm trying to include is within a vendor directory (installed by composer), and therefore is also in .gitignore. Mentat appears to accept the /include command, but doesn't actually add the file to the context. IMO it would solve a big usability issue if it were possible to explicitly /include files even if they are being git ignored. |
@jasonhildebrand What version of mentat are you using? It appears to work to me. I have What won't work is adding directories recursively. e.g. if you run |
I'm using 1.0.10 - the latest release. Thanks for clarifying. I did a different test and tried to include a single file, and that worked. I had only ever tried this on a directory, which doesn't work. That's helpful that this at least work for single files. In the future it would be great if it worked on directories too. |
When implementing something, it happens a lot (>20% of cases) that the LLM tries to use outdated function names of an external library.
When this happens, there should be an option to include the external library in the context as well in order for the LLM to understand how to use it properly.
For example, a Ruby project might have a few files in it, one of which would try to use an external library
Eth::Utils.bin_to_hex
. But since the LLM was trained, the naming has changed slightly and now it'sEth::Util.bin_to_hex
(no "s"). SinceEth
is an external library and is not placed in the project directory, mentat has no access to it and doesn't inject it into the context.To fix it, we can add some way to access the external library (which is already on the local drive but not inside of the current directory) into context.
The text was updated successfully, but these errors were encountered: