MCPcopy Create free account
hub / github.com/KnowledgeXLab/LeanRAG / __str__

Method __str__

CommonKG/triple.py:17–18  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

15
16 # 可以使用str(Triple)方法来返回三元组,等同于__str__
17 def __str__(self):
18 return f"<{self.head}>\t<{self.relation}>\t<{self.tail}>"
19 @classmethod
20 def triple_json_format(self, triple, doc_name="", source_id=""):
21 return {"triple": triple, "doc_name": doc_name, "source_id": source_id}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected