MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / _encode_legacy

Function _encode_legacy

tools/kb_semantic.py:96–100  ·  view source on GitHub ↗
(texts: list)

Source from the content-addressed store, hash-verified

94
95
96def _encode_legacy(texts: list) -> "np.ndarray":
97 model = _get_legacy_model()
98 if HAS_FASTEMBED:
99 return np.array(list(model.embed(texts)), dtype="float32")
100 return model.encode(texts, show_progress_bar=False, convert_to_numpy=True)
101
102
103# ── Llama-server embedding backend ─────────────────────────────────────────────

Callers 2

build_semantic_indexFunction · 0.85
semantic_searchFunction · 0.85

Calls 2

_get_legacy_modelFunction · 0.85
embedMethod · 0.45

Tested by

no test coverage detected