Visit ComfyUI Online for ready-to-use ComfyUI environment
Extract relevant information from text files using specific keywords or questions, aiding AI artists in compiling data efficiently.
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.
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."
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.
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.
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.
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.
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.
file_content
parameter is correctly populated with the text you want to search through. This is crucial for the tool to function properly.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.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.file_content
parameter is empty or not provided.file_content
parameter.chunk_size
or chunk_overlap
parameters are set to invalid values (e.g., negative numbers).chunk_size
and chunk_overlap
parameters are set to positive integers. The default values are 200 and 50, respectively.is_enable
parameter is set to "disable."is_enable
parameter to "enable" to activate the tool and allow it to process the file content.© Copyright 2024 RunComfy. All Rights Reserved.