mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-07-05 08:51:17 -03:00
feat(agent): add LLM-powered metadata enrichment system with AgentCLI and PostProcessor
Introduce an agent skill framework for LLM-driven metadata enrichment: - AgentCLI (py/agent_cli/): in-process wrappers around internal services using standard relative imports, eliminating the need for sys.path hacks - LLMService: centralized BYOK (bring-your-own-key) LLM client supporting OpenAI, Ollama, and custom OpenAI-compatible endpoints - PostProcessor: deterministic engine that applies LLM output via AgentCLI (replaces old handler.py + _BASE_MODEL_ALIASES approach) - SkillRegistry: filesystem-based skill discovery (skill.yaml + prompt.md) - AgentService: orchestrates skill execution with WebSocket progress - Frontend AgentManager: WebSocket listeners, skill execution, config UI - Context menu entries (single + bulk) for "Enrich Metadata (Agent)" - Settings UI for AI Provider configuration (BYOK) - Full i18n support across 9 locales Bug fixes found during review: - aiohttp.web.json_response: status_code= -> status= - settings_modal cancelEditApiKey: wrong argument position - AgentManager.isLlmConfigured: allow Ollama without API key - PostProcessor._merge_tags: lowercase all tags to match TagUpdateService
This commit is contained in:
47
py/services/agent/skills/enrich_hf_metadata/skill.yaml
Normal file
47
py/services/agent/skills/enrich_hf_metadata/skill.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
name: enrich_hf_metadata
|
||||
title: "Enrich Metadata from HuggingFace"
|
||||
description: >
|
||||
Parse the HuggingFace model card via LLM to extract description, trigger
|
||||
words, base model, tags, and preview image URL. Updates .metadata.json
|
||||
and downloads the preview thumbnail.
|
||||
llm_required: true
|
||||
model_type_filter: ["lora", "checkpoint", "embedding"]
|
||||
input_schema:
|
||||
type: object
|
||||
properties:
|
||||
model_paths:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
required:
|
||||
- model_paths
|
||||
output_schema:
|
||||
type: object
|
||||
properties:
|
||||
model_path:
|
||||
type: string
|
||||
base_model:
|
||||
type: string
|
||||
trigger_words:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
tags:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
preview_url:
|
||||
type: string
|
||||
confidence:
|
||||
type: string
|
||||
enum: ["high", "medium", "low"]
|
||||
required:
|
||||
- model_path
|
||||
- confidence
|
||||
permissions:
|
||||
write_metadata: true
|
||||
write_previews: true
|
||||
network_domains:
|
||||
- "huggingface.co"
|
||||
Reference in New Issue
Block a user