Spaces:
Running
Running
Update kig_core/graph_operations.py
Browse files
kig_core/graph_operations.py
CHANGED
@@ -28,7 +28,6 @@ def extract_cypher(text: str) -> str:
|
|
28 |
|
29 |
def format_doc_for_llm(doc: Dict[str, Any]) -> str:
|
30 |
"""Formats a document dictionary into a string for LLM context."""
|
31 |
-
print(f"Format doc for llm, DOC : {doc}")
|
32 |
return "\n".join(f"**{key}**: {value}" for key, value in doc.items() if value)
|
33 |
|
34 |
def format_summary_for_llm(doc: Dict[str, Any]) -> str:
|
@@ -40,6 +39,7 @@ def format_summary_for_llm(doc: Dict[str, Any]) -> str:
|
|
40 |
if key == "n.summary" and value != None:
|
41 |
data += f"Document summarized : {value}"
|
42 |
return data
|
|
|
43 |
# --- Cypher Generation ---
|
44 |
def generate_cypher_auto(question: str) -> str:
|
45 |
"""Generates Cypher using the 'auto' method."""
|
|
|
28 |
|
29 |
def format_doc_for_llm(doc: Dict[str, Any]) -> str:
|
30 |
"""Formats a document dictionary into a string for LLM context."""
|
|
|
31 |
return "\n".join(f"**{key}**: {value}" for key, value in doc.items() if value)
|
32 |
|
33 |
def format_summary_for_llm(doc: Dict[str, Any]) -> str:
|
|
|
39 |
if key == "n.summary" and value != None:
|
40 |
data += f"Document summarized : {value}"
|
41 |
return data
|
42 |
+
|
43 |
# --- Cypher Generation ---
|
44 |
def generate_cypher_auto(question: str) -> str:
|
45 |
"""Generates Cypher using the 'auto' method."""
|