patchwork icon indicating copy to clipboard operation
patchwork copied to clipboard

Enhance embeddings

Open codelion opened this issue 9 months ago • 2 comments

Added more language files.

codelion avatar May 08 '24 12:05 codelion

@CTY-git can we add a flag that will re-embed the repository? At the moment, if the embedding already exists and we switch the embedding model it fails with an error. The only way to allow re-embedding is to manually delete the chroma DB file from the ~/. folder. In such cases, having a flag would be useful it will basically just delete the existing embedding and re-embed the repo. WDYT?

codelion avatar May 08 '24 12:05 codelion

The code changes involve updating the prompt.json file to include detailed instructions for resolving code issues, adding support for new programming languages and a feature to disable caching in code repository embeddings. Additionally, the typed.py file was modified to import 'NotRequired' instead of 'TypedDict' and add a 'disable_cache' field to the GenerateCodeRepositoryEmbeddingsInputs class, while also importing the NotRequired class and adding a 'disable_cache' attribute with a default value to the GenerateEmbeddingsInputs class. In GenerateEmbeddings.py, a new function delete_collection was added to delete collections, and parameters chunk_size and overlap_size are now retrieved from the inputs dictionary for the split_text function.


patched-admin avatar May 09 '24 04:05 patched-admin