Visit ComfyUI Online for ready-to-use ComfyUI environment
Search for keywords in uploaded text files by splitting content into chunks for efficient retrieval of relevant sections.
The load_keyword
node is designed to help you search for specific keywords within a text file that you upload. This node processes the content of the file by splitting it into manageable chunks and then searches for the specified keyword within these chunks. The primary goal of this node is to provide you with the most relevant sections of the text that contain the keyword, making it easier to find pertinent information without manually sifting through the entire document. This can be particularly useful for artists and creators who need to quickly locate specific information or themes within large bodies of text.
This parameter is a string that represents the keyword or phrase you want to search for within the uploaded file. It is the main query that the node will use to find relevant information. The default value is "question".
This boolean parameter determines whether the node is active or not. If set to False
, the node will not perform any operations and will return None
. The default value is True
.
This parameter is a string that contains the content of the file you want to search. It is a required input and must be provided for the node to function. This parameter is marked with forceInput
, meaning it must be explicitly provided by the user.
This integer parameter specifies the number of top chunks to return based on the keyword search. It determines how many of the most relevant sections of the text will be included in the output. The default value is 5.
This integer parameter defines the size of each chunk of text that the file content will be split into. It affects how the text is divided and can impact the granularity of the search results. The default value is 200.
This integer parameter specifies the amount of overlap between consecutive chunks of text. This can help ensure that important information that spans across chunks is not missed. The default value is 50.
This output parameter is a string that contains the relevant sections of the text where the keyword was found. It provides a summary of the most pertinent information related to the keyword, making it easier for you to quickly access the needed content.
file_content
parameter is correctly provided with the full text you want to search. This is crucial for the node to function properly.chunk_size
and chunk_overlap
parameters to fine-tune the granularity of your search results. Smaller chunk sizes can provide more detailed results, while larger chunk sizes can give a broader overview.k
parameter to control the number of top results you want to see. Increasing this number can provide more comprehensive results, while decreasing it can help you focus on the most relevant sections.is_enable
parameter is set to False
, causing the node to return None
.is_enable
parameter is set to True
to activate the node.file_content
parameter is not provided.file_content
parameter.chunk_size
or chunk_overlap
parameters are set to invalid values.chunk_size
and chunk_overlap
are set to positive integers. Adjust these values to appropriate sizes based on your text content.© Copyright 2024 RunComfy. All Rights Reserved.