Core Module API¶
μ½μ΄ λͺ¨λ API¶
The salmalm.core package contains the central engine and session management.
salmalm.core ν¨ν€μ§λ μ€μ μμ§κ³Ό μΈμ
κ΄λ¦¬λ₯Ό ν¬ν¨ν©λλ€.
salmalm.core.core¶
Main SalmAlm class β the central orchestrator that initializes all subsystems.
λ©μΈ SalmAlm ν΄λμ€ β λͺ¨λ μλΈμμ€ν μ μ΄κΈ°ννλ μ€μ μ€μΌμ€νΈλ μ΄ν°.
salmalm.core.engine¶
LLM orchestration engine handling message routing, tool calls, and response streaming.
λ©μμ§ λΌμ°ν , λꡬ νΈμΆ, μλ΅ μ€νΈλ¦¬λ°μ μ²λ¦¬νλ LLM μ€μΌμ€νΈλ μ΄μ μμ§.
salmalm.core.llm¶
LLM provider abstraction β supports Anthropic, OpenAI, Google, xAI, OpenRouter, Ollama.
LLM νλ‘λ°μ΄λ μΆμν β Anthropic, OpenAI, Google, xAI, OpenRouter, Ollama μ§μ.
salmalm.core.llm_loop¶
Conversation loop handler β manages multi-turn interactions with tool use.
λν 루ν νΈλ€λ¬ β λꡬ μ¬μ©μ ν¬ν¨ν λ©ν°ν΄ μΈν°λμ κ΄λ¦¬.
salmalm.core.llm_task¶
Async LLM task runner for background processing.
λ°±κ·ΈλΌμ΄λ μ²λ¦¬λ₯Ό μν λΉλκΈ° LLM νμ€ν¬ λ¬λ.
salmalm.core.prompt¶
System prompt builder β constructs context-aware prompts with tool descriptions.
μμ€ν ν둬ννΈ λΉλ β λꡬ μ€λͺ μ ν¬ν¨ν 컨ν μ€νΈ μΈμ ν둬ννΈ μμ±.
salmalm.core.session_manager¶
Session lifecycle management β create, switch, delete, branch, rollback.
μΈμ λΌμ΄νμ¬μ΄ν΄ κ΄λ¦¬ β μμ±, μ ν, μμ , λΆκΈ°, λ‘€λ°±.
salmalm.core.memory¶
Memory management for persistent storage across sessions.
μΈμ κ° μμ μ μ₯μ μν λ©λͺ¨λ¦¬ κ΄λ¦¬.
salmalm.core.health¶
Health check endpoints for monitoring and SLA.
λͺ¨λν°λ§ λ° SLAλ₯Ό μν μν μ κ² μλν¬μΈνΈ.
salmalm.core.shutdown¶
Graceful shutdown handler β saves state, closes connections, flushes logs.
μμ ν μ’ λ£ νΈλ€λ¬ β μν μ μ₯, μ°κ²° μ’ λ£, λ‘κ·Έ νλ¬μ.
salmalm.core.export¶
Session export in JSON and Markdown formats.
JSON λ° Markdown νμμ μΈμ λ΄λ³΄λ΄κΈ°.
Auto-generated details / μλ μμ± μμΈ
Run python docs/gen_api.py to regenerate detailed class/function docs from docstrings.
python docs/gen_api.pyλ₯Ό μ€ννλ©΄ docstringμμ μμΈν ν΄λμ€/ν¨μ λ¬Έμλ₯Ό μ¬μμ±ν©λλ€.