mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
11 lines
259 B
Python
11 lines
259 B
Python
import re
|
|
|
|
from typing import List
|
|
|
|
|
|
def extract_ti_triggers_from_prompt(prompt: str) -> List[str]:
|
|
ti_triggers: List[str] = []
|
|
for trigger in re.findall(r"<[a-zA-Z0-9., _-]+>", prompt):
|
|
ti_triggers.append(str(trigger))
|
|
return ti_triggers
|