fix: export build_memory_section function for fallback prompt
This commit is contained in:
@@ -202,8 +202,8 @@ class RouterApp:
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
# Fallback: Memory only prompt
|
# Fallback: Memory only prompt
|
||||||
from utils.rag_prompt_builder import _build_memory_section
|
from utils.rag_prompt_builder import build_memory_section
|
||||||
memory_section = _build_memory_section(memory_ctx)
|
memory_section = build_memory_section(memory_ctx)
|
||||||
|
|
||||||
final_prompt = (
|
final_prompt = (
|
||||||
"Ти — експерт-консультант з токеноміки та архітектури DAO в екосистемі DAARION.city.\n"
|
"Ти — експерт-консультант з токеноміки та архітектури DAO в екосистемі DAARION.city.\n"
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ def build_rag_prompt_with_citations(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Build Memory section
|
# Build Memory section
|
||||||
memory_section = _build_memory_section(memory_context)
|
memory_section = build_memory_section(memory_context)
|
||||||
|
|
||||||
# Build Documents section with citations
|
# Build Documents section with citations
|
||||||
documents_section = _build_documents_section(rag_citations, rag_documents)
|
documents_section = _build_documents_section(rag_citations, rag_documents)
|
||||||
@@ -65,7 +65,7 @@ def build_rag_prompt_with_citations(
|
|||||||
return "\n".join(prompt_parts)
|
return "\n".join(prompt_parts)
|
||||||
|
|
||||||
|
|
||||||
def _build_memory_section(memory_context: Dict[str, Any]) -> str:
|
def build_memory_section(memory_context: Dict[str, Any]) -> str:
|
||||||
"""Build memory context section"""
|
"""Build memory context section"""
|
||||||
parts = []
|
parts = []
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user