chore: added pre-commit-hooks and ruff formatting for commit-hooks
This commit is contained in:
@@ -20,13 +20,11 @@ rag = LightRAG(
|
||||
llm_model_func=bedrock_complete,
|
||||
llm_model_name="Anthropic Claude 3 Haiku // Amazon Bedrock",
|
||||
embedding_func=EmbeddingFunc(
|
||||
embedding_dim=1024,
|
||||
max_token_size=8192,
|
||||
func=bedrock_embedding
|
||||
)
|
||||
embedding_dim=1024, max_token_size=8192, func=bedrock_embedding
|
||||
),
|
||||
)
|
||||
|
||||
with open("./book.txt", 'r', encoding='utf-8') as f:
|
||||
with open("./book.txt", "r", encoding="utf-8") as f:
|
||||
rag.insert(f.read())
|
||||
|
||||
for mode in ["naive", "local", "global", "hybrid"]:
|
||||
@@ -34,8 +32,5 @@ for mode in ["naive", "local", "global", "hybrid"]:
|
||||
print(f"| {mode.capitalize()} |")
|
||||
print("+-" + "-" * len(mode) + "-+\n")
|
||||
print(
|
||||
rag.query(
|
||||
"What are the top themes in this story?",
|
||||
param=QueryParam(mode=mode)
|
||||
)
|
||||
rag.query("What are the top themes in this story?", param=QueryParam(mode=mode))
|
||||
)
|
||||
|
Reference in New Issue
Block a user