style: auto-format 6 files with ruff format (CI formatting check)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -160,7 +160,10 @@ class CreateCommand:
|
||||
argv.append("--chunk-for-rag")
|
||||
if getattr(self.args, "chunk_tokens", None) and self.args.chunk_tokens != 512:
|
||||
argv.extend(["--chunk-tokens", str(self.args.chunk_tokens)])
|
||||
if getattr(self.args, "chunk_overlap_tokens", None) and self.args.chunk_overlap_tokens != 50:
|
||||
if (
|
||||
getattr(self.args, "chunk_overlap_tokens", None)
|
||||
and self.args.chunk_overlap_tokens != 50
|
||||
):
|
||||
argv.extend(["--chunk-overlap-tokens", str(self.args.chunk_overlap_tokens)])
|
||||
|
||||
# Advanced web-specific arguments
|
||||
|
||||
@@ -21,5 +21,10 @@ class StreamParser(SubcommandParser):
|
||||
def add_arguments(self, parser):
|
||||
"""Add stream-specific arguments."""
|
||||
parser.add_argument("input_file", help="Large file to stream")
|
||||
parser.add_argument("--streaming-chunk-chars", type=int, default=4000, help="Maximum characters per chunk (default: 4000)")
|
||||
parser.add_argument(
|
||||
"--streaming-chunk-chars",
|
||||
type=int,
|
||||
default=4000,
|
||||
help="Maximum characters per chunk (default: 4000)",
|
||||
)
|
||||
parser.add_argument("--output", help="Output directory")
|
||||
|
||||
@@ -1079,7 +1079,10 @@ Examples:
|
||||
parser.add_argument("-v", "--verbose", action="store_true", help="Verbose output")
|
||||
parser.add_argument("--pretty", action="store_true", help="Pretty-print JSON output")
|
||||
parser.add_argument(
|
||||
"--pdf-pages-per-chunk", type=int, default=10, help="Pages per chunk (0 = no chunking, default: 10)"
|
||||
"--pdf-pages-per-chunk",
|
||||
type=int,
|
||||
default=10,
|
||||
help="Pages per chunk (0 = no chunking, default: 10)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-merge", action="store_true", help="Disable merging code blocks across pages"
|
||||
|
||||
@@ -384,7 +384,9 @@ def main():
|
||||
parser.add_argument("skill_dir", type=Path, help="Path to skill directory")
|
||||
parser.add_argument("--output", "-o", type=Path, help="Output JSON file")
|
||||
parser.add_argument("--chunk-tokens", type=int, default=512, help="Target chunk size in tokens")
|
||||
parser.add_argument("--chunk-overlap-tokens", type=int, default=50, help="Overlap size in tokens")
|
||||
parser.add_argument(
|
||||
"--chunk-overlap-tokens", type=int, default=50, help="Overlap size in tokens"
|
||||
)
|
||||
parser.add_argument("--no-code-blocks", action="store_true", help="Don't preserve code blocks")
|
||||
parser.add_argument("--no-paragraphs", action="store_true", help="Don't preserve paragraphs")
|
||||
|
||||
|
||||
@@ -380,7 +380,9 @@ def main():
|
||||
|
||||
parser = argparse.ArgumentParser(description="Stream and chunk skill documents")
|
||||
parser.add_argument("input", help="Input file or directory path")
|
||||
parser.add_argument("--streaming-chunk-chars", type=int, default=4000, help="Chunk size in characters")
|
||||
parser.add_argument(
|
||||
"--streaming-chunk-chars", type=int, default=4000, help="Chunk size in characters"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--streaming-overlap-chars", type=int, default=200, help="Chunk overlap in characters"
|
||||
)
|
||||
@@ -390,7 +392,9 @@ def main():
|
||||
|
||||
# Initialize ingester
|
||||
ingester = StreamingIngester(
|
||||
chunk_size=args.streaming_chunk_chars, chunk_overlap=args.streaming_overlap_chars, batch_size=args.batch_size
|
||||
chunk_size=args.streaming_chunk_chars,
|
||||
chunk_overlap=args.streaming_overlap_chars,
|
||||
batch_size=args.batch_size,
|
||||
)
|
||||
|
||||
# Progress callback
|
||||
|
||||
Reference in New Issue
Block a user