MCPcopy Create free account
hub / github.com/nlweb-ai/NLWeb / get_embedding_async

Function get_embedding_async

AskAgent/python/scraping/embedding.py:17–24  ·  view source on GitHub ↗

Get embedding using the common embedding utilities

(text, model="text-embedding-3-small")

Source from the content-addressed store, hash-verified

15EMBEDDING_MODEL_LARGE = "text-embedding-3-large"
16
17async def get_embedding_async(text, model="text-embedding-3-small"):
18 """Get embedding using the common embedding utilities"""
19 try:
20 # Use the embedding wrapper from the repository
21 return await get_embedding(text, model=model)
22 except Exception as e:
23 logger.error(f"Error getting embedding: {e}")
24 raise
25
26
27def read_file_content(file_path):

Callers

nothing calls this directly

Calls 2

get_embeddingFunction · 0.90
errorMethod · 0.45

Tested by

no test coverage detected