File size: 451 Bytes
cb4e136
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from api.embedding_models import baai_bge_m3
from api.embedding_models.embedding_config import EmbeddingConfig

def get_embedding_model(model_name) -> EmbeddingConfig:
    """ 
        Hàm trung gian quản lý việc tạo embedding model phục vụ query
    """
    if model_name == "BAAI/bge-m3":
        return baai_bge_m3.EmbeddingModel()
    else:
        raise NotImplementedError("This type of embedding model is not yet implemented")