MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _node_embedding_text

Function _node_embedding_text

skills/wiki-store/scripts/wiki_db.py:123–132  ·  view source on GitHub ↗
(node: Dict[str, Any])

Source from the content-addressed store, hash-verified

121 return np.array([], dtype=np.float32)
122 if isinstance(blob, memoryview):
123 blob = blob.tobytes()
124 array = np.frombuffer(blob, dtype=np.float32)
125 norm = float(np.linalg.norm(array))
126 if norm > 0:
127 array = array / norm
128 return array
129
130
131def _node_embedding_text(node: Dict[str, Any]) -> str:
132 return "\n".join(
133 part
134 for part in (
135 str(node.get("title") or ""),

Callers 1

embed_nodes_for_userFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected