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

Function cosine_similarity

skills/embedding/scripts/embed.py:577–578  ·  view source on GitHub ↗
(vector1: List[float], vector2: List[float])

Source from the content-addressed store, hash-verified

575 self._save_cached(normalized_texts[index], embedding)
576 except Exception as exc:
577 print(f"Batch embedding error ({self.provider}:{self.model}): {exc}")
578 if _looks_like_auth_error(exc):
579 print(
580 "Embedding auth failed. Check OPENAI_API_KEY / DASHSCOPE_API_KEY "
581 "and verify the key is valid for the configured DashScope endpoint."

Callers 1

compute_relevance_signalFunction · 0.50

Calls 2

get_embedding_serviceFunction · 0.85
cosine_similarityMethod · 0.45

Tested by

no test coverage detected