TinyFishTool
autogen.tools.experimental.TinyFishTool #
Bases: Tool
TinyFishTool is a tool that uses the TinyFish API to deep-scrape web pages with a natural language goal.
TinyFish performs goal-directed web scraping — you provide a URL and describe what information you want to extract, and it returns structured results.
This tool requires a TinyFish API key, which can be provided during initialization or set as an environment variable TINYFISH_API_KEY.
| ATTRIBUTE | DESCRIPTION |
|---|---|
tinyfish_api_key | The API key used for authenticating with the TinyFish API. TYPE: |
Initializes the TinyFishTool.
| PARAMETER | DESCRIPTION |
|---|---|
llm_config | LLM configuration. (Currently unused but kept for potential future integration). TYPE: |
tinyfish_api_key | The API key for the TinyFish API. If not provided, it attempts to read from the TYPE: |
| RAISES | DESCRIPTION |
|---|---|
ValueError | If |
Source code in autogen/tools/experimental/tinyfish/tinyfish_tool.py
tool_schema property #
Get the schema for the tool.
This is the preferred way of handling function calls with OpeaAI and compatible frameworks.
function_schema property #
Get the schema for the function.
This is the old way of handling function calls with OpenAI and compatible frameworks. It is provided for backward compatibility.
realtime_tool_schema property #
Get the schema for the tool.
This is the preferred way of handling function calls with OpeaAI and compatible frameworks.
tinyfish_api_key instance-attribute #
tinyfish_api_key = tinyfish_api_key or getenv('TINYFISH_API_KEY')
register_for_llm #
Registers the tool for use with a ConversableAgent's language model (LLM).
This method registers the tool so that it can be invoked by the agent during interactions with the language model.
| PARAMETER | DESCRIPTION |
|---|---|
agent | The agent to which the tool will be registered. TYPE: |
Source code in autogen/tools/tool.py
register_for_execution #
Registers the tool for direct execution by a ConversableAgent.
This method registers the tool so that it can be executed by the agent, typically outside of the context of an LLM interaction.
| PARAMETER | DESCRIPTION |
|---|---|
agent | The agent to which the tool will be registered. TYPE: |
Source code in autogen/tools/tool.py
register_tool #
Register a tool to be both proposed and executed by an agent.
Equivalent to calling both register_for_llm and register_for_execution with the same agent.
Note: This will not make the agent recommend and execute the call in the one step. If the agent recommends the tool, it will need to be the next agent to speak in order to execute the tool.
| PARAMETER | DESCRIPTION |
|---|---|
agent | The agent to which the tool will be registered. TYPE: |