feat: ✨ AI Read File Tool, Configurable system prompts and loading lots of llms
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user