MCPcopy Create free account
hub / github.com/PromtEngineer/localGPT / main

Function main

demo_batch_indexing.py:333–382  ·  view source on GitHub ↗

Main entry point for the demo script.

()

Source from the content-addressed store, hash-verified

331
332
333def main():
334 """Main entry point for the demo script."""
335 parser = argparse.ArgumentParser(
336 description="LocalGPT Batch Indexing Demo",
337 formatter_class=argparse.RawDescriptionHelpFormatter,
338 epilog="""
339Examples:
340 python demo_batch_indexing.py --config batch_indexing_config.json
341 python demo_batch_indexing.py --create-sample-config
342
343This demo showcases the advanced batch indexing capabilities of LocalGPT,
344including multi-index creation, advanced configuration options, and
345comprehensive processing pipelines.
346 """
347 )
348
349 parser.add_argument(
350 "--config",
351 type=str,
352 default="batch_indexing_config.json",
353 help="Path to batch indexing configuration file"
354 )
355
356 parser.add_argument(
357 "--create-sample-config",
358 action="store_true",
359 help="Create a sample configuration file"
360 )
361
362 args = parser.parse_args()
363
364 if args.create_sample_config:
365 create_sample_config()
366 return
367
368 if not os.path.exists(args.config):
369 print(f"❌ Configuration file not found: {args.config}")
370 print(f"💡 Create a sample config with: python {sys.argv[0]} --create-sample-config")
371 sys.exit(1)
372
373 try:
374 demo = BatchIndexingDemo(args.config)
375 demo.run_demo()
376
377 except KeyboardInterrupt:
378 print("\n\n❌ Demo cancelled by user.")
379 except Exception as e:
380 print(f"❌ Demo failed: {e}")
381 import traceback
382 traceback.print_exc()
383
384
385if __name__ == "__main__":

Callers 1

Calls 3

run_demoMethod · 0.95
create_sample_configFunction · 0.85
BatchIndexingDemoClass · 0.85

Tested by

no test coverage detected