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

FIM not caching correctly JS files #405

Open
aponcedeleonch opened this issue Dec 18, 2024 · 0 comments · May be fixed by #408
Open

FIM not caching correctly JS files #405

aponcedeleonch opened this issue Dec 18, 2024 · 0 comments · May be fixed by #408
Assignees

Comments

@aponcedeleonch
Copy link
Contributor

The cache is working correctly for Python and languages which uses # as a character to start a comment. Languages that use // are not being registered in cache correctly. This is because the regex that we are using.

FIM Python request:

# Some context
# my_path/my_file.py <-- Regex will match here

def foo():
   pass

FIM JS request

// Some context
// my_path/my_file.js <-- Regex will not match here

...
@aponcedeleonch aponcedeleonch self-assigned this Dec 18, 2024
aponcedeleonch added a commit that referenced this issue Dec 18, 2024
Closes: #405

The implemented cache was not working correctly because of the
way the context is added for FIM requests in other programming
languages which are not python. The context for the LLM is provided
as single line comments. In Python this means lines which start with
the character `#`. Other languages may have other starting sequence
for single line comments, e.g. Javascript uses `//`. This PR changes
the regex to detect the paths for other languages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant