haive.core.schema.composer.engine.engine_manager

Engine management mixin for SchemaComposer.

Classes

EngineComposerMixin

Mixin that handles engine management in SchemaComposer.

Module Contents

class haive.core.schema.composer.engine.engine_manager.EngineComposerMixin(*args, **kwargs)[source]

Mixin that handles engine management in SchemaComposer.

This mixin provides all engine-related functionality: - Engine tracking and registration - Engine type categorization - Engine provider updates - Engine field extraction

Initialize engine tracking structures.

add_engine(engine)[source]

Add an engine to the composer for tracking and later updates.

Parameters:

engine (Any) – Engine to add

Returns:

Self for chaining

Return type:

EngineComposerMixin

add_engine_management()[source]

Add standardized engine management fields to the schema.

This method adds the new engine management pattern to support: - Optional ‘engine’ field for primary/main engine - Explicit ‘engines’ dict field (was implicit before) - Automatic synchronization between the two

Returns:

Self for chaining

Return type:

EngineComposerMixin

get_engines_by_type(engine_type)[source]

Get all engines of a specific type.

Parameters:

engine_type (str) – Type of engines to retrieve

Returns:

List of engines of the specified type

Return type:

list[Any]

update_engine_provider(engine_type, updates)[source]

Update configuration for all engines of a specific type.

Parameters:
  • engine_type (str) – Type of engines to update (e.g., “llm”, “retriever”)

  • updates (dict[str, Any]) – Dictionary of updates to apply

Returns:

Self for chaining

Return type:

EngineComposerMixin