MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / get_embedding

Function get_embedding

bmtools/tools/meta_analysis/api.py:25–26  ·  view source on GitHub ↗
(text: str, model="text-embedding-ada-002")

Source from the content-addressed store, hash-verified

23
24@retry(wait=wait_random_exponential(min=1, max=20), stop=stop_after_attempt(6))
25def get_embedding(text: str, model="text-embedding-ada-002"):
26 return openai.Embedding.create(input=[text], model=model)["data"][0]["embedding"]
27
28standard = ['type of study', 'purpose', 'challenge', 'dataset', 'task', 'design', 'method', 'backbone', 'baseline', 'model', 'participant', 'patient', 'intervention', 'group', 'duration', 'measurement', 'performance', 'result', 'conclusion', 'safety' ]
29stan_emb = []

Callers 3

api.pyFile · 0.85
denseFunction · 0.85
deep_reduceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected