mirror of
https://github.com/langgenius/dify.git
synced 2026-03-28 09:30:55 +08:00
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: WH-2099 <wh2099@pm.me>
28 lines
408 B
Python
28 lines
408 B
Python
from typing import TypedDict
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class MultimodalRerankInput(TypedDict):
|
|
content: str
|
|
content_type: str
|
|
|
|
|
|
class RerankDocument(BaseModel):
|
|
"""
|
|
Model class for rerank document.
|
|
"""
|
|
|
|
index: int
|
|
text: str
|
|
score: float
|
|
|
|
|
|
class RerankResult(BaseModel):
|
|
"""
|
|
Model class for rerank result.
|
|
"""
|
|
|
|
model: str
|
|
docs: list[RerankDocument]
|