MCPcopy Create free account
hub / github.com/alibaba/zvec / embed

Method embed

python/zvec/extension/embedding_function.py:70–84  ·  view source on GitHub ↗

Generate a dense embedding vector for the input data. Args: input (MD): Multimodal input data to embed. Can be: - TEXT (str): Text string - IMAGE (str | bytes | np.ndarray): Image file path, raw bytes, or array - AUDIO (str | bytes

(self, input: MD)

Source from the content-addressed store, hash-verified

68
69 @abstractmethod
70 def embed(self, input: MD) -> DenseVectorType:
71 """Generate a dense embedding vector for the input data.
72
73 Args:
74 input (MD): Multimodal input data to embed. Can be:
75 - TEXT (str): Text string
76 - IMAGE (str | bytes | np.ndarray): Image file path, raw bytes, or array
77 - AUDIO (str | bytes | np.ndarray): Audio file path, raw bytes, or array
78
79 Returns:
80 DenseVectorType: A dense vector representing the embedding.
81 Can be list[float], list[int], or np.ndarray.
82 Length should match the implementation's dimension.
83 """
84 ...
85
86
87@runtime_checkable

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected