pygpt-net 2.6.9__py3-none-any.whl → 2.6.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pygpt_net/CHANGELOG.txt +8 -0
- pygpt_net/__init__.py +1 -1
- pygpt_net/controller/ctx/common.py +9 -3
- pygpt_net/controller/ctx/ctx.py +19 -17
- pygpt_net/core/agents/runner.py +19 -0
- pygpt_net/core/agents/tools.py +93 -52
- pygpt_net/data/config/config.json +3 -2
- pygpt_net/data/config/models.json +2 -2
- pygpt_net/data/config/settings.json +14 -0
- pygpt_net/data/locale/locale.de.ini +2 -0
- pygpt_net/data/locale/locale.en.ini +2 -0
- pygpt_net/data/locale/locale.es.ini +2 -0
- pygpt_net/data/locale/locale.fr.ini +2 -0
- pygpt_net/data/locale/locale.it.ini +2 -0
- pygpt_net/data/locale/locale.pl.ini +3 -1
- pygpt_net/data/locale/locale.uk.ini +2 -0
- pygpt_net/data/locale/locale.zh.ini +2 -0
- pygpt_net/plugin/google/config.py +306 -1
- pygpt_net/plugin/google/plugin.py +22 -0
- pygpt_net/plugin/google/worker.py +579 -3
- pygpt_net/provider/core/config/patch.py +11 -0
- pygpt_net/ui/main.py +1 -1
- pygpt_net/ui/widget/lists/context.py +10 -1
- {pygpt_net-2.6.9.dist-info → pygpt_net-2.6.10.dist-info}/METADATA +78 -29
- {pygpt_net-2.6.9.dist-info → pygpt_net-2.6.10.dist-info}/RECORD +28 -28
- {pygpt_net-2.6.9.dist-info → pygpt_net-2.6.10.dist-info}/LICENSE +0 -0
- {pygpt_net-2.6.9.dist-info → pygpt_net-2.6.10.dist-info}/WHEEL +0 -0
- {pygpt_net-2.6.9.dist-info → pygpt_net-2.6.10.dist-info}/entry_points.txt +0 -0
|
@@ -53,7 +53,7 @@ class Config(BaseConfig):
|
|
|
53
53
|
plugin.add_option(
|
|
54
54
|
"oauth_scopes",
|
|
55
55
|
type="text",
|
|
56
|
-
value="https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/contacts https://www.googleapis.com/auth/youtube.readonly",
|
|
56
|
+
value="https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.send https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/contacts https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/documents",
|
|
57
57
|
label="Scopes",
|
|
58
58
|
description="Space-separated OAuth scopes. To use native Keep, add: https://www.googleapis.com/auth/keep and https://www.googleapis.com/auth/keep.readonly.",
|
|
59
59
|
)
|
|
@@ -110,6 +110,23 @@ class Config(BaseConfig):
|
|
|
110
110
|
secret=True,
|
|
111
111
|
)
|
|
112
112
|
|
|
113
|
+
# Google Maps API keys
|
|
114
|
+
plugin.add_option(
|
|
115
|
+
"google_maps_api_key",
|
|
116
|
+
type="text",
|
|
117
|
+
value="",
|
|
118
|
+
label="Google Maps API Key",
|
|
119
|
+
description="Used for Geocoding, Directions, Distance Matrix, Places, Static Maps.",
|
|
120
|
+
secret=True,
|
|
121
|
+
)
|
|
122
|
+
plugin.add_option(
|
|
123
|
+
"maps_api_key",
|
|
124
|
+
type="text",
|
|
125
|
+
value="",
|
|
126
|
+
label="Maps API Key (alias)",
|
|
127
|
+
description="Alias for google_maps_api_key (backward compatibility).",
|
|
128
|
+
secret=True,
|
|
129
|
+
)
|
|
113
130
|
|
|
114
131
|
# Gmail
|
|
115
132
|
plugin.add_cmd(
|
|
@@ -364,4 +381,292 @@ class Config(BaseConfig):
|
|
|
364
381
|
enabled=True,
|
|
365
382
|
description="Contacts: add",
|
|
366
383
|
tab="contacts",
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
# Google Docs
|
|
387
|
+
plugin.add_cmd(
|
|
388
|
+
"docs_create",
|
|
389
|
+
instruction="Create Google Doc",
|
|
390
|
+
params=[
|
|
391
|
+
{"name": "title", "type": "str", "required": False, "description": "Document title (default Untitled)"},
|
|
392
|
+
],
|
|
393
|
+
enabled=True,
|
|
394
|
+
description="Docs: create document",
|
|
395
|
+
tab="docs",
|
|
396
|
+
)
|
|
397
|
+
plugin.add_cmd(
|
|
398
|
+
"docs_get",
|
|
399
|
+
instruction="Get Google Doc (structure + plain text)",
|
|
400
|
+
params=[
|
|
401
|
+
{"name": "document_id", "type": "str", "required": False, "description": "Document ID"},
|
|
402
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
403
|
+
],
|
|
404
|
+
enabled=True,
|
|
405
|
+
description="Docs: get document",
|
|
406
|
+
tab="docs",
|
|
407
|
+
)
|
|
408
|
+
plugin.add_cmd(
|
|
409
|
+
"docs_list",
|
|
410
|
+
instruction="List Google Docs",
|
|
411
|
+
params=[
|
|
412
|
+
{"name": "q", "type": "str", "required": False, "description": "Name contains"},
|
|
413
|
+
{"name": "page_size", "type": "int", "required": False, "description": "Default 100"},
|
|
414
|
+
],
|
|
415
|
+
enabled=True,
|
|
416
|
+
description="Docs: list documents",
|
|
417
|
+
tab="docs",
|
|
418
|
+
)
|
|
419
|
+
plugin.add_cmd(
|
|
420
|
+
"docs_append_text",
|
|
421
|
+
instruction="Append text to Google Doc",
|
|
422
|
+
params=[
|
|
423
|
+
{"name": "document_id", "type": "str", "required": False, "description": "Document ID"},
|
|
424
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
425
|
+
{"name": "text", "type": "str", "required": True, "description": "Text to append"},
|
|
426
|
+
{"name": "newline", "type": "bool", "required": False, "description": "Prepend newline (default True)"},
|
|
427
|
+
],
|
|
428
|
+
enabled=True,
|
|
429
|
+
description="Docs: append text",
|
|
430
|
+
tab="docs",
|
|
431
|
+
)
|
|
432
|
+
plugin.add_cmd(
|
|
433
|
+
"docs_replace_text",
|
|
434
|
+
instruction="Replace all text occurrences in Google Doc",
|
|
435
|
+
params=[
|
|
436
|
+
{"name": "document_id", "type": "str", "required": False, "description": "Document ID"},
|
|
437
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
438
|
+
{"name": "find", "type": "str", "required": True, "description": "Find pattern (literal)"},
|
|
439
|
+
{"name": "replace", "type": "str", "required": False, "description": "Replacement (can be empty)"},
|
|
440
|
+
{"name": "matchCase", "type": "bool", "required": False, "description": "Match case"},
|
|
441
|
+
],
|
|
442
|
+
enabled=True,
|
|
443
|
+
description="Docs: replace text",
|
|
444
|
+
tab="docs",
|
|
445
|
+
)
|
|
446
|
+
plugin.add_cmd(
|
|
447
|
+
"docs_insert_heading",
|
|
448
|
+
instruction="Insert heading at end of Google Doc",
|
|
449
|
+
params=[
|
|
450
|
+
{"name": "document_id", "type": "str", "required": False, "description": "Document ID"},
|
|
451
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
452
|
+
{"name": "text", "type": "str", "required": True, "description": "Heading text"},
|
|
453
|
+
{"name": "level", "type": "int", "required": False, "description": "Heading level 1..6"},
|
|
454
|
+
],
|
|
455
|
+
enabled=True,
|
|
456
|
+
description="Docs: insert heading",
|
|
457
|
+
tab="docs",
|
|
458
|
+
)
|
|
459
|
+
plugin.add_cmd(
|
|
460
|
+
"docs_export",
|
|
461
|
+
instruction="Export Google Doc to file",
|
|
462
|
+
params=[
|
|
463
|
+
{"name": "document_id", "type": "str", "required": False, "description": "Document ID"},
|
|
464
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
465
|
+
{"name": "mime", "type": "str", "required": False, "description": "application/pdf, text/plain, docx"},
|
|
466
|
+
{"name": "out", "type": "str", "required": False, "description": "Local output path"},
|
|
467
|
+
],
|
|
468
|
+
enabled=True,
|
|
469
|
+
description="Docs: export document",
|
|
470
|
+
tab="docs",
|
|
471
|
+
)
|
|
472
|
+
plugin.add_cmd(
|
|
473
|
+
"docs_copy_from_template",
|
|
474
|
+
instruction="Make a copy of template Google Doc",
|
|
475
|
+
params=[
|
|
476
|
+
{"name": "template_id", "type": "str", "required": False, "description": "Template Doc ID"},
|
|
477
|
+
{"name": "template_path", "type": "str", "required": False, "description": "Template Drive path"},
|
|
478
|
+
{"name": "title", "type": "str", "required": False, "description": "New document title"},
|
|
479
|
+
],
|
|
480
|
+
enabled=True,
|
|
481
|
+
description="Docs: copy from template",
|
|
482
|
+
tab="docs",
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
# Google Maps
|
|
486
|
+
plugin.add_cmd(
|
|
487
|
+
"maps_geocode",
|
|
488
|
+
instruction="Geocode an address",
|
|
489
|
+
params=[
|
|
490
|
+
{"name": "address", "type": "str", "required": True, "description": "Address to geocode"},
|
|
491
|
+
{"name": "language", "type": "str", "required": False, "description": "Response language"},
|
|
492
|
+
{"name": "region", "type": "str", "required": False, "description": "Region bias, e.g. 'pl'"},
|
|
493
|
+
],
|
|
494
|
+
enabled=True,
|
|
495
|
+
description="Maps: geocode",
|
|
496
|
+
tab="maps",
|
|
497
|
+
)
|
|
498
|
+
plugin.add_cmd(
|
|
499
|
+
"maps_reverse_geocode",
|
|
500
|
+
instruction="Reverse geocode coordinates",
|
|
501
|
+
params=[
|
|
502
|
+
{"name": "lat", "type": "str", "required": True, "description": "Latitude"},
|
|
503
|
+
{"name": "lng", "type": "str", "required": True, "description": "Longitude"},
|
|
504
|
+
{"name": "language", "type": "str", "required": False, "description": "Response language"},
|
|
505
|
+
],
|
|
506
|
+
enabled=True,
|
|
507
|
+
description="Maps: reverse geocode",
|
|
508
|
+
tab="maps",
|
|
509
|
+
)
|
|
510
|
+
plugin.add_cmd(
|
|
511
|
+
"maps_directions",
|
|
512
|
+
instruction="Get directions between origin and destination",
|
|
513
|
+
params=[
|
|
514
|
+
{"name": "origin", "type": "str", "required": True, "description": "Origin (address or 'lat,lng')"},
|
|
515
|
+
{"name": "destination", "type": "str", "required": True,
|
|
516
|
+
"description": "Destination (address or 'lat,lng')"},
|
|
517
|
+
{"name": "mode", "type": "str", "required": False, "description": "driving|walking|bicycling|transit"},
|
|
518
|
+
{"name": "departure_time", "type": "str", "required": False, "description": "'now' or epoch seconds"},
|
|
519
|
+
{"name": "waypoints", "type": "list", "required": False, "description": "List of waypoints"},
|
|
520
|
+
],
|
|
521
|
+
enabled=True,
|
|
522
|
+
description="Maps: directions",
|
|
523
|
+
tab="maps",
|
|
524
|
+
)
|
|
525
|
+
plugin.add_cmd(
|
|
526
|
+
"maps_distance_matrix",
|
|
527
|
+
instruction="Distance Matrix for origins and destinations",
|
|
528
|
+
params=[
|
|
529
|
+
{"name": "origins", "type": "list", "required": True, "description": "List of origins"},
|
|
530
|
+
{"name": "destinations", "type": "list", "required": True, "description": "List of destinations"},
|
|
531
|
+
{"name": "mode", "type": "str", "required": False, "description": "driving|walking|bicycling|transit"},
|
|
532
|
+
],
|
|
533
|
+
enabled=True,
|
|
534
|
+
description="Maps: distance matrix",
|
|
535
|
+
tab="maps",
|
|
536
|
+
)
|
|
537
|
+
plugin.add_cmd(
|
|
538
|
+
"maps_places_textsearch",
|
|
539
|
+
instruction="Places Text Search",
|
|
540
|
+
params=[
|
|
541
|
+
{"name": "query", "type": "str", "required": True, "description": "Free-form query, e.g. 'coffee'"},
|
|
542
|
+
{"name": "location", "type": "str", "required": False, "description": "Bias 'lat,lng'"},
|
|
543
|
+
{"name": "radius", "type": "int", "required": False, "description": "Radius in meters"},
|
|
544
|
+
{"name": "type", "type": "str", "required": False, "description": "Place type"},
|
|
545
|
+
{"name": "opennow", "type": "bool", "required": False, "description": "Open now filter"},
|
|
546
|
+
],
|
|
547
|
+
enabled=True,
|
|
548
|
+
description="Maps: places text search",
|
|
549
|
+
tab="maps",
|
|
550
|
+
)
|
|
551
|
+
plugin.add_cmd(
|
|
552
|
+
"maps_places_nearby",
|
|
553
|
+
instruction="Nearby Places",
|
|
554
|
+
params=[
|
|
555
|
+
{"name": "location", "type": "str", "required": True, "description": "'lat,lng'"},
|
|
556
|
+
{"name": "radius", "type": "int", "required": True, "description": "Radius in meters"},
|
|
557
|
+
{"name": "keyword", "type": "str", "required": False, "description": "Keyword"},
|
|
558
|
+
{"name": "type", "type": "str", "required": False, "description": "Place type"},
|
|
559
|
+
],
|
|
560
|
+
enabled=True,
|
|
561
|
+
description="Maps: places nearby",
|
|
562
|
+
tab="maps",
|
|
563
|
+
)
|
|
564
|
+
plugin.add_cmd(
|
|
565
|
+
"maps_static_map",
|
|
566
|
+
instruction="Generate Static Map image",
|
|
567
|
+
params=[
|
|
568
|
+
{"name": "center", "type": "str", "required": False,
|
|
569
|
+
"description": "Center 'lat,lng' (optional if markers)"},
|
|
570
|
+
{"name": "zoom", "type": "int", "required": False, "description": "Zoom level (default 13)"},
|
|
571
|
+
{"name": "size", "type": "str", "required": False, "description": "WxH, e.g. 600x400"},
|
|
572
|
+
{"name": "markers", "type": "list", "required": False, "description": "List of 'lat,lng'"},
|
|
573
|
+
{"name": "maptype", "type": "str", "required": False,
|
|
574
|
+
"description": "roadmap|satellite|terrain|hybrid"},
|
|
575
|
+
{"name": "out", "type": "str", "required": False, "description": "Local output path (png)"},
|
|
576
|
+
],
|
|
577
|
+
enabled=True,
|
|
578
|
+
description="Maps: static map",
|
|
579
|
+
tab="maps",
|
|
580
|
+
)
|
|
581
|
+
|
|
582
|
+
# Google Colab
|
|
583
|
+
plugin.add_cmd(
|
|
584
|
+
"colab_list_notebooks",
|
|
585
|
+
instruction="List Colab notebooks on Drive",
|
|
586
|
+
params=[
|
|
587
|
+
{"name": "q", "type": "str", "required": False, "description": "Name contains"},
|
|
588
|
+
{"name": "page_size", "type": "int", "required": False, "description": "Default 100"},
|
|
589
|
+
],
|
|
590
|
+
enabled=True,
|
|
591
|
+
description="Colab: list notebooks",
|
|
592
|
+
tab="colab",
|
|
593
|
+
)
|
|
594
|
+
plugin.add_cmd(
|
|
595
|
+
"colab_create_notebook",
|
|
596
|
+
instruction="Create new Colab notebook",
|
|
597
|
+
params=[
|
|
598
|
+
{"name": "name", "type": "str", "required": True, "description": "Filename, e.g. notebook.ipynb"},
|
|
599
|
+
{"name": "remote_parent_path", "type": "str", "required": False,
|
|
600
|
+
"description": "Target Drive folder path"},
|
|
601
|
+
{"name": "markdown", "type": "str", "required": False, "description": "Initial markdown cell"},
|
|
602
|
+
{"name": "code", "type": "str", "required": False, "description": "Initial code cell"},
|
|
603
|
+
],
|
|
604
|
+
enabled=True,
|
|
605
|
+
description="Colab: create notebook",
|
|
606
|
+
tab="colab",
|
|
607
|
+
)
|
|
608
|
+
plugin.add_cmd(
|
|
609
|
+
"colab_add_code_cell",
|
|
610
|
+
instruction="Add code cell to notebook",
|
|
611
|
+
params=[
|
|
612
|
+
{"name": "file_id", "type": "str", "required": False, "description": "Notebook file ID"},
|
|
613
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
614
|
+
{"name": "code", "type": "str", "required": True, "description": "Code source"},
|
|
615
|
+
{"name": "position", "type": "int", "required": False,
|
|
616
|
+
"description": "Insert index (append if omitted)"},
|
|
617
|
+
],
|
|
618
|
+
enabled=True,
|
|
619
|
+
description="Colab: add code cell",
|
|
620
|
+
tab="colab",
|
|
621
|
+
)
|
|
622
|
+
plugin.add_cmd(
|
|
623
|
+
"colab_add_markdown_cell",
|
|
624
|
+
instruction="Add markdown cell to notebook",
|
|
625
|
+
params=[
|
|
626
|
+
{"name": "file_id", "type": "str", "required": False, "description": "Notebook file ID"},
|
|
627
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
628
|
+
{"name": "markdown", "type": "str", "required": True, "description": "Markdown source"},
|
|
629
|
+
{"name": "position", "type": "int", "required": False,
|
|
630
|
+
"description": "Insert index (append if omitted)"},
|
|
631
|
+
],
|
|
632
|
+
enabled=True,
|
|
633
|
+
description="Colab: add markdown cell",
|
|
634
|
+
tab="colab",
|
|
635
|
+
)
|
|
636
|
+
plugin.add_cmd(
|
|
637
|
+
"colab_get_link",
|
|
638
|
+
instruction="Get Colab edit link",
|
|
639
|
+
params=[
|
|
640
|
+
{"name": "file_id", "type": "str", "required": False, "description": "Notebook file ID"},
|
|
641
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
642
|
+
],
|
|
643
|
+
enabled=True,
|
|
644
|
+
description="Colab: get link",
|
|
645
|
+
tab="colab",
|
|
646
|
+
)
|
|
647
|
+
plugin.add_cmd(
|
|
648
|
+
"colab_rename",
|
|
649
|
+
instruction="Rename notebook",
|
|
650
|
+
params=[
|
|
651
|
+
{"name": "file_id", "type": "str", "required": False, "description": "Notebook file ID"},
|
|
652
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
653
|
+
{"name": "name", "type": "str", "required": True, "description": "New filename"},
|
|
654
|
+
],
|
|
655
|
+
enabled=True,
|
|
656
|
+
description="Colab: rename notebook",
|
|
657
|
+
tab="colab",
|
|
658
|
+
)
|
|
659
|
+
plugin.add_cmd(
|
|
660
|
+
"colab_duplicate",
|
|
661
|
+
instruction="Duplicate notebook",
|
|
662
|
+
params=[
|
|
663
|
+
{"name": "file_id", "type": "str", "required": False, "description": "Notebook file ID"},
|
|
664
|
+
{"name": "path", "type": "str", "required": False, "description": "Drive path (alternative)"},
|
|
665
|
+
{"name": "name", "type": "str", "required": False, "description": "New name (default Copy.ipynb)"},
|
|
666
|
+
{"name": "remote_parent_path", "type": "str", "required": False,
|
|
667
|
+
"description": "Target Drive folder path"},
|
|
668
|
+
],
|
|
669
|
+
enabled=True,
|
|
670
|
+
description="Colab: duplicate notebook",
|
|
671
|
+
tab="colab",
|
|
367
672
|
)
|
|
@@ -48,6 +48,28 @@ class Plugin(BasePlugin):
|
|
|
48
48
|
"youtube_transcript",
|
|
49
49
|
"contacts_list",
|
|
50
50
|
"contacts_add",
|
|
51
|
+
"docs_create",
|
|
52
|
+
"docs_get",
|
|
53
|
+
"docs_list",
|
|
54
|
+
"docs_append_text",
|
|
55
|
+
"docs_replace_text",
|
|
56
|
+
"docs_insert_heading",
|
|
57
|
+
"docs_export",
|
|
58
|
+
"docs_copy_from_template",
|
|
59
|
+
"maps_geocode",
|
|
60
|
+
"maps_reverse_geocode",
|
|
61
|
+
"maps_directions",
|
|
62
|
+
"maps_distance_matrix",
|
|
63
|
+
"maps_places_textsearch",
|
|
64
|
+
"maps_places_nearby",
|
|
65
|
+
"maps_static_map",
|
|
66
|
+
"colab_list_notebooks",
|
|
67
|
+
"colab_create_notebook",
|
|
68
|
+
"colab_add_code_cell",
|
|
69
|
+
"colab_add_markdown_cell",
|
|
70
|
+
"colab_get_link",
|
|
71
|
+
"colab_rename",
|
|
72
|
+
"colab_duplicate",
|
|
51
73
|
]
|
|
52
74
|
self.use_locale = False
|
|
53
75
|
self.worker = None
|