MCPcopy Create free account
hub / github.com/nlweb-ai/NLWeb / get_embeddings_file_path

Function get_embeddings_file_path

AskAgent/python/data_loading/db_load.py:80–96  ·  view source on GitHub ↗

Generate the path for the equivalent file with embeddings. Args: file_path: Path to the original file Returns: Path to the file with embeddings

(file_path: str)

Source from the content-addressed store, hash-verified

78 return None, None
79
80def get_embeddings_file_path(file_path: str) -> str:
81 """
82 Generate the path for the equivalent file with embeddings.
83
84 Args:
85 file_path: Path to the original file
86
87 Returns:
88 Path to the file with embeddings
89 """
90 # Extract the filename from the path (keep the same name)
91 file_name = os.path.basename(file_path)
92
93 # Generate a path in the embeddings folder (using the same filename)
94 embeddings_path = os.path.join(CONFIG.nlweb.json_with_embeddings_folder, file_name)
95
96 return embeddings_path
97
98async def delete_site_from_database(site: str, database: str | None = None):
99 """

Callers 2

loadJsonToDBFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected