feat: AI Read File Tool, Configurable system prompts and loading lots of llms

This commit is contained in:
2026-03-04 15:48:25 +00:00
parent bbaebf1f70
commit 0d0e747682
10 changed files with 184 additions and 47 deletions
+5 -10
View File
@@ -1,21 +1,16 @@
import dspy
from typing import List
from config_loader import load_config
CFG = load_config()
INGESTION_CONFIG = CFG["ingestion_agent"]
class IngestionSignature(dspy.Signature):
"""You are an expert Dungeon Master's assistant.
Analyze the provided notes and extract a concise synopsis and relevant metadata.
synopsis = A one-sentence summary of the document.
tags = Relevant tags (NPCs, Locations, Items, Plot Points).
entities = Key names of people, places, or factions.
"note -> synopsis:str, tags: list[str], entities: list[str]"
/no_think
"""
f"{INGESTION_CONFIG["ingestion_signature"]}"
note: str = dspy.InputField(desc="The DM notes or session recap content.")
answer: dict[str,str|List] = dspy.OutputField(desc="the metadata dictionary with the keys; synopsis, tags, entities")
class IngestionAgent(dspy.Module):
def __init__(self):
self.ingest = dspy.Predict(IngestionSignature)