community_8_modules_llm_budget - grisuno/LazyOwn GitHub Wiki
modules: llm_budget
Community 8 | 26 files | cohesion 0.43
Definition
This community groups 26 file(s) rooted at modules with dominant language py (cohesion 0.43). Central symbols: AIModel, ASTToolExtractor, AgentRunner, AgentTool, AiCommandSet, AnthropicModel, BudgetConfig, BudgetExceeded. Core file: core/llm_budget.py (45 symbols). Documented purpose: Artificial Intelligence command set. Covers the do_ask, do_groq, do_ai_playbook and do_ai_toggle commands. ask answers through the configur.
Files
modules (10 files)
tests (6 files)
. (4 files)
contrib/legacy (3 files)
core (2 files)
cli/commands (1 files)
... and 6 more files in this community.
Key Symbols
AiCommandSet (class, cli/commands/ai.py:71) class AiCommandSet(LazyOwnCommandSet) - Pending phase module for the Artificial Intelligence commands.
do_ask (method, cli/commands/ai.py:78) def do_ask(self, line) - Ask the AI a question with current session context pre-loaded.
do_groq (method, cli/commands/ai.py:166) def do_groq(self, line) - Generate a single-line command through the Groq backend.
do_poolcheck (method, cli/commands/ai.py:197) def do_poolcheck(self, line) - Prove the LLM failover pool order with one live prompt.
_serve (function, cli/commands/ai.py:220) def _serve(member_id, backend_name, text)
do_ai_playbook (method, cli/commands/ai.py:254) def do_ai_playbook(self, line) - Generate an offensive playbook from Nmap CSV + KB + Ollama.
do_ai_toggle (method, cli/commands/ai.py:361) def do_ai_toggle(self, _arg) - Toggle the in-process AI assistant on or off.
do_llm_budget (method, cli/commands/ai.py:378) def do_llm_budget(self, line) - Show the LLM daily cost budget, per call token cap, and current spend.
parse_github_url (function, contrib/legacy/lazyaddon_creator.py:49) def parse_github_url(url) - Extrae (owner, repo) de una URL de GitHub.
github_api_get (function, contrib/legacy/lazyaddon_creator.py:58) def github_api_get(owner, repo, endpoint) - GET a la API pública de GitHub (sin auth, rate-limit 60/hr).
fetch_repo_metadata (function, contrib/legacy/lazyaddon_creator.py:68) def fetch_repo_metadata(owner, repo) - Devuelve metadata básica del repo.
fetch_readme (function, contrib/legacy/lazyaddon_creator.py:73) def fetch_readme(owner, repo) - Descarga y decodifica el README.
fetch_root_files (function, contrib/legacy/lazyaddon_creator.py:85) def fetch_root_files(owner, repo) - Lista nombres de archivos en el directorio raíz.
build_llm_prompt (function, contrib/legacy/lazyaddon_creator.py:98) def build_llm_prompt(meta, readme, root_files) - Construye el prompt para el LLM.
extract_json_from_response (function, contrib/legacy/lazyaddon_creator.py:164) def extract_json_from_response(text) - Extrae el primer bloque JSON de una respuesta de LLM.
heuristic_install_command (function, contrib/legacy/lazyaddon_creator.py:192) def heuristic_install_command(root_files, language) - Infiere un install_command básico a partir de los archivos raíz.
heuristic_execute_command (function, contrib/legacy/lazyaddon_creator.py:211) def heuristic_execute_command(name, root_files, language) - Infiere un execute_command básico.
heuristic_params (function, contrib/legacy/lazyaddon_creator.py:245) def heuristic_params(name, readme, root_files) - Infiere parámetros comunes basándose en el nombre y README.
fallback_yaml_data (function, contrib/legacy/lazyaddon_creator.py:276) def fallback_yaml_data(meta, readme, root_files) - Genera datos de addon usando solo heurísticas locales (sin LLM).
build_yaml (function, contrib/legacy/lazyaddon_creator.py:300) def build_yaml(data, repo_url) - Construye la estructura de dict que representa el addon YAML.
save_yaml (function, contrib/legacy/lazyaddon_creator.py:336) def save_yaml(addon, output_dir) - Guarda el dict como archivo YAML en output_dir.
main (function, contrib/legacy/lazyaddon_creator.py:357) def main()
LazyOwnShellBridge (class, contrib/legacy/lazyllmchat.py:22) class LazyOwnShellBridge
__init__ (method, contrib/legacy/lazyllmchat.py:25) def __init__(self, script_path)
_load_shell (method, contrib/legacy/lazyllmchat.py:31) def _load_shell(self)
no_history_init (function, contrib/legacy/lazyllmchat.py:38) def no_history_init(self_)
execute (method, contrib/legacy/lazyllmchat.py:65) def execute(self, command)
target (function, contrib/legacy/lazyllmchat.py:70) def target()
SessionContextProvider (class, contrib/legacy/lazyllmchat.py:104) class SessionContextProvider
__init__ (method, contrib/legacy/lazyllmchat.py:105) def __init__(self, session_path)
Internal vs External Edges
- Internal resolved imports (EXTRACTED): 73
- Cross-boundary resolved imports (EXTRACTED): 70
Connections
- [EXTRACTED] depends_on community 0 <-> 8 (strength 0.9): Extracted import edge crosses communities: cli/banner_config.py imports core/parsers.py.
- [EXTRACTED] depends_on community 8 <-> 3 (strength 0.9): Extracted import edge crosses communities: cli/commands/ai.py imports modules/killchain.py.
Risks
Open Questions
Sources