continue-custom/server/continuedev/libs/index/chunk_metadata.py
Nate Sesti a85cb30cf9
Nate/better embeddings (#564)
* ♻️ refactoring codebase index folder

* ➕ tree_sitter dependency

* 🐛 solve a few indexing bugs

* ⚡️ code chunker

* ✏️ automatically remove trailing / from serverUrl

* 🎨 introduce Chunk class

* 🎨 finish chunking refactor
2023-10-18 21:43:25 -07:00

11 lines
302 B
Python

import os
from typing import Dict
def chunk_metadata(filepath: str, chunk: str) -> Dict[str, str]:
# TODO: Try adding c-tags to the top of each chunk
return {}
def format_chunk_with_metadata(filepath: str, chunk: str) -> str:
return f"```title={os.path.basename(filepath)}\n{chunk}```"