pygpt-net 2.6.61__py3-none-any.whl → 2.6.63__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.
Files changed (86) hide show
  1. pygpt_net/CHANGELOG.txt +12 -0
  2. pygpt_net/__init__.py +3 -3
  3. pygpt_net/controller/chat/response.py +8 -2
  4. pygpt_net/controller/presets/editor.py +65 -1
  5. pygpt_net/controller/settings/profile.py +16 -4
  6. pygpt_net/controller/settings/workdir.py +30 -5
  7. pygpt_net/controller/theme/common.py +4 -2
  8. pygpt_net/controller/theme/markdown.py +2 -2
  9. pygpt_net/controller/theme/theme.py +2 -1
  10. pygpt_net/controller/ui/ui.py +31 -3
  11. pygpt_net/core/agents/custom/llama_index/runner.py +30 -52
  12. pygpt_net/core/agents/custom/runner.py +199 -76
  13. pygpt_net/core/agents/runners/llama_workflow.py +122 -12
  14. pygpt_net/core/agents/runners/openai_workflow.py +2 -1
  15. pygpt_net/core/node_editor/types.py +13 -1
  16. pygpt_net/core/render/web/renderer.py +76 -11
  17. pygpt_net/data/config/config.json +3 -3
  18. pygpt_net/data/config/models.json +3 -3
  19. pygpt_net/data/config/presets/agent_openai_b2b.json +1 -15
  20. pygpt_net/data/config/presets/agent_openai_coder.json +1 -15
  21. pygpt_net/data/config/presets/agent_openai_evolve.json +1 -23
  22. pygpt_net/data/config/presets/agent_openai_planner.json +1 -21
  23. pygpt_net/data/config/presets/agent_openai_researcher.json +1 -21
  24. pygpt_net/data/config/presets/agent_openai_supervisor.json +1 -13
  25. pygpt_net/data/config/presets/agent_openai_writer.json +1 -15
  26. pygpt_net/data/config/presets/agent_supervisor.json +1 -11
  27. pygpt_net/data/css/style.dark.css +18 -0
  28. pygpt_net/data/css/style.light.css +20 -1
  29. pygpt_net/data/js/app/runtime.js +4 -1
  30. pygpt_net/data/js/app.min.js +3 -2
  31. pygpt_net/data/locale/locale.de.ini +2 -0
  32. pygpt_net/data/locale/locale.en.ini +7 -0
  33. pygpt_net/data/locale/locale.es.ini +2 -0
  34. pygpt_net/data/locale/locale.fr.ini +2 -0
  35. pygpt_net/data/locale/locale.it.ini +2 -0
  36. pygpt_net/data/locale/locale.pl.ini +3 -1
  37. pygpt_net/data/locale/locale.uk.ini +2 -0
  38. pygpt_net/data/locale/locale.zh.ini +2 -0
  39. pygpt_net/item/ctx.py +23 -1
  40. pygpt_net/js_rc.py +13 -10
  41. pygpt_net/provider/agents/base.py +0 -0
  42. pygpt_net/provider/agents/llama_index/flow_from_schema.py +0 -0
  43. pygpt_net/provider/agents/llama_index/workflow/codeact.py +9 -6
  44. pygpt_net/provider/agents/llama_index/workflow/openai.py +38 -11
  45. pygpt_net/provider/agents/llama_index/workflow/planner.py +248 -28
  46. pygpt_net/provider/agents/llama_index/workflow/supervisor.py +60 -10
  47. pygpt_net/provider/agents/openai/agent.py +3 -1
  48. pygpt_net/provider/agents/openai/agent_b2b.py +17 -13
  49. pygpt_net/provider/agents/openai/agent_planner.py +617 -258
  50. pygpt_net/provider/agents/openai/agent_with_experts.py +4 -1
  51. pygpt_net/provider/agents/openai/agent_with_experts_feedback.py +8 -6
  52. pygpt_net/provider/agents/openai/agent_with_feedback.py +8 -6
  53. pygpt_net/provider/agents/openai/evolve.py +12 -8
  54. pygpt_net/provider/agents/openai/flow_from_schema.py +0 -0
  55. pygpt_net/provider/agents/openai/supervisor.py +292 -37
  56. pygpt_net/provider/api/openai/agents/response.py +1 -0
  57. pygpt_net/provider/api/x_ai/__init__.py +0 -0
  58. pygpt_net/provider/core/agent/__init__.py +0 -0
  59. pygpt_net/provider/core/agent/base.py +0 -0
  60. pygpt_net/provider/core/agent/json_file.py +0 -0
  61. pygpt_net/provider/core/config/patch.py +8 -0
  62. pygpt_net/provider/core/config/patches/patch_before_2_6_42.py +0 -0
  63. pygpt_net/provider/llms/base.py +0 -0
  64. pygpt_net/provider/llms/deepseek_api.py +0 -0
  65. pygpt_net/provider/llms/google.py +0 -0
  66. pygpt_net/provider/llms/hugging_face_api.py +0 -0
  67. pygpt_net/provider/llms/hugging_face_router.py +0 -0
  68. pygpt_net/provider/llms/mistral.py +0 -0
  69. pygpt_net/provider/llms/perplexity.py +0 -0
  70. pygpt_net/provider/llms/x_ai.py +0 -0
  71. pygpt_net/tools/agent_builder/tool.py +6 -0
  72. pygpt_net/tools/agent_builder/ui/dialogs.py +0 -41
  73. pygpt_net/ui/layout/toolbox/presets.py +14 -2
  74. pygpt_net/ui/main.py +2 -2
  75. pygpt_net/ui/widget/dialog/confirm.py +55 -5
  76. pygpt_net/ui/widget/draw/painter.py +90 -1
  77. pygpt_net/ui/widget/lists/preset.py +289 -25
  78. pygpt_net/ui/widget/node_editor/editor.py +53 -15
  79. pygpt_net/ui/widget/node_editor/node.py +82 -104
  80. pygpt_net/ui/widget/node_editor/view.py +4 -5
  81. pygpt_net/ui/widget/textarea/input.py +155 -21
  82. {pygpt_net-2.6.61.dist-info → pygpt_net-2.6.63.dist-info}/METADATA +22 -8
  83. {pygpt_net-2.6.61.dist-info → pygpt_net-2.6.63.dist-info}/RECORD +70 -70
  84. {pygpt_net-2.6.61.dist-info → pygpt_net-2.6.63.dist-info}/LICENSE +0 -0
  85. {pygpt_net-2.6.61.dist-info → pygpt_net-2.6.63.dist-info}/WHEEL +0 -0
  86. {pygpt_net-2.6.61.dist-info → pygpt_net-2.6.63.dist-info}/entry_points.txt +0 -0
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.08.24 03:00:00 #
9
+ # Updated Date: 2025.09.26 17:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from typing import Dict, Any, Tuple, Optional
@@ -123,6 +123,7 @@ class Agent(BaseAgent):
123
123
  agent_kwargs["handoffs"] = experts
124
124
 
125
125
  agent = self.get_agent(window, agent_kwargs)
126
+ ctx.set_agent_name(agent.name)
126
127
 
127
128
  kwargs = {
128
129
  "input": messages,
@@ -137,6 +138,7 @@ class Agent(BaseAgent):
137
138
  agent,
138
139
  **kwargs
139
140
  )
141
+ ctx.set_agent_name(agent.name)
140
142
  final_output, last_response_id = window.core.api.openai.responses.unpack_agent_response(result, ctx)
141
143
  response_id = result.last_response_id
142
144
  if verbose:
@@ -152,6 +154,7 @@ class Agent(BaseAgent):
152
154
  result.cancel()
153
155
  bridge.on_stop(ctx)
154
156
  break
157
+ ctx.set_agent_name(agent.name)
155
158
  final_output, response_id = handler.handle(event, ctx)
156
159
 
157
160
  return ctx, final_output, response_id
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.08.26 01:00:00 #
9
+ # Updated Date: 2025.09.26 17:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from dataclasses import dataclass
@@ -119,7 +119,7 @@ class Agent(BaseAgent):
119
119
  :return: Agent provider instance
120
120
  """
121
121
  kwargs = {
122
- "name": "evaluator",
122
+ "name": "Evaluator",
123
123
  "instructions": instructions,
124
124
  "model": window.core.agents.provider.get_openai_model(model),
125
125
  "output_type": EvaluationFeedback,
@@ -212,6 +212,7 @@ class Agent(BaseAgent):
212
212
  bridge.on_stop(ctx)
213
213
  break
214
214
 
215
+ ctx.set_agent_name(agent.name)
215
216
  result = await Runner.run(
216
217
  agent,
217
218
  **kwargs
@@ -259,6 +260,7 @@ class Agent(BaseAgent):
259
260
  handler = StreamHandler(window, bridge)
260
261
  while True:
261
262
  kwargs["input"] = input_items
263
+ ctx.set_agent_name(agent.name)
262
264
  result = Runner.run_streamed(
263
265
  agent,
264
266
  **kwargs
@@ -340,13 +342,13 @@ class Agent(BaseAgent):
340
342
  "type": "bool",
341
343
  "label": trans("agent.option.tools.local"),
342
344
  "description": trans("agent.option.tools.local.desc"),
343
- "default": False,
345
+ "default": True,
344
346
  },
345
347
  "allow_remote_tools": {
346
348
  "type": "bool",
347
349
  "label": trans("agent.option.tools.remote"),
348
350
  "description": trans("agent.option.tools.remote.desc"),
349
- "default": False,
351
+ "default": True,
350
352
  },
351
353
  }
352
354
  },
@@ -369,13 +371,13 @@ class Agent(BaseAgent):
369
371
  "type": "bool",
370
372
  "label": trans("agent.option.tools.local"),
371
373
  "description": trans("agent.option.tools.local.desc"),
372
- "default": False,
374
+ "default": True,
373
375
  },
374
376
  "allow_remote_tools": {
375
377
  "type": "bool",
376
378
  "label": trans("agent.option.tools.remote"),
377
379
  "description": trans("agent.option.tools.remote.desc"),
378
- "default": False,
380
+ "default": True,
379
381
  },
380
382
  }
381
383
  },
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.08.26 01:00:00 #
9
+ # Updated Date: 2025.09.26 17:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from dataclasses import dataclass
@@ -119,7 +119,7 @@ class Agent(BaseAgent):
119
119
  :return: Agent provider instance
120
120
  """
121
121
  kwargs = {
122
- "name": "evaluator",
122
+ "name": "Evaluator",
123
123
  "instructions": instructions,
124
124
  "model": window.core.agents.provider.get_openai_model(model),
125
125
  "output_type": EvaluationFeedback,
@@ -212,6 +212,7 @@ class Agent(BaseAgent):
212
212
  bridge.on_stop(ctx)
213
213
  break
214
214
 
215
+ ctx.set_agent_name(agent.name)
215
216
  result = await Runner.run(
216
217
  agent,
217
218
  **kwargs
@@ -259,6 +260,7 @@ class Agent(BaseAgent):
259
260
  handler = StreamHandler(window, bridge)
260
261
  while True:
261
262
  kwargs["input"] = input_items
263
+ ctx.set_agent_name(agent.name)
262
264
  result = Runner.run_streamed(
263
265
  agent,
264
266
  **kwargs
@@ -340,13 +342,13 @@ class Agent(BaseAgent):
340
342
  "type": "bool",
341
343
  "label": trans("agent.option.tools.local"),
342
344
  "description": trans("agent.option.tools.local.desc"),
343
- "default": False,
345
+ "default": True,
344
346
  },
345
347
  "allow_remote_tools": {
346
348
  "type": "bool",
347
349
  "label": trans("agent.option.tools.remote"),
348
350
  "description": trans("agent.option.tools.remote.desc"),
349
- "default": False,
351
+ "default": True,
350
352
  },
351
353
  }
352
354
  },
@@ -369,13 +371,13 @@ class Agent(BaseAgent):
369
371
  "type": "bool",
370
372
  "label": trans("agent.option.tools.local"),
371
373
  "description": trans("agent.option.tools.local.desc"),
372
- "default": False,
374
+ "default": True,
373
375
  },
374
376
  "allow_remote_tools": {
375
377
  "type": "bool",
376
378
  "label": trans("agent.option.tools.remote"),
377
379
  "description": trans("agent.option.tools.remote.desc"),
378
- "default": False,
380
+ "default": True,
379
381
  },
380
382
  }
381
383
  },
@@ -6,7 +6,7 @@
6
6
  # GitHub: https://github.com/szczyglis-dev/py-gpt #
7
7
  # MIT License #
8
8
  # Created By : Marcin Szczygliński #
9
- # Updated Date: 2025.08.26 01:00:00 #
9
+ # Updated Date: 2025.09.26 17:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import copy
@@ -131,7 +131,7 @@ class Agent(BaseAgent):
131
131
  :return: Agent provider instance
132
132
  """
133
133
  kwargs = {
134
- "name": "evaluator",
134
+ "name": "Evaluator",
135
135
  "instructions": instructions,
136
136
  "model": window.core.agents.provider.get_openai_model(model),
137
137
  "output_type": EvaluationFeedback,
@@ -330,6 +330,7 @@ class Agent(BaseAgent):
330
330
  choose_query = self.make_choose_query(results)
331
331
  choose_items.append(choose_query)
332
332
 
333
+ ctx.set_agent_name(chooser.name)
333
334
  chooser_result = await Runner.run(chooser, choose_items)
334
335
  result: ChooseFeedback = chooser_result.final_output
335
336
  choose = result.answer_number
@@ -347,6 +348,7 @@ class Agent(BaseAgent):
347
348
  bridge.on_stop(ctx)
348
349
  break
349
350
 
351
+ ctx.set_agent_name(evaluator.name)
350
352
  evaluator_result = await Runner.run(evaluator, input_items)
351
353
  result: EvaluationFeedback = evaluator_result.final_output
352
354
 
@@ -397,6 +399,7 @@ class Agent(BaseAgent):
397
399
  j = i + 1
398
400
  parent_kwargs = copy.deepcopy(kwargs)
399
401
  parent_kwargs["input"]: list[TResponseInputItem] = copy.deepcopy(input_items)
402
+ ctx.set_agent_name(f"{trans('agent.evolve.generation')} {num_generation}")
400
403
  results[j] = Runner.run_streamed(
401
404
  parents[j],
402
405
  **parent_kwargs
@@ -440,6 +443,7 @@ class Agent(BaseAgent):
440
443
  window.core.api.openai.responses.unpack_agent_response(results[choose], ctx)
441
444
  input_items = results[choose].to_input_list()
442
445
 
446
+ ctx.set_agent_name(evaluator.name)
443
447
  evaluator_result = await Runner.run(evaluator, input_items)
444
448
  result: EvaluationFeedback = evaluator_result.final_output
445
449
 
@@ -524,13 +528,13 @@ class Agent(BaseAgent):
524
528
  "type": "bool",
525
529
  "label": trans("agent.option.tools.local"),
526
530
  "description": trans("agent.option.tools.local.desc"),
527
- "default": False,
531
+ "default": True,
528
532
  },
529
533
  "allow_remote_tools": {
530
534
  "type": "bool",
531
535
  "label": trans("agent.option.tools.remote"),
532
536
  "description": trans("agent.option.tools.remote.desc"),
533
- "default": False,
537
+ "default": True,
534
538
  },
535
539
  }
536
540
  },
@@ -553,13 +557,13 @@ class Agent(BaseAgent):
553
557
  "type": "bool",
554
558
  "label": trans("agent.option.tools.local"),
555
559
  "description": trans("agent.option.tools.local.desc"),
556
- "default": False,
560
+ "default": True,
557
561
  },
558
562
  "allow_remote_tools": {
559
563
  "type": "bool",
560
564
  "label": trans("agent.option.tools.remote"),
561
565
  "description": trans("agent.option.tools.remote.desc"),
562
- "default": False,
566
+ "default": True,
563
567
  },
564
568
  }
565
569
  },
@@ -582,13 +586,13 @@ class Agent(BaseAgent):
582
586
  "type": "bool",
583
587
  "label": trans("agent.option.tools.local"),
584
588
  "description": trans("agent.option.tools.local.desc"),
585
- "default": False,
589
+ "default": True,
586
590
  },
587
591
  "allow_remote_tools": {
588
592
  "type": "bool",
589
593
  "label": trans("agent.option.tools.remote"),
590
594
  "description": trans("agent.option.tools.remote.desc"),
591
- "default": False,
595
+ "default": True,
592
596
  },
593
597
  }
594
598
  },
File without changes