Separated llms from the main llm.py file and fixed some deprication bugs
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
"import logging\n",
|
||||
"import numpy as np\n",
|
||||
"from lightrag import LightRAG, QueryParam\n",
|
||||
"from lightrag.llm import openai_complete_if_cache, openai_embedding\n",
|
||||
"from lightrag.llm.openai import openai_complete_if_cache, openai_embed\n",
|
||||
"from lightrag.utils import EmbeddingFunc\n",
|
||||
"import nest_asyncio"
|
||||
]
|
||||
@@ -74,7 +74,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"async def embedding_func(texts: list[str]) -> np.ndarray:\n",
|
||||
" return await openai_embedding(\n",
|
||||
" return await openai_embed(\n",
|
||||
" texts,\n",
|
||||
" model=\"ep-20241231173413-pgjmk\",\n",
|
||||
" api_key=API,\n",
|
||||
@@ -138,7 +138,7 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"async def embedding_func(texts: list[str]) -> np.ndarray:\n",
|
||||
" return await openai_embedding(\n",
|
||||
" return await openai_embed(\n",
|
||||
" texts,\n",
|
||||
" model=\"ep-20241231173413-pgjmk\",\n",
|
||||
" api_key=API,\n",
|
||||
|
Reference in New Issue
Block a user