Skip to content

Commit

Permalink
add comments for chunker facdtory
Browse files Browse the repository at this point in the history
Signed-off-by: yuye-aws <[email protected]>
  • Loading branch information
yuye-aws committed Jan 15, 2025
1 parent f11e2f9 commit 2b34076
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,16 @@ private ChunkerFactory() {} // no instance of this factory class
DelimiterChunker::new
);

/** Set of supported chunker algorithm types */
public static Set<String> CHUNKER_ALGORITHMS = CHUNKERS_CONSTRUCTORS.keySet();

/**
* Creates a new Chunker instance based on the specified type and parameters.
*
* @param type the type of chunker to create
* @param parameters configuration parameters for the chunker
* @return a new Chunker instance configured with the given parameters
*/
public static Chunker create(final String type, final Map<String, Object> parameters) {
Function<Map<String, Object>, Chunker> chunkerConstructionFunction = CHUNKERS_CONSTRUCTORS.get(type);
// chunkerConstructionFunction is not null because we have validated the type in text chunking processor
Expand Down

0 comments on commit 2b34076

Please sign in to comment.