intital file restructure

This commit is contained in:
serversdwn
2025-11-25 20:50:05 -05:00
parent b5fe47074a
commit 5492d9c0c5
15 changed files with 1 additions and 105 deletions

View File

@@ -0,0 +1,33 @@
# reasoning.py
from llm_router import call_llm
async def reason_check(user_prompt: str,
identity_block: dict | None,
rag_block: dict | None,
reflection_notes: list[str]) -> str:
"""
Generate a first draft using identity, RAG, and reflection notes.
No critique loop yet.
"""
# Build internal notes section
notes_section = ""
if reflection_notes:
notes_section = "Reflection Notes (internal, do NOT show to user):\n"
for n in reflection_notes:
notes_section += f"- {n}\n"
notes_section += "\n"
identity_txt = f"Identity: {identity_block}\n\n" if identity_block else ""
rag_txt = f"Relevant info: {rag_block}\n\n" if rag_block else ""
prompt = (
f"{notes_section}"
f"{identity_txt}"
f"{rag_txt}"
f"User said:\n{user_prompt}\n\n"
"Draft the best possible internal answer."
)
draft = await call_llm(prompt)
return draft