Add OpenAIAdapter for the OpenAI chat completions API (apikey-chatgpt.txt or OPENAI_API_KEY). Set default model to arcee-ai/trinity-large-preview:free for the infospace pipeline and increase max_tokens from 4096 to 8192. Reprocess chapter 05 with Trinity Large (was Gemini: 1 truncated entity, now 19 complete entities). Process chapters 06 (Aurora Alpha, 10 entities) and 07 (Trinity Large, 15 entities including regenerated violent-policy.md). Canonical set now at 85 unique entities. Add entity archive policy: entities are never silently deleted. Retired entities move to output/entities/archive/ with a dated reason header. New CLI option: --archive-entity <slug> --reason "...". The --list output shows the archive count alongside the canonical set. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
"""
|
|
markitect.llm — LLM integration adapters for MarkiTect.
|
|
|
|
Provides concrete :class:`LLMAdapter` implementations backed by
|
|
OpenRouter (HTTP) and Claude Code CLI (subprocess).
|
|
|
|
Quick start::
|
|
|
|
from markitect.llm import create_adapter
|
|
|
|
adapter = create_adapter("openrouter", model="anthropic/claude-sonnet-4")
|
|
response = adapter.execute_prompt(prompt, run_config)
|
|
"""
|
|
|
|
from markitect.llm.factory import create_adapter
|
|
from markitect.llm.openrouter import OpenRouterAdapter
|
|
from markitect.llm.claude_code import ClaudeCodeAdapter
|
|
from markitect.llm.gemini import GeminiAdapter
|
|
from markitect.llm.openai import OpenAIAdapter
|
|
from markitect.llm.config import LLMConfig, load_config
|
|
from markitect.llm.exceptions import (
|
|
LLMError,
|
|
LLMConfigurationError,
|
|
LLMAPIError,
|
|
LLMRateLimitError,
|
|
LLMTimeoutError,
|
|
LLMSubprocessError,
|
|
)
|
|
|
|
__all__ = [
|
|
"create_adapter",
|
|
"OpenRouterAdapter",
|
|
"ClaudeCodeAdapter",
|
|
"GeminiAdapter",
|
|
"OpenAIAdapter",
|
|
"LLMConfig",
|
|
"load_config",
|
|
"LLMError",
|
|
"LLMConfigurationError",
|
|
"LLMAPIError",
|
|
"LLMRateLimitError",
|
|
"LLMTimeoutError",
|
|
"LLMSubprocessError",
|
|
]
|