haive.core.contracts.aug_llm_adapter¶
Adapter to integrate extracted components with AugLLMConfig.
This module shows how AugLLMConfig can be refactored to use the new ToolConfig, PromptConfig, ToolRegistry, and PromptLibrary components.
Classes¶
Adapter showing how AugLLMConfig can use extracted components. |
Module Contents¶
- class haive.core.contracts.aug_llm_adapter.AugLLMAdapter(/, **data)[source]¶
Bases:
pydantic.BaseModelAdapter showing how AugLLMConfig can use extracted components.
This demonstrates the refactored architecture where: - Tool management is handled by ToolConfig and ToolRegistry - Prompt management is handled by PromptConfig and PromptLibrary - AugLLMConfig focuses on LLM configuration and orchestration
- Parameters:
data (Any)
- llm¶
The language model instance.
- tool_config¶
Tool configuration.
- prompt_config¶
Prompt configuration.
- tool_registry¶
Shared tool registry.
- prompt_library¶
Shared prompt library.
- temperature¶
LLM temperature.
- max_tokens¶
Maximum tokens.
- model_name¶
Model identifier.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- compose_prompts(prompt_names)[source]¶
Compose multiple prompts.
- Parameters:
prompt_names (List[str]) – Prompts to compose.
- Returns:
Composed prompt.
- Return type:
Any
- classmethod from_aug_llm_config(config)[source]¶
Create adapter from existing AugLLMConfig.
This shows the migration path from monolithic AugLLMConfig to the new component-based architecture.
- Parameters:
config (Any) – Existing AugLLMConfig.
- Returns:
New adapter instance.
- Return type:
- get_configuration_summary()[source]¶
Get configuration summary.
- Returns:
Summary of configuration.
- Return type:
Dict[str, Any]
- get_safe_tools()[source]¶
Get tools without side effects.
- Returns:
List of safe tools.
- Return type:
List[Any]
- to_dict()[source]¶
Convert to dictionary.
- Returns:
Configuration as dictionary.
- Return type:
Dict[str, Any]
- with_prompt_template(template)[source]¶
Configure with prompt template using PromptConfig.
- Parameters:
template (Any) – Prompt template.
- Returns:
Self for chaining.
- Return type: