mgbam commited on
Commit
fa18202
Β·
verified Β·
1 Parent(s): 6dfdfa2

Update mcp/embeddings.py

Browse files
Files changed (1) hide show
  1. mcp/embeddings.py +1 -21
mcp/embeddings.py CHANGED
@@ -1,4 +1,4 @@
1
- # ── mcp/embeddings.py ───────────────────────────────────────────────────
2
  import os, asyncio
3
  from huggingface_hub import InferenceClient
4
  from sklearn.cluster import KMeans
@@ -24,23 +24,3 @@ async def cluster_embeddings(embs: list[list[float]], n_clusters: int = 5) -> li
24
  """
25
  kmeans = KMeans(n_clusters=n_clusters, random_state=0)
26
  return kmeans.fit_predict(embs).tolist()
27
-
28
-
29
- # ── mcp/protocols.py ───────────────────────────────────────────────────
30
- import asyncio
31
- from mcp.openai_utils import ai_qa
32
- from mcp.gemini import gemini_qa
33
-
34
- async def draft_protocol(question: str, context: str, llm: str = "openai") -> str:
35
- """
36
- Draft a detailed experimental protocol for a given hypothesis/question.
37
- """
38
- if llm.lower() == "gemini":
39
- qa_fn = gemini_qa
40
- else:
41
- qa_fn = ai_qa
42
- prompt = (
43
- "You are a senior researcher. Draft a step-by-step experimental protocol to test: "
44
- f"{question}\nContext:\n{context}\nInclude materials, methods, controls, expected outcomes."
45
- )
46
- return await qa_fn(prompt)
 
1
+ ── mcp/embeddings.py ───────────────────────────────────────────────────
2
  import os, asyncio
3
  from huggingface_hub import InferenceClient
4
  from sklearn.cluster import KMeans
 
24
  """
25
  kmeans = KMeans(n_clusters=n_clusters, random_state=0)
26
  return kmeans.fit_predict(embs).tolist()