add LightRAG init parameters in readme

also fix some error
This commit is contained in:
jin
2024-11-26 10:19:28 +08:00
parent 0ffd44b79c
commit 5bde05ed53
5 changed files with 53 additions and 23 deletions

View File

@@ -81,7 +81,7 @@ async def get_embedding_dim():
async def init():
# Detect embedding dimension
embedding_dimension = 1024 # await get_embedding_dim()
embedding_dimension = await get_embedding_dim()
print(f"Detected embedding dimension: {embedding_dimension}")
# Create Oracle DB connection
# The `config` parameter is the connection configuration of Oracle DB
@@ -105,6 +105,7 @@ async def init():
await oracle_db.check_tables()
# 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

@@ -84,6 +84,7 @@ async def main():
# 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,
@@ -96,8 +97,7 @@ async def main():
),
graph_storage="OracleGraphStorage",
kv_storage="OracleKVStorage",
vector_storage="OracleVectorDBStorage",
addon_params={"example_number": 1, "language": "Simplfied Chinese"},
vector_storage="OracleVectorDBStorage"
)
# Setthe KV/vector/graph storage's `db` property, so all operation will use same connection pool