21 lines
565 B
Python
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)
|