dify/api/core/rag/rerank/entity/weight.py
2024-08-01 13:02:33 +08:00

22 lines
353 B
Python

from pydantic import BaseModel
class VectorSetting(BaseModel):
vector_weight: float
embedding_provider_name: str
embedding_model_name: str
class KeywordSetting(BaseModel):
keyword_weight: float
class Weights(BaseModel):
"""Model for weighted rerank."""
vector_setting: VectorSetting
keyword_setting: KeywordSetting