Update node.py

This commit is contained in:
Wenaka
2025-01-31 12:28:34 +08:00
committed by GitHub
parent 7229358b13
commit e5b10b0fd9
+5 -2
View File
@@ -64,8 +64,11 @@ class LLMProcessingNode:
CATEGORY = "LLM Tag Classifier"
def process(self, text, api_key):
# 从文件中加载历史记录
prompt_history = load_prompt_history("custom_nodes\ComfyUI-TagClassifier\prompt.json")
# 尝试从"custom_nodes\ComfyUI-TagClassifier\prompt.json"或者直接prompt.json中加载历史记录
try:
prompt_history = load_prompt_history("prompt.json")
except FileNotFoundError:
prompt_history = load_prompt_history("custom_nodes\ComfyUI-TagClassifier\prompt.json")
# 调用DeepSeek API
try: