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

Function embedding_func

LightRAG/nangeAGICode1201/insertTest.py:41–47  ·  view source on GitHub ↗
(texts: list[str])

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

openai_embeddingFunction · 0.90

Tested by

no test coverage detected