Spaces:
Sleeping
Sleeping
thanhtung09t2
commited on
Commit
•
cb4e136
1
Parent(s):
f67c3aa
Create base.py for embeeding
Browse files- api/embedding_models/base.py +12 -0
api/embedding_models/base.py
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from api.embedding_models import baai_bge_m3
|
2 |
+
from api.embedding_models.embedding_config import EmbeddingConfig
|
3 |
+
|
4 |
+
def get_embedding_model(model_name) -> EmbeddingConfig:
|
5 |
+
"""
|
6 |
+
Hàm trung gian quản lý việc tạo embedding model phục vụ query
|
7 |
+
"""
|
8 |
+
if model_name == "BAAI/bge-m3":
|
9 |
+
return baai_bge_m3.EmbeddingModel()
|
10 |
+
else:
|
11 |
+
raise NotImplementedError("This type of embedding model is not yet implemented")
|
12 |
+
|