MCPcopy Create free account
hub / github.com/agent0ai/agent-zero / embed_documents

Method embed_documents

models.py:863–868  ·  view source on GitHub ↗
(self, texts: List[str])

Source from the content-addressed store, hash-verified

861 self.a0_model_conf = model_config
862
863 def embed_documents(self, texts: List[str]) -> List[List[float]]:
864 # Apply rate limiting if configured
865 apply_rate_limiter_sync(self.a0_model_conf, " ".join(texts))
866
867 embeddings = self.model.encode(texts, convert_to_tensor=False) # type: ignore
868 return embeddings.tolist() if hasattr(embeddings, "tolist") else embeddings # type: ignore
869
870 def embed_query(self, text: str) -> List[float]:
871 # Apply rate limiting if configured

Callers

nothing calls this directly

Calls 4

apply_rate_limiter_syncFunction · 0.85
tolistMethod · 0.80
joinMethod · 0.45
encodeMethod · 0.45

Tested by

no test coverage detected