Tool Calling
Overview
Tool calling is a series of configuration-related features provided by Fuwang, allowing large language models (LLMs) to interact with the system by invoking these functions. These tools enable the model to perform various tasks, such as querying calendar events, adding new calendar events, obtaining location information, accessing web page content, and opening URL links.
How to Use
After enabling the tool calling feature in a conversation, the model can automatically decide when to use a specific tool to assist in answering user questions. Users do not need to directly request the use of tools; the model will determine whether to call a tool to obtain more accurate information based on the conversation context.
For example:
- When a user asks, "What is my schedule for today?" the model may call the calendar query tool.
- When a user says, "Help me schedule a meeting for 3 PM tomorrow," the model may call the add calendar event tool.
- When a user asks, "What restaurants are nearby?" the model may call the location tool.
How to Configure
- Find the "Tool Calling" option in the settings.
- Enable or disable specific tools.
- Above the edit box in the conversation interface, you can click the tool icon to enable or disable the tool calling function for the current conversation.
Tool Calling Process
- The user asks the model a question that requires external information.
- The model generates an initial response and determines the tool to use.
- The model requests the system to call the tool, providing the necessary parameters.
- The system processes the tool call request and displays a confirmation dialog to the user.
- After the user approves, the system executes the tool operation and obtains the result.
- The system returns the tool execution result to the model.
- The model analyzes the result and generates the final response.
- If necessary, the model can perform multiple rounds of tool calling to complete complex tasks.
Handling Tool Calling Dead Loops
In rare cases, the model may get stuck in a tool calling dead loop, repeatedly requesting the use of the same tool without being able to stop on its own. If you encounter this situation:
- You will notice that the model continuously requests the use of the same tool and repeats the same request after each use.
- Try rejecting the model's request.
- If the model still cannot stop the tool calling loop, exit the application to completely terminate the process.
- After restarting the application, it is recommended to temporarily disable the tool calling function in that conversation.
Available Tools List
Tool Name | Function | Use Case | Permissions/Notes |
---|---|---|---|
Calendar Query | Query events in the user's calendar | Understand specific date arrangements, check for time conflicts, etc. | Requires calendar access permission |
Add Calendar | Add new events to the user's default calendar | Create appointments, meetings, or reminders based on conversation content | Requires calendar write permission |
Location | Get the user's current location information | Provide location-based recommendations, check the weather, etc. | Requires location service permission |
Web Scraping | Get and parse web page content | Find the latest information, read article content, etc. | Only scrapes publicly accessible web page content |
Open Link | Suggest opening a specific resource address | Guide users to access relevant websites, applications, or resources | Each time a link is opened, user confirmation is required |
Best Practices
- Only enable tools that you trust and need.
- Review tool call requests to ensure they are reasonable and necessary.
- Understand the permission requirements and potential impact of each tool.
- If you have questions about a tool request, deny authorization.