Update __version__

This commit is contained in:
LarFii
2024-12-13 20:15:49 +08:00
parent 9cac3b0ed7
commit b7a2d336e6
5 changed files with 29 additions and 39 deletions

View File

@@ -1,9 +1,6 @@
import asyncio
import os
import inspect
import logging
from dotenv import load_dotenv
from lightrag import LightRAG, QueryParam
from lightrag.llm import zhipu_complete, zhipu_embedding
@@ -21,7 +18,6 @@ if api_key is None:
raise Exception("Please set ZHIPU_API_KEY in your environment")
rag = LightRAG(
working_dir=WORKING_DIR,
llm_model_func=zhipu_complete,
@@ -31,9 +27,7 @@ rag = LightRAG(
embedding_func=EmbeddingFunc(
embedding_dim=2048, # Zhipu embedding-3 dimension
max_token_size=8192,
func=lambda texts: zhipu_embedding(
texts
),
func=lambda texts: zhipu_embedding(texts),
),
)
@@ -58,4 +52,4 @@ print(
# Perform hybrid search
print(
rag.query("What are the top themes in this story?", param=QueryParam(mode="hybrid"))
)
)