Skip to content

Commit ee85994

Browse files
Added db_path to README.md, added defaults to args
1 parent b0e0dee commit ee85994

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ This will display detailed usage information.
5959
- `-t`, `--api_timeout`: Timeout (in seconds) for API requests (default: 10).
6060
- `-i`, `--poll_interval`: Interval (in seconds) between API status polls (default: 5).
6161
- `-p`, `--parallel_call_count`: Number of parallel API calls (default: 10).
62+
- `--csv_report`: Path to export the detailed report as a CSV file.
63+
- `--db_path`: Path where the SQlite DB file is stored (default: './file_processing.db')
6264
- `--retry_failed`: Retry processing of failed files.
6365
- `--retry_pending`: Retry processing of pending files by making new requests.
6466
- `--skip_pending`: Skip processing of pending files.
@@ -67,7 +69,6 @@ This will display detailed usage information.
6769
- `--print_report`: Print a detailed report of all processed files at the end.
6870
- `--exclude_metadata`: Exclude metadata on tokens consumed and the context passed to LLMs for prompt studio exported tools in the result for each file.
6971
- `--no_verify`: Disable SSL certificate verification. (By default, SSL verification is enabled.)
70-
- `--csv_report`: Path to export the detailed report as a CSV file.
7172

7273
## Usage Examples
7374

main.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -502,14 +502,14 @@ def load_folder(args: Arguments):
502502

503503

504504
def main():
505-
parser = argparse.ArgumentParser(description="Process files using the API.")
505+
parser = argparse.ArgumentParser(description="Process files using Unstract's API deployment")
506506
parser.add_argument(
507507
"-e",
508508
"--api_endpoint",
509509
dest="api_endpoint",
510510
type=str,
511511
required=True,
512-
help="API Endpoint to use for processing the files.",
512+
help="API Endpoint to use for processing the files",
513513
)
514514
parser.add_argument(
515515
"-k",
@@ -525,38 +525,38 @@ def main():
525525
dest="api_timeout",
526526
type=int,
527527
default=10,
528-
help="Time in seconds to wait before switching to async mode.",
528+
help="Time in seconds to wait before switching to async mode (default: 10)",
529529
)
530530
parser.add_argument(
531531
"-i",
532532
"--poll_interval",
533533
dest="poll_interval",
534534
type=int,
535535
default=5,
536-
help="Time in seconds the process will sleep between polls in async mode.",
536+
help="Time in seconds the process will sleep between polls in async mode (default: 5)",
537537
)
538538
parser.add_argument(
539539
"-f",
540540
"--input_folder_path",
541541
dest="input_folder_path",
542542
type=str,
543543
required=True,
544-
help="Path where the files to process are present.",
544+
help="Path where the files to process are present",
545545
)
546546
parser.add_argument(
547547
"-p",
548548
"--parallel_call_count",
549549
dest="parallel_call_count",
550550
type=int,
551551
default=5,
552-
help="Number of calls to be made in parallel.",
552+
help="Number of calls to be made in parallel (default: 5)",
553553
)
554554
parser.add_argument(
555555
"--db_path",
556556
dest="db_path",
557557
type=str,
558558
default="file_processing.db",
559-
help="Path where the SQlite DB file is stored, defaults to './file_processing.db'",
559+
help="Path where the SQlite DB file is stored (default: './file_processing.db)'",
560560
)
561561
parser.add_argument(
562562
'--csv_report',
@@ -568,25 +568,25 @@ def main():
568568
"--retry_failed",
569569
dest="retry_failed",
570570
action="store_true",
571-
help="Retry processing of failed files.",
571+
help="Retry processing of failed files (default: True)",
572572
)
573573
parser.add_argument(
574574
"--retry_pending",
575575
dest="retry_pending",
576576
action="store_true",
577-
help="Retry processing of pending files as new request (Without this it will try to fetch the results using status API).",
577+
help="Retry processing of pending files as new request (Without this it will try to fetch the results using status API) (default: True)",
578578
)
579579
parser.add_argument(
580580
"--skip_pending",
581581
dest="skip_pending",
582582
action="store_true",
583-
help="Skip processing of pending files (Over rides --retry-pending).",
583+
help="Skip processing of pending files (overrides --retry-pending) (default: True)",
584584
)
585585
parser.add_argument(
586586
"--skip_unprocessed",
587587
dest="skip_unprocessed",
588588
action="store_true",
589-
help="Skip unprocessed files while retry processing of failed files.",
589+
help="Skip unprocessed files while retry processing of failed files (default: True)",
590590
)
591591
parser.add_argument(
592592
"--log_level",
@@ -600,19 +600,19 @@ def main():
600600
"--print_report",
601601
dest="print_report",
602602
action="store_true",
603-
help="Print a detailed report of all file processed.",
603+
help="Print a detailed report of all file processed (default: True)",
604604
)
605605
parser.add_argument(
606606
"--exclude_metadata",
607607
dest="include_metadata",
608608
action="store_false",
609-
help="Exclude metadata on tokens consumed and the context passed to LLMs for prompt studio exported tools in the result for each file.",
609+
help="Exclude metadata on tokens consumed and the context passed to LLMs for prompt studio exported tools in the result for each file (default: False)",
610610
)
611611
parser.add_argument(
612612
"--no_verify",
613613
dest="verify",
614614
action="store_false",
615-
help="Disable SSL certificate verification.",
615+
help="Disable SSL certificate verification (default: False)",
616616
)
617617

618618
args = Arguments(**vars(parser.parse_args()))

0 commit comments

Comments
 (0)