Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Cache FIM entries in memory to avoid repeated writes to DB #372

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

aponcedeleonch
Copy link
Contributor

@aponcedeleonch aponcedeleonch commented Dec 16, 2024

Makes a hash dictionary to avoid creating multiple entries for similar FIM requests.

The hashes are either:

  • For Copilot: path_of_file + provider
  • For the rest of providers: message_received_in_request + provider

The match for the rest of providers is a bit harder. There are several paths included on the message and the first one is not the path of the "focused" file. I will create an issue to look into them later. For the moment we can do a best effort of hashing the entire content of the request and storing that as a hash.

@lukehinds lukehinds merged commit 768ae40 into main Dec 16, 2024
3 checks passed
@lukehinds lukehinds deleted the hash-dict-for-fim branch December 16, 2024 15:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants