MCPcopy Create free account
hub / github.com/NanGePlus/LightRAGTest / embedding_func

Function embedding_func

LightRAG/nangeAGICode/test.py:39–45  ·  view source on GitHub ↗
(texts: list[str])

Source from the content-addressed store, hash-verified

37
38# 自定义Embedding模型 配置类OpenAI
39async def embedding_func(texts: list[str]) -> np.ndarray:
40 return await openai_embedding(
41 texts,
42 model=OPENAI_EMBEDDING_MODEL,
43 api_key=OPENAI_CHAT_API_KEY,
44 base_url=OPENAI_API_BASE,
45 )
46
47
48# 定义rag

Callers

nothing calls this directly

Calls 1

openai_embeddingFunction · 0.90

Tested by

no test coverage detected