Refactor web search plugin and clean up code
Refactored the web search plugin by removing the old Bing search implementation and reorganizing the plugin structure. Introduced modular search engine classes under 'web_search_tool/engines' and utility tools under 'web_search_tool/tools' and 'web_search_tool/utils'. Updated references and initialization logic to support multiple search engines and improved maintainability. Also performed minor code cleanups and replaced 'except ...: pass' with 'except ...: ...' for brevity.
This commit is contained in:
@@ -144,8 +144,7 @@ class EmbeddingStore:
|
||||
# 确保事件循环被正确关闭
|
||||
try:
|
||||
loop.close()
|
||||
except Exception:
|
||||
pass
|
||||
except Exception: ...
|
||||
|
||||
def _get_embeddings_batch_threaded(self, strs: List[str], chunk_size: int = 10, max_workers: int = 10, progress_callback=None) -> List[Tuple[str, List[float]]]:
|
||||
"""使用多线程批量获取嵌入向量
|
||||
|
||||
Reference in New Issue
Block a user