MCPcopy
hub / github.com/PromtEngineer/localGPT / main

Function main

create_index_script.py:342–368  ·  view source on GitHub ↗

Main entry point for the script.

()

Source from the content-addressed store, hash-verified

340
341
342def main():
343 """Main entry point for the script."""
344 parser = argparse.ArgumentParser(description="LocalGPT Index Creation Tool")
345 parser.add_argument("--batch", help="Batch configuration file", type=str)
346 parser.add_argument("--config", help="Custom pipeline configuration file", type=str)
347 parser.add_argument("--create-sample", action="store_true", help="Create sample batch config")
348
349 args = parser.parse_args()
350
351 if args.create_sample:
352 create_sample_batch_config()
353 return
354
355 try:
356 creator = IndexCreator(config_path=args.config)
357
358 if args.batch:
359 creator.batch_create_from_config(args.batch)
360 else:
361 creator.create_index_interactive()
362
363 except KeyboardInterrupt:
364 print("\n\n❌ Operation cancelled by user.")
365 except Exception as e:
366 print(f"❌ Unexpected error: {e}")
367 import traceback
368 traceback.print_exc()
369
370
371if __name__ == "__main__":

Callers 1

Calls 4

IndexCreatorClass · 0.85

Tested by

no test coverage detected