Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions python/python/embed_anything/_embed_anything.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ class ColpaliModel:
revision: The revision of the model.
"""

@staticmethod
def from_pretrained(model_id: str, revision: str | None = None) -> ColpaliModel:
"""
Loads a pre-trained Colpali model from the Hugging Face model hub.
Expand All @@ -347,6 +348,7 @@ class ColpaliModel:
A ColpaliModel object.
"""

@staticmethod
def from_pretrained_onnx(
model_id: str, revision: str | None = None
) -> ColpaliModel:
Expand Down Expand Up @@ -400,8 +402,8 @@ class ColbertModel:
Initializes the ColbertModel object.
"""

@staticmethod
def from_pretrained_onnx(
self,
hf_model_id: str | None = None,
revision: str | None = None,
path_in_repo: str | None = None,
Expand Down Expand Up @@ -437,6 +439,7 @@ class Reranker:
Initializes the Reranker object.
"""

@staticmethod
def from_pretrained(
model_id: str, revision: str | None = None, dtype: Dtype | None = None, path_in_repo: str | None = None
) -> Reranker:
Expand Down Expand Up @@ -590,6 +593,7 @@ class EmbeddingModel:
Represents an embedding model.
"""

@staticmethod
def from_pretrained_hf(
model_id: str,
revision: str | None = None,
Expand Down Expand Up @@ -617,6 +621,7 @@ class EmbeddingModel:

"""

@staticmethod
def from_pretrained_cloud(
model: WhichModel, model_id: str, api_key: str | None = None
) -> EmbeddingModel:
Expand Down Expand Up @@ -657,6 +662,7 @@ class EmbeddingModel:
```
"""

@staticmethod
def from_pretrained_onnx(
model: WhichModel,
model_name: Optional[ONNXModel] | None = None,
Expand Down Expand Up @@ -830,23 +836,6 @@ class EmbeddingModel:
A list of EmbedData objects.
"""

def embed_webpage(
self,
url: str,
config: TextEmbedConfig | None = None,
adapter: Adapter | None = None,
) -> list[EmbedData]:
"""
Embeds the given webpage and returns a list of EmbedData objects.

Args:
url: The URL of the webpage to embed.
config: The configuration for the embedding.
adapter: The adapter for the embedding.

Returns:
A list of EmbedData objects.
"""

class AudioDecoderModel:
"""
Expand Down Expand Up @@ -875,6 +864,7 @@ class AudioDecoderModel:
model_type: str
quantized: bool

@staticmethod
def from_pretrained_hf(
model_id: str | None = None,
revision: str | None = None,
Expand Down Expand Up @@ -1005,5 +995,3 @@ class ONNXModel(Enum):
SPLADEPPENV1 = "SPLADEPPENV1"

SPLADEPPENV2 = "SPLADEPPENV2"

ModernBERTBase = "ModernBERTBase"
Loading