ComfyUI  >  Nodes  >  comfyui_LLM_party >  搜索关键词工具(search_keyword_tool)

ComfyUI Node: 搜索关键词工具(search_keyword_tool)

Class Name

keyword_tool

Category
大模型派对(llm_party)/工具(tools)
Author
heshengtao (Account age: 2893 days)
Extension
comfyui_LLM_party
Latest Updated
6/22/2024
Github Stars
0.1K

How to Install comfyui_LLM_party

Install this extension via the ComfyUI Manager by searching for  comfyui_LLM_party
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui_LLM_party in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Cloud for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

搜索关键词工具(search_keyword_tool) Description

Extract relevant information from text files using specific keywords or questions, aiding AI artists in compiling data efficiently.

搜索关键词工具(search_keyword_tool):

The keyword_tool is designed to help you extract relevant information from a given text file based on specific keywords or questions. This tool is particularly useful for AI artists who need to quickly find and compile information from large documents without manually sifting through the content. By leveraging text chunking and keyword counting, the keyword_tool identifies and returns the most relevant sections of the text, making it easier to locate the information you need. This can significantly enhance your workflow by saving time and ensuring you have access to pertinent data efficiently.

搜索关键词工具(search_keyword_tool) Input Parameters:

is_enable

This parameter determines whether the tool is active or not. When set to "enable," the tool processes the input file content to find relevant information based on the provided question. If set to "disable," the tool will not perform any operations. The default value is "enable."

file_content

This is the text content of the file you want to search through. It is a required parameter and must be provided as a string. The tool will split this content into chunks and analyze it to find the most relevant sections based on the provided question.

k

This parameter specifies the number of top chunks to return based on their relevance to the question. It determines how many of the most relevant sections will be included in the output. The default value is 5, and it can be adjusted to return more or fewer chunks as needed.

chunk_size

This parameter defines the size of each text chunk in characters. The tool splits the file content into chunks of this size for analysis. The default value is 200 characters. Adjusting this value can impact the granularity of the search results.

chunk_overlap

This parameter specifies the number of overlapping characters between consecutive chunks. It helps ensure that important information spanning across chunk boundaries is not missed. The default value is 50 characters. Adjusting this value can affect the continuity and completeness of the search results.

搜索关键词工具(search_keyword_tool) Output Parameters:

ebd_response

This output parameter contains the relevant information extracted from the file content based on the provided question. It is returned as a string and includes the most relevant text chunks concatenated together. This output helps you quickly access the information you need without manually searching through the entire document.

搜索关键词工具(search_keyword_tool) Usage Tips:

  • Ensure that the file_content parameter is correctly populated with the text you want to search through. This is crucial for the tool to function properly.
  • Adjust the chunk_size and chunk_overlap parameters to fine-tune the granularity and continuity of the search results. Smaller chunk sizes can provide more detailed results, while larger chunk sizes can capture more context.
  • Use the k parameter to control the number of top relevant chunks returned. Increasing this value can provide more comprehensive results, while decreasing it can help focus on the most relevant sections.

搜索关键词工具(search_keyword_tool) Common Errors and Solutions:

"Error: No file content provided"

  • Explanation: This error occurs when the file_content parameter is empty or not provided.
  • Solution: Ensure that you provide the text content of the file as a string in the file_content parameter.

"Error: Invalid chunk size or overlap"

  • Explanation: This error occurs when the chunk_size or chunk_overlap parameters are set to invalid values (e.g., negative numbers).
  • Solution: Verify that the chunk_size and chunk_overlap parameters are set to positive integers. The default values are 200 and 50, respectively.

"Error: Tool is disabled"

  • Explanation: This error occurs when the is_enable parameter is set to "disable."
  • Solution: Set the is_enable parameter to "enable" to activate the tool and allow it to process the file content.

搜索关键词工具(search_keyword_tool) Related Nodes

Go back to the extension to check out more related nodes.
comfyui_LLM_party
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.