1717 EmbeddingProfile ,
1818)
1919from .paths import (
20- _get_registry_file_path ,
21- _get_db_registry_file_path ,
22- _get_llm_registry_file_path ,
23- _get_embedding_registry_file_path ,
24- _ensure_parent_dir ,
20+ get_registry_file_path ,
21+ get_db_registry_file_path ,
22+ get_llm_registry_file_path ,
23+ get_embedding_registry_file_path ,
24+ ensure_parent_dir ,
2525)
2626
2727
2828def save_registry_to_disk (registry : DataSourcesRegistry ) -> None :
29- path = _get_registry_file_path ()
30- _ensure_parent_dir (path )
29+ path = get_registry_file_path ()
30+ ensure_parent_dir (path )
3131 payload = asdict (registry )
3232 with path .open ("w" , encoding = "utf-8" ) as f :
3333 json .dump (payload , f , ensure_ascii = False , indent = 2 )
3434
3535
3636def save_db_registry_to_disk (registry : DBConnectionsRegistry ) -> None :
37- path = _get_db_registry_file_path ()
38- _ensure_parent_dir (path )
37+ path = get_db_registry_file_path ()
38+ ensure_parent_dir (path )
3939 payload = asdict (registry )
4040 with path .open ("w" , encoding = "utf-8" ) as f :
4141 json .dump (payload , f , ensure_ascii = False , indent = 2 )
4242
4343
4444def save_llm_registry_to_disk (registry : LLMRegistry ) -> None :
45- path = _get_llm_registry_file_path ()
46- _ensure_parent_dir (path )
45+ path = get_llm_registry_file_path ()
46+ ensure_parent_dir (path )
4747 payload = asdict (registry )
4848 with path .open ("w" , encoding = "utf-8" ) as f :
4949 json .dump (payload , f , ensure_ascii = False , indent = 2 )
5050
5151
5252def save_embedding_registry_to_disk (registry : EmbeddingRegistry ) -> None :
53- path = _get_embedding_registry_file_path ()
54- _ensure_parent_dir (path )
53+ path = get_embedding_registry_file_path ()
54+ ensure_parent_dir (path )
5555 payload = asdict (registry )
5656 with path .open ("w" , encoding = "utf-8" ) as f :
5757 json .dump (payload , f , ensure_ascii = False , indent = 2 )
@@ -95,7 +95,7 @@ def _parse_vectordb_list(items: List[Dict[str, Any]]) -> List[VectorDBSource]:
9595
9696
9797def load_registry_from_disk () -> DataSourcesRegistry :
98- path = _get_registry_file_path ()
98+ path = get_registry_file_path ()
9999 if not path .exists ():
100100 return DataSourcesRegistry ()
101101 with path .open ("r" , encoding = "utf-8" ) as f :
@@ -141,7 +141,7 @@ def _parse_db_conn_list(items: List[Dict[str, Any]]) -> List[DBConnectionProfile
141141
142142
143143def load_db_registry_from_disk () -> DBConnectionsRegistry :
144- path = _get_db_registry_file_path ()
144+ path = get_db_registry_file_path ()
145145 if not path .exists ():
146146 return DBConnectionsRegistry ()
147147 with path .open ("r" , encoding = "utf-8" ) as f :
@@ -169,7 +169,7 @@ def _parse_llm_profiles(items: List[Dict[str, Any]]) -> List[LLMProfile]:
169169
170170
171171def load_llm_registry_from_disk () -> LLMRegistry :
172- path = _get_llm_registry_file_path ()
172+ path = get_llm_registry_file_path ()
173173 if not path .exists ():
174174 return LLMRegistry ()
175175 with path .open ("r" , encoding = "utf-8" ) as f :
@@ -195,7 +195,7 @@ def _parse_embedding_profiles(items: List[Dict[str, Any]]) -> List[EmbeddingProf
195195
196196
197197def load_embedding_registry_from_disk () -> EmbeddingRegistry :
198- path = _get_embedding_registry_file_path ()
198+ path = get_embedding_registry_file_path ()
199199 if not path .exists ():
200200 return EmbeddingRegistry ()
201201 with path .open ("r" , encoding = "utf-8" ) as f :
0 commit comments