prepare rebase
This commit is contained in:
@@ -628,11 +628,7 @@ class LightRAG:
|
|||||||
inserting_chunks: dict[str, Any] = {}
|
inserting_chunks: dict[str, Any] = {}
|
||||||
for index, chunk_text in enumerate(text_chunks):
|
for index, chunk_text in enumerate(text_chunks):
|
||||||
chunk_key = compute_mdhash_id(chunk_text, prefix="chunk-")
|
chunk_key = compute_mdhash_id(chunk_text, prefix="chunk-")
|
||||||
tokens = len(
|
tokens = len(self.tokenizer.encode(chunk_text))
|
||||||
encode_string_by_tiktoken(
|
|
||||||
chunk_text, model_name=self.tiktoken_model_name
|
|
||||||
)
|
|
||||||
)
|
|
||||||
inserting_chunks[chunk_key] = {
|
inserting_chunks[chunk_key] = {
|
||||||
"content": chunk_text,
|
"content": chunk_text,
|
||||||
"full_doc_id": doc_key,
|
"full_doc_id": doc_key,
|
||||||
|
Reference in New Issue
Block a user