reorg. destillation of oghma kownledge packs out of iris-dev

This commit is contained in:
2026-04-16 04:20:18 +02:00
parent e5e426e65c
commit ccb66d5a7d
33 changed files with 56197 additions and 6 deletions

View File

@@ -113,7 +113,31 @@ Note: Reference this knowledge naturally when relevant to the conversation. Do n
position=self.position,
)
else:
logger.warning("Could not find injection point", position=self.position)
seen_headers: list[str] = []
system_msg_count = 0
system_content_chars = 0
for msg in modified_messages:
if msg.get("role") == "system":
system_msg_count += 1
content = msg.get("content", "")
system_content_chars += len(content)
for line in content.splitlines():
stripped = line.strip()
if stripped.startswith("## "):
seen_headers.append(stripped)
if len(seen_headers) >= 20:
break
if len(seen_headers) >= 20:
break
logger.warning(
"Could not find injection point",
position=self.position,
npc_name=npc_profile.name,
system_messages=system_msg_count,
system_content_chars=system_content_chars,
seen_headers=seen_headers,
)
result = InjectionResult(
npc_profile=npc_profile,