langchain.tools.golden_query.tool.GoldenQueryRun¶
class langchain.tools.golden_query.tool.GoldenQueryRun[source]¶
Bases: BaseTool
Tool that adds the capability to query using the Golden API and get back JSON.
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param api_wrapper: langchain.utilities.golden_query.GoldenQueryAPIWrapper [Required]¶
param args_schema: Optional[Type[BaseModel]] = None¶
Pydantic model class to validate and parse the tool’s input arguments.
param callback_manager: Optional[BaseCallbackManager] = None¶
Deprecated. Please use callbacks instead.
param callbacks: Callbacks = None¶
Callbacks to be called during tool execution.
param description: str = "A wrapper around Golden Query API. Useful for getting entities that match a natural language query from Golden's Knowledge Base.\nExample queries:\n- companies in nanotech\n- list of cloud providers starting in 2019\nInput should be the natural language query.\nOutput is a paginated list of results or an error object in JSON format."¶
Used to tell the model how/when/why to use the tool.
You can provide few-shot examples as a part of the description.
param handle_tool_error: Optional[Union[bool, str, Callable[[ToolException], str]]] = False¶
Handle the content of the ToolException thrown.
param metadata: Optional[Dict[str, Any]] = None¶
Optional metadata associated with the tool. Defaults to None
This metadata will be associated with each call to this tool,
and passed as arguments to the handlers defined in callbacks.
You can use these to eg identify a specific instance of a tool with its use case.
param name: str = 'Golden Query'¶