Spaces:
Running
Running
| """character — 카르밀라 응답 (LlmAgent, CHARACTER_MODEL). | |
| instruction은 engine/instructions/character_carmilla.md. | |
| {carmilla_sheet}/{pocket_brief}/{trust_texture}/{guard_directive}는 | |
| loader/guard가 매 턴 session.state에 채운다 (치환값은 중괄호 위생 처리됨). | |
| """ | |
| from __future__ import annotations | |
| from pathlib import Path | |
| from google.adk.agents import LlmAgent | |
| from engine.model import CHARACTER_MODEL | |
| _INSTRUCTION = (Path(__file__).resolve().parents[2] / "instructions" / "character_carmilla.md") | |
| def create_character(model=None) -> LlmAgent: | |
| return LlmAgent( | |
| name="carmilla", | |
| model=model or CHARACTER_MODEL, | |
| instruction=_INSTRUCTION.read_text(encoding="utf-8"), | |
| output_key="last_carmilla_reply", | |
| ) | |