cleanup code

This commit is contained in:
Yannick Stephan
2025-02-20 13:18:17 +01:00
parent 72b978d6d5
commit 32e489865c
8 changed files with 89 additions and 108 deletions

View File

@@ -98,7 +98,6 @@ async def init():
# Initialize LightRAG
# We use Oracle DB as the KV/vector/graph storage
# You can add `addon_params={"example_number": 1, "language": "Simplfied Chinese"}` to control the prompt
rag = LightRAG(
enable_llm_cache=False,
working_dir=WORKING_DIR,

View File

@@ -1,9 +1,7 @@
import os
import inspect
from lightrag import LightRAG
from lightrag.llm import openai_complete, openai_embed
from lightrag.utils import EmbeddingFunc
from lightrag.lightrag import always_get_an_event_loop
from lightrag import QueryParam
# WorkingDir
@@ -48,8 +46,3 @@ async def print_stream(stream):
print(chunk, end="", flush=True)
loop = always_get_an_event_loop()
if inspect.isasyncgen(resp):
loop.run_until_complete(print_stream(resp))
else:
print(resp)

View File

@@ -63,7 +63,6 @@ async def main():
# Initialize LightRAG
# We use TiDB DB as the KV/vector
# You can add `addon_params={"example_number": 1, "language": "Simplfied Chinese"}` to control the prompt
rag = LightRAG(
enable_llm_cache=False,
working_dir=WORKING_DIR,