fix imports
This commit is contained in:
@@ -453,7 +453,7 @@ source /home/netman/minirag-xyj/venv/bin/activate
|
||||
lightrag-server
|
||||
```
|
||||
|
||||
Install lightrag.service in Linux. Sample commands in Ubuntu server look like:
|
||||
Install minirag.service in Linux. Sample commands in Ubuntu server look like:
|
||||
#Note: lightrag-server.service is the service file name, you can change it to minirag-server.service as needed.
|
||||
```shell
|
||||
sudo cp lightrag-server.service /etc/systemd/system/
|
||||
|
||||
@@ -44,7 +44,7 @@ Features:
|
||||
- Remove nodes and edges from the graph
|
||||
|
||||
Usage:
|
||||
from lightrag.storage.networkx_storage import NetworkXStorage
|
||||
from minirag.storage.networkx_storage import NetworkXStorage
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Features:
|
||||
- Remove nodes and edges from the graph
|
||||
|
||||
Usage:
|
||||
from lightrag.storage.networkx_storage import NetworkXStorage
|
||||
from minirag.storage.networkx_storage import NetworkXStorage
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import os
|
||||
from tqdm.asyncio import tqdm as tqdm_async
|
||||
from dataclasses import dataclass
|
||||
import numpy as np
|
||||
from lightrag.utils import logger
|
||||
from minirag.utils import logger
|
||||
from ..base import BaseVectorStorage
|
||||
|
||||
import pipmaster as pm
|
||||
|
||||
@@ -10,10 +10,10 @@ if not pm.is_installed("pymongo"):
|
||||
from pymongo import MongoClient
|
||||
from motor.motor_asyncio import AsyncIOMotorClient
|
||||
from typing import Union, List, Tuple
|
||||
from lightrag.utils import logger
|
||||
from minirag.utils import logger
|
||||
|
||||
from lightrag.base import BaseKVStorage
|
||||
from lightrag.base import BaseGraphStorage
|
||||
from minirag.base import BaseKVStorage
|
||||
from minirag.base import BaseGraphStorage
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -437,4 +437,4 @@ class MongoGraphStorage(BaseGraphStorage):
|
||||
"""
|
||||
Placeholder for demonstration, raises NotImplementedError.
|
||||
"""
|
||||
raise NotImplementedError("Node embedding is not used in lightrag.")
|
||||
raise NotImplementedError("Node embedding is not used in minirag.")
|
||||
|
||||
@@ -44,7 +44,7 @@ Features:
|
||||
- Remove nodes and edges from the graph
|
||||
|
||||
Usage:
|
||||
from lightrag.storage.networkx_storage import NetworkXStorage
|
||||
from minirag.storage.networkx_storage import NetworkXStorage
|
||||
|
||||
"""
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ if not pm.is_installed("asyncpg"):
|
||||
import asyncpg
|
||||
import psycopg
|
||||
from psycopg_pool import AsyncConnectionPool
|
||||
from lightrag.kg.postgres_impl import PostgreSQLDB, PGGraphStorage
|
||||
from minirag.kg.postgres_impl import PostgreSQLDB, PGGraphStorage
|
||||
|
||||
DB = "rag"
|
||||
USER = "rag"
|
||||
|
||||
@@ -87,7 +87,7 @@ if __name__ == "__main__":
|
||||
import asyncio
|
||||
|
||||
async def main():
|
||||
from lightrag.llm.openai import gpt_4o_mini_complete
|
||||
from minirag.llm.openai import gpt_4o_mini_complete
|
||||
|
||||
result = await gpt_4o_mini_complete("How are you?")
|
||||
print(result)
|
||||
|
||||
@@ -63,7 +63,7 @@ from tenacity import (
|
||||
retry_if_exception_type,
|
||||
)
|
||||
|
||||
from lightrag.utils import (
|
||||
from minirag.utils import (
|
||||
wrap_embedding_func_with_attrs,
|
||||
locate_json_string_body_from_string,
|
||||
safe_unicode_decode,
|
||||
|
||||
@@ -60,7 +60,7 @@ from tenacity import (
|
||||
retry_if_exception_type,
|
||||
)
|
||||
|
||||
from lightrag.utils import (
|
||||
from minirag.utils import (
|
||||
locate_json_string_body_from_string,
|
||||
)
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ if not pm.is_installed("lmdeploy"):
|
||||
if not pm.is_installed("tenacity"):
|
||||
pm.install("tenacity")
|
||||
|
||||
from lightrag.exceptions import (
|
||||
from minirag.exceptions import (
|
||||
APIConnectionError,
|
||||
RateLimitError,
|
||||
APITimeoutError,
|
||||
|
||||
@@ -82,7 +82,7 @@ from tenacity import (
|
||||
retry_if_exception_type,
|
||||
)
|
||||
|
||||
from lightrag.exceptions import (
|
||||
from minirag.exceptions import (
|
||||
APIConnectionError,
|
||||
RateLimitError,
|
||||
APITimeoutError,
|
||||
|
||||
@@ -67,7 +67,7 @@ from tenacity import (
|
||||
retry_if_exception_type,
|
||||
)
|
||||
|
||||
from lightrag.utils import (
|
||||
from minirag.utils import (
|
||||
wrap_embedding_func_with_attrs,
|
||||
)
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ from tenacity import (
|
||||
wait_exponential,
|
||||
retry_if_exception_type,
|
||||
)
|
||||
from lightrag.exceptions import (
|
||||
from minirag.exceptions import (
|
||||
APIConnectionError,
|
||||
RateLimitError,
|
||||
APITimeoutError,
|
||||
|
||||
@@ -66,7 +66,7 @@ from tenacity import (
|
||||
wait_exponential,
|
||||
retry_if_exception_type,
|
||||
)
|
||||
from lightrag.utils import (
|
||||
from minirag.utils import (
|
||||
wrap_embedding_func_with_attrs,
|
||||
locate_json_string_body_from_string,
|
||||
safe_unicode_decode,
|
||||
|
||||
@@ -66,12 +66,12 @@ from tenacity import (
|
||||
retry_if_exception_type,
|
||||
)
|
||||
|
||||
from lightrag.utils import (
|
||||
from minirag.utils import (
|
||||
wrap_embedding_func_with_attrs,
|
||||
logger,
|
||||
)
|
||||
|
||||
from lightrag.types import GPTKeywordExtractionFormat
|
||||
from minirag.types import GPTKeywordExtractionFormat
|
||||
|
||||
import numpy as np
|
||||
from typing import Union, List, Optional, Dict
|
||||
|
||||
Reference in New Issue
Block a user