feat: 添加同步获取embedding向量和生成响应的方法

This commit is contained in:
墨梓柒
2025-07-16 11:00:16 +08:00
parent a8cbb2978b
commit c71f2b21c0
5 changed files with 41 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ from rich.progress import (
TextColumn,
)
from src.manager.local_store_manager import local_storage
from src.chat.utils.utils import get_embedding
from src.chat.utils.utils import get_embedding_sync
from src.config.config import global_config
@@ -99,7 +99,7 @@ class EmbeddingStore:
self.idx2hash = None
def _get_embedding(self, s: str) -> List[float]:
return get_embedding(s)
return get_embedding_sync(s)
def get_test_file_path(self):
return EMBEDDING_TEST_FILE