MCPcopy Create free account
hub / github.com/NanGePlus/LightRAGTest / write_json

Function write_json

LightRAG/lightrag/utils.py:132–134  ·  view source on GitHub ↗
(json_obj, file_name)

Source from the content-addressed store, hash-verified

130
131
132def write_json(json_obj, file_name):
133 with open(file_name, "w", encoding="utf-8") as f:
134 json.dump(json_obj, f, indent=2, ensure_ascii=False)
135
136
137def encode_string_by_tiktoken(content: str, model_name: str = "gpt-4o"):

Callers 1

index_done_callbackMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected