haive.core.utils.haive_discovery.tool_analyzers¶

Analyzers for tool-related components.

Classes¶

DocumentLoaderAnalyzer

Analyzer for document loaders.

ToolAnalyzer

Analyzer for LangChain tools.

Module Contents¶

class haive.core.utils.haive_discovery.tool_analyzers.DocumentLoaderAnalyzer[source]¶

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

Analyzer for document loaders.

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_tool(component_info)[source]¶

Convert document loader to a StructuredTool.

Parameters:

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

Return type:

Any | None

class haive.core.utils.haive_discovery.tool_analyzers.ToolAnalyzer[source]¶

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

Analyzer for LangChain tools.

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