neurotrace.core.tools.factory
¶
neurotrace.core.tools.factory
¶
generic_tool_factory(func, tool_name, tool_description=None, **kwargs)
¶
Creates a LangChain Tool with the given function and configuration.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
func
|
callable
|
The function to be wrapped as a tool. |
required |
tool_name
|
str
|
Name of the tool. |
required |
tool_description
|
str
|
Description of what the tool does. If None, loads description from prompt file. Defaults to None. |
None
|
**kwargs
|
Additional keyword arguments to pass to Tool constructor. |
{}
|
Returns:
Name | Type | Description |
---|---|---|
Tool |
Tool
|
A configured LangChain Tool instance. |