haive.core.utils.haive_discovery.base_analyzer¶
Base analyzer class and common functionality for component analysis.
Classes¶
Abstract base class for component analyzers. |
Module Contents¶
- class haive.core.utils.haive_discovery.base_analyzer.ComponentAnalyzer[source]¶
Bases:
abc.ABCAbstract base class for component analyzers.
- abstractmethod analyze(obj, module_path)[source]¶
Analyze the object and return component info.
- Parameters:
obj (Any)
module_path (str)
- Return type:
haive.core.utils.haive_discovery.component_info.ComponentInfo
- abstractmethod can_analyze(obj)[source]¶
Check if this analyzer can handle the given object.
- Parameters:
obj (Any)
- Return type:
- create_engine_config(component_info)[source]¶
Create a Haive engine config if possible.
- Parameters:
component_info (haive.core.utils.haive_discovery.component_info.ComponentInfo)
- Return type:
Any | None
- create_pydantic_model(cls, force_serializable=False)[source]¶
Create a Pydantic model from a class signature.
- create_tool(component_info)[source]¶
Convert component to a StructuredTool if possible.
- Parameters:
component_info (haive.core.utils.haive_discovery.component_info.ComponentInfo)
- Return type:
Any | None