Files
dungeon_masters_vault/src/experts/ingestion_agent.py
T
2026-03-05 20:07:35 +00:00

21 lines
565 B
Python

import dspy
from typing import List
from config_loader import load_config
CFG = load_config()
INGESTION_CONFIG = CFG["ingestion_agent"]
class IngestionSignature(dspy.Signature):
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)