haive.core.utils.haive_discovery.retriever_analyzers¶

Analyzers for retriever and vector store components.

Classes¶

RetrieverAnalyzer

Analyzer for retrievers.

VectorStoreAnalyzer

Analyzer for vector stores.

Module Contents¶

class haive.core.utils.haive_discovery.retriever_analyzers.RetrieverAnalyzer[source]¶

Bases: haive.core.utils.haive_discovery.base_analyzer.ComponentAnalyzer

Analyzer for retrievers.

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

can_analyze(obj)[source]¶

Check if this analyzer can handle the given object.

Parameters:

obj (Any)

Return type:

bool

create_engine_config(component_info)[source]¶

Create a Haive RetrieverEngine config.

Parameters:

component_info (haive.core.utils.haive_discovery.component_info.ComponentInfo)

Return type:

dict[str, Any] | None

create_tool(component_info)[source]¶

Convert retriever to a StructuredTool.

Parameters:

component_info (haive.core.utils.haive_discovery.component_info.ComponentInfo)

Return type:

Any | None

class haive.core.utils.haive_discovery.retriever_analyzers.VectorStoreAnalyzer[source]¶

Bases: haive.core.utils.haive_discovery.base_analyzer.ComponentAnalyzer

Analyzer for vector stores.

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

can_analyze(obj)[source]¶

Check if this analyzer can handle the given object.

Parameters:

obj (Any)

Return type:

bool

create_engine_config(component_info)[source]¶

Create a Haive VectorStoreEngine config.

Parameters:

component_info (haive.core.utils.haive_discovery.component_info.ComponentInfo)

Return type:

dict[str, Any] | None

create_tool(component_info)[source]¶

Convert vector store to a StructuredTool.

Parameters:

component_info (haive.core.utils.haive_discovery.component_info.ComponentInfo)

Return type:

Any | None