pygpt-net 2.6.22__py3-none-any.whl → 2.6.24__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 (55) hide show
  1. pygpt_net/CHANGELOG.txt +16 -0
  2. pygpt_net/__init__.py +3 -3
  3. pygpt_net/controller/agent/llama.py +3 -0
  4. pygpt_net/controller/chat/response.py +6 -1
  5. pygpt_net/controller/files/files.py +24 -55
  6. pygpt_net/controller/theme/theme.py +3 -3
  7. pygpt_net/core/agents/observer/evaluation.py +2 -2
  8. pygpt_net/core/agents/runners/loop.py +1 -0
  9. pygpt_net/core/attachments/context.py +4 -4
  10. pygpt_net/core/bridge/bridge.py +2 -0
  11. pygpt_net/core/filesystem/opener.py +261 -0
  12. pygpt_net/core/filesystem/url.py +13 -10
  13. pygpt_net/core/idx/chat.py +1 -1
  14. pygpt_net/core/idx/indexing.py +3 -3
  15. pygpt_net/core/idx/llm.py +61 -2
  16. pygpt_net/core/platforms/platforms.py +5 -4
  17. pygpt_net/data/config/config.json +21 -3
  18. pygpt_net/data/config/models.json +3 -3
  19. pygpt_net/data/config/settings.json +18 -0
  20. pygpt_net/data/css/web-blocks.dark.css +7 -1
  21. pygpt_net/data/css/web-blocks.light.css +5 -2
  22. pygpt_net/data/css/web-chatgpt.dark.css +7 -1
  23. pygpt_net/data/css/web-chatgpt.light.css +3 -0
  24. pygpt_net/data/css/web-chatgpt_wide.dark.css +7 -1
  25. pygpt_net/data/css/web-chatgpt_wide.light.css +3 -0
  26. pygpt_net/data/locale/locale.de.ini +47 -0
  27. pygpt_net/data/locale/locale.en.ini +50 -1
  28. pygpt_net/data/locale/locale.es.ini +47 -0
  29. pygpt_net/data/locale/locale.fr.ini +47 -0
  30. pygpt_net/data/locale/locale.it.ini +47 -0
  31. pygpt_net/data/locale/locale.pl.ini +47 -0
  32. pygpt_net/data/locale/locale.uk.ini +47 -0
  33. pygpt_net/data/locale/locale.zh.ini +47 -0
  34. pygpt_net/provider/agents/llama_index/codeact_workflow.py +8 -7
  35. pygpt_net/provider/agents/llama_index/planner_workflow.py +11 -10
  36. pygpt_net/provider/agents/llama_index/supervisor_workflow.py +9 -8
  37. pygpt_net/provider/agents/openai/agent_b2b.py +30 -17
  38. pygpt_net/provider/agents/openai/agent_planner.py +29 -29
  39. pygpt_net/provider/agents/openai/agent_with_experts_feedback.py +21 -23
  40. pygpt_net/provider/agents/openai/agent_with_feedback.py +21 -23
  41. pygpt_net/provider/agents/openai/bot_researcher.py +25 -30
  42. pygpt_net/provider/agents/openai/evolve.py +37 -39
  43. pygpt_net/provider/agents/openai/supervisor.py +16 -18
  44. pygpt_net/provider/core/config/patch.py +20 -1
  45. pygpt_net/provider/llms/anthropic.py +5 -4
  46. pygpt_net/provider/llms/google.py +2 -2
  47. pygpt_net/ui/layout/toolbox/agent_llama.py +2 -3
  48. pygpt_net/ui/widget/tabs/layout.py +6 -4
  49. pygpt_net/ui/widget/tabs/output.py +348 -13
  50. pygpt_net/ui/widget/textarea/input.py +74 -8
  51. {pygpt_net-2.6.22.dist-info → pygpt_net-2.6.24.dist-info}/METADATA +34 -25
  52. {pygpt_net-2.6.22.dist-info → pygpt_net-2.6.24.dist-info}/RECORD +55 -54
  53. {pygpt_net-2.6.22.dist-info → pygpt_net-2.6.24.dist-info}/LICENSE +0 -0
  54. {pygpt_net-2.6.22.dist-info → pygpt_net-2.6.24.dist-info}/WHEEL +0 -0
  55. {pygpt_net-2.6.22.dist-info → pygpt_net-2.6.24.dist-info}/entry_points.txt +0 -0
@@ -72,7 +72,53 @@ action.use.read_cmd = Poproś o odczytanie tego pliku...
72
72
  action.video.open = Otwórz wideo lub audio...
73
73
  action.video.play = Odtwórz wideo lub audio...
74
74
  action.video.transcribe = Przepisz dźwięk...
75
+ agent.coder.additional.label = Dodatkowy prompt
76
+ agent.coder.additional.prompt.desc = Dodatkowy prompt dla agenta (zostanie dodany do podstawowego promptu)
77
+ agent.coder.base.label = Podstawowy prompt
78
+ agent.coder.base.prompt.desc = Wykonywanie kodu promptu (wstępny)
79
+ agent.eval.feedback = Feedback
80
+ agent.eval.next = Ponowne uruchomienie z feedbackiem
81
+ agent.eval.score = Ocena ewaluatora
82
+ agent.eval.score.good = Odpowiedź wystarczająco dobra, wychodzenie.
83
+ agent.evolve.generation = Generacja
84
+ agent.evolve.maxgen_limit = Osiągnięto maksymalną liczbę generacji, wychodzenie.
85
+ agent.evolve.option.max_generations = Maksymalna liczba generacji
86
+ agent.evolve.option.num_parents = Liczba rodziców
87
+ agent.evolve.running = Działający agent
88
+ agent.evolve.winner = Zwycięzca: agent
75
89
  agent.infinity.confirm.content = UWAGA: Próbujesz uruchomić nieskończoną pętlę! Może to spowodować intensywne zużycie tokenów. Czy na pewno chcesz kontynuować?
90
+ agent.name.supervisor = Supervisor
91
+ agent.name.worker = Worker
92
+ agent.option.model = Model
93
+ agent.option.name = Nazwa
94
+ agent.option.prompt = Prompt
95
+ agent.option.prompt.b1.desc = Prompt dla bota 1
96
+ agent.option.prompt.b2.desc = Prompt dla bota 2
97
+ agent.option.prompt.base.desc = Prompt dla agenta bazowego
98
+ agent.option.prompt.chooser.desc = Prompt dla agenta wybieracza
99
+ agent.option.prompt.feedback.desc = Prompt do ewaluacji feedbacku
100
+ agent.option.prompt.planner.desc = Prompt dla agenta planisty
101
+ agent.option.prompt.search.desc = Prompt dla agenta wyszukującego
102
+ agent.option.prompt.supervisor.desc = Prompt dla Supervisora
103
+ agent.option.prompt.worker.desc = Prompt dla Workera
104
+ agent.option.section.base = Agent bazowy
105
+ agent.option.section.chooser = Wybieracz
106
+ agent.option.section.feedback = Feedback
107
+ agent.option.section.planner = Planista
108
+ agent.option.section.search = Wyszukiwanie
109
+ agent.option.section.supervisor = Supervisor
110
+ agent.option.section.worker = Worker
111
+ agent.option.section.writer = Piszący
112
+ agent.option.tools.local = Pozwól na lokalne narzędzia
113
+ agent.option.tools.local.desc = Pozwól na użycie lokalnych narzędzi dla tego agenta
114
+ agent.option.tools.remote = Pozwól na zdalne narzędzia
115
+ agent.option.tools.remote.desc = Pozwól na użycie zdalnych narzędzi dla tego agenta
116
+ agent.planner.plan.label = Planista (wstępny)
117
+ agent.planner.plan.prompt.desc = Wstępny prompt planu
118
+ agent.planner.refine.label = Planista (refine)
119
+ agent.planner.refine.prompt.desc = Refine prompt planu
120
+ agent.planner.step.label = Wykonaj prompt
121
+ agent.planner.step.prompt.desc = Wykonywanie kroków promptu
76
122
  alert.preset.empty_id = Podanie nazwy jest wymagane.
77
123
  alert.preset.no_chat_completion = Przynajmniej jedna opcja: czat, completion, obraz albo wizja jest wymagana!
78
124
  alert.snap.file_manager = Uruchomiono za pomocą Snap-a. Proszę otworzyć katalog manualnie za pomocą przeglądarki plików:
@@ -113,6 +159,7 @@ attachments.auto_index = Auto-indeksacja przy przesyłaniu
113
159
  attachments.btn.add = Dodaj plik
114
160
  attachments.btn.add_url = Sieć
115
161
  attachments.btn.clear = Wyczyść
162
+ attachments.btn.input.add = Dodaj załącznik
116
163
  attachments.capture_clear = Wyczyść przy przechwytywaniu
117
164
  attachments.clear.confirm = Wyczyścić listę plików?
118
165
  attachments.ctx.indexed = Tak
@@ -72,7 +72,53 @@ action.use.read_cmd = Попросіть прочитати цей файл...
72
72
  action.video.open = Відкрити відео або аудіо...
73
73
  action.video.play = Відтворити відео або аудіо...
74
74
  action.video.transcribe = Транскрибувати аудіо...
75
+ agent.coder.additional.label = Додаткова підказка
76
+ agent.coder.additional.prompt.desc = Додаткова підказка для агента (буде додано до базової підказки)
77
+ agent.coder.base.label = Базова підказка
78
+ agent.coder.base.prompt.desc = Виконання коду підказки (початковий)
79
+ agent.eval.feedback = Відгук
80
+ agent.eval.next = Повторне виконання з відгуком
81
+ agent.eval.score = Оцінка оцінювача
82
+ agent.eval.score.good = Відповідь достатньо добра, вихід.
83
+ agent.evolve.generation = Покоління
84
+ agent.evolve.maxgen_limit = Досягнуто максимуму поколінь, вихід.
85
+ agent.evolve.option.max_generations = Максимум поколінь
86
+ agent.evolve.option.num_parents = Кількість батьків
87
+ agent.evolve.running = Агент працює
88
+ agent.evolve.winner = Переможець: агент
75
89
  agent.infinity.confirm.content = ПОПЕРЕДЖЕННЯ: Ви намагаєтеся запустити нескінченний цикл! Це може призвести до інтенсивного використання токенів. Ви впевнені, що хочете продовжити?
90
+ agent.name.supervisor = Супервізор
91
+ agent.name.worker = Працiвник
92
+ agent.option.model = Модель
93
+ agent.option.name = Ім'я
94
+ agent.option.prompt = Підказка
95
+ agent.option.prompt.b1.desc = Підказка для бота 1
96
+ agent.option.prompt.b2.desc = Підказка для бота 2
97
+ agent.option.prompt.base.desc = Підказка для базового агента
98
+ agent.option.prompt.chooser.desc = Підказка для виборчого агента
99
+ agent.option.prompt.feedback.desc = Підказка для оцінки відгуків
100
+ agent.option.prompt.planner.desc = Підказка для планувального агента
101
+ agent.option.prompt.search.desc = Підказка для пошукового агента
102
+ agent.option.prompt.supervisor.desc = Підказка для супервізора
103
+ agent.option.prompt.worker.desc = Підказка для працівника
104
+ agent.option.section.base = Базовий агент
105
+ agent.option.section.chooser = Вибирач
106
+ agent.option.section.feedback = Відгук
107
+ agent.option.section.planner = Планувальник
108
+ agent.option.section.search = Пошук
109
+ agent.option.section.supervisor = Супервізор
110
+ agent.option.section.worker = Працівник
111
+ agent.option.section.writer = Письменник
112
+ agent.option.tools.local = Дозволити локальні інструменти
113
+ agent.option.tools.local.desc = Дозволити використання локальних інструментів для цього агента
114
+ agent.option.tools.remote = Дозволити віддалені інструменти
115
+ agent.option.tools.remote.desc = Дозволити використання віддалених інструментів для цього агента
116
+ agent.planner.plan.label = Планувальник (початковий)
117
+ agent.planner.plan.prompt.desc = Початкова підказка плану
118
+ agent.planner.refine.label = Планувальник (уточнення)
119
+ agent.planner.refine.prompt.desc = Уточнення підказки плану
120
+ agent.planner.step.label = Виконати підказку
121
+ agent.planner.step.prompt.desc = Кроки виконання підказки
76
122
  alert.preset.empty_id = Назва є обов'язковою.
77
123
  alert.preset.no_chat_completion = Потрібно хоча б одне з: чат, завершення, зображення або візуальна опція!
78
124
  alert.snap.file_manager = Виявлено Snap. Будь ласка, відкрийте директорію вручну у вашому файловому менеджері:
@@ -113,6 +159,7 @@ attachments.auto_index = Автоматичне індексування при
113
159
  attachments.btn.add = Додати файл
114
160
  attachments.btn.add_url = Веб
115
161
  attachments.btn.clear = Очистити файли
162
+ attachments.btn.input.add = Додати вкладення
116
163
  attachments.capture_clear = Очистити під час захоплення
117
164
  attachments.clear.confirm = Очистити список?
118
165
  attachments.ctx.indexed = Так
@@ -72,7 +72,53 @@ action.use.read_cmd = 請求讀取此文件...
72
72
  action.video.open = 打开视频或音频...
73
73
  action.video.play = 播放视频或音频...
74
74
  action.video.transcribe = 转录音频...
75
+ agent.coder.additional.label = 额外提示
76
+ agent.coder.additional.prompt.desc = 代理的额外提示(将添加到基础提示)
77
+ agent.coder.base.label = 基础提示
78
+ agent.coder.base.prompt.desc = 代码执行提示(初始)
79
+ agent.eval.feedback = 反馈
80
+ agent.eval.next = 重新运行并反馈
81
+ agent.eval.score = 评估分数
82
+ agent.eval.score.good = 响应足够好,退出。
83
+ agent.evolve.generation = 代
84
+ agent.evolve.maxgen_limit = 达到最大代数,退出。
85
+ agent.evolve.option.max_generations = 最大代数
86
+ agent.evolve.option.num_parents = 父母数量
87
+ agent.evolve.running = 运行中代理
88
+ agent.evolve.winner = 胜者:代理
75
89
  agent.infinity.confirm.content = 警告:您正在嘗試運行無限循環!這可能會導致大量令牌使用。您確定要繼續嗎?
90
+ agent.name.supervisor = 监督者
91
+ agent.name.worker = 工作者
92
+ agent.option.model = 模型
93
+ agent.option.name = 名称
94
+ agent.option.prompt = 提示
95
+ agent.option.prompt.b1.desc = 机器人1的提示
96
+ agent.option.prompt.b2.desc = 机器人2的提示
97
+ agent.option.prompt.base.desc = 基础代理的提示
98
+ agent.option.prompt.chooser.desc = 选择器代理的提示
99
+ agent.option.prompt.feedback.desc = 反馈评估提示
100
+ agent.option.prompt.planner.desc = 规划代理的提示
101
+ agent.option.prompt.search.desc = 搜索代理的提示
102
+ agent.option.prompt.supervisor.desc = 监督者的提示
103
+ agent.option.prompt.worker.desc = 工作者的提示
104
+ agent.option.section.base = 基础代理
105
+ agent.option.section.chooser = 选择器
106
+ agent.option.section.feedback = 反馈
107
+ agent.option.section.planner = 规划者
108
+ agent.option.section.search = 搜索
109
+ agent.option.section.supervisor = 监督者
110
+ agent.option.section.worker = 工作者
111
+ agent.option.section.writer = 写作者
112
+ agent.option.tools.local = 允许本地工具
113
+ agent.option.tools.local.desc = 允许该代理使用本地工具
114
+ agent.option.tools.remote = 允许远程工具
115
+ agent.option.tools.remote.desc = 允许该代理使用远程工具
116
+ agent.planner.plan.label = 规划者(初始)
117
+ agent.planner.plan.prompt.desc = 初始计划提示
118
+ agent.planner.refine.label = 规划者(精炼)
119
+ agent.planner.refine.prompt.desc = 计划精炼提示
120
+ agent.planner.step.label = 执行提示
121
+ agent.planner.step.prompt.desc = 执行步骤提示
76
122
  alert.preset.empty_id = 名稱是必需的。
77
123
  alert.preset.no_chat_completion = 至少需要一個:聊天、完成、圖像或視覺選項!
78
124
  alert.snap.file_manager = 檢測到快照。請在文件管理器中手動打開目錄:
@@ -113,6 +159,7 @@ attachments.auto_index = 上传时自动索引
113
159
  attachments.btn.add = 添加文件
114
160
  attachments.btn.add_url = 网络
115
161
  attachments.btn.clear = 清除文件
162
+ attachments.btn.input.add = 添加附件
116
163
  attachments.capture_clear = 捕獲後清除
117
164
  attachments.clear.confirm = 清除列表?
118
165
  attachments.ctx.indexed = 是
@@ -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.14 03:00:00 #
9
+ # Updated Date: 2025.08.26 01:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from typing import Dict, Any
@@ -16,6 +16,7 @@ from pygpt_net.core.types import (
16
16
  AGENT_MODE_WORKFLOW,
17
17
  AGENT_TYPE_LLAMA,
18
18
  )
19
+ from pygpt_net.utils import trans
19
20
 
20
21
  from .workflow.codeact import DEFAULT_CODE_ACT_PROMPT
21
22
  from ..base import BaseAgent
@@ -71,23 +72,23 @@ class CodeActAgent(BaseAgent):
71
72
  """
72
73
  return {
73
74
  "base": {
74
- "label": "Base prompt",
75
+ "label": trans("agent.coder.base.label"),
75
76
  "options": {
76
77
  "prompt": {
77
78
  "type": "textarea",
78
- "label": "Prompt",
79
- "description": "Code execute prompt (initial)",
79
+ "label": trans("agent.option.prompt"),
80
+ "description": trans("agent.coder.base.prompt.desc"),
80
81
  "default": DEFAULT_CODE_ACT_PROMPT,
81
82
  },
82
83
  }
83
84
  },
84
85
  "additional": {
85
- "label": "Additional prompt",
86
+ "label": trans("agent.coder.additional.label"),
86
87
  "options": {
87
88
  "prompt": {
88
89
  "type": "textarea",
89
- "label": "Prompt",
90
- "description": "Additional prompt for agent (will be added to the base prompt)",
90
+ "label": trans("agent.option.prompt"),
91
+ "description": trans("agent.coder.additional.prompt.desc"),
91
92
  "default": "",
92
93
  },
93
94
  }
@@ -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.14 03:00:00 #
9
+ # Updated Date: 2025.08.26 01:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from typing import Dict, Any, List
@@ -19,6 +19,7 @@ from pygpt_net.core.types import (
19
19
  from llama_index.core.llms.llm import LLM
20
20
  from llama_index.core.tools.types import BaseTool
21
21
 
22
+ from pygpt_net.utils import trans
22
23
  from .workflow.planner import (
23
24
  DEFAULT_INITIAL_PLAN_PROMPT,
24
25
  DEFAULT_PLAN_REFINE_PROMPT,
@@ -80,34 +81,34 @@ class PlannerAgent(BaseAgent):
80
81
  """
81
82
  return {
82
83
  "step": {
83
- "label": "Execute prompt",
84
+ "label": trans("agent.planner.step.label"),
84
85
  "options": {
85
86
  "prompt": {
86
87
  "type": "textarea",
87
- "label": "Prompt",
88
- "description": "Steps execute prompt",
88
+ "label": trans("agent.option.prompt"),
89
+ "description": trans("agent.planner.step.prompt.desc"),
89
90
  "default": DEFAULT_EXECUTE_PROMPT,
90
91
  },
91
92
  }
92
93
  },
93
94
  "plan": {
94
- "label": "Planner (initial))",
95
+ "label": trans("agent.planner.plan.label"),
95
96
  "options": {
96
97
  "prompt": {
97
98
  "type": "textarea",
98
- "label": "Prompt",
99
- "description": "Initial plan prompt",
99
+ "label": trans("agent.option.prompt"),
100
+ "description": trans("agent.planner.plan.prompt.desc"),
100
101
  "default": DEFAULT_INITIAL_PLAN_PROMPT,
101
102
  },
102
103
  }
103
104
  },
104
105
  "plan_refine": {
105
- "label": "Planner (refine)",
106
+ "label": trans("agent.planner.refine.label"),
106
107
  "options": {
107
108
  "prompt": {
108
109
  "type": "textarea",
109
- "label": "Prompt",
110
- "description": "Plan refine prompt",
110
+ "label": trans("agent.option.prompt"),
111
+ "description": trans("agent.planner.refine.prompt.desc"),
111
112
  "default": DEFAULT_PLAN_REFINE_PROMPT,
112
113
  },
113
114
  }
@@ -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.17 02:00:00 #
9
+ # Updated Date: 2025.08.26 01:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from typing import Dict, Any, List
@@ -19,6 +19,7 @@ from pygpt_net.core.types import (
19
19
  from llama_index.core.llms.llm import LLM
20
20
  from llama_index.core.tools.types import BaseTool
21
21
 
22
+ from pygpt_net.utils import trans
22
23
  from .workflow.supervisor import (
23
24
  get_workflow,
24
25
  SUPERVISOR_PROMPT,
@@ -86,29 +87,29 @@ class SupervisorAgent(BaseAgent):
86
87
  """
87
88
  return {
88
89
  "supervisor": {
89
- "label": "Supervisor",
90
+ "label": trans("agent.option.section.supervisor"),
90
91
  "options": {
91
92
  "prompt": {
92
93
  "type": "textarea",
93
- "label": "Prompt",
94
- "description": "Prompt for supervisor",
94
+ "label": trans("agent.option.prompt"),
95
+ "description": trans("agent.option.prompt.supervisor.desc"),
95
96
  "default": SUPERVISOR_PROMPT,
96
97
  },
97
98
  }
98
99
  },
99
100
  "worker": {
100
- "label": "Worker",
101
+ "label": trans("agent.option.section.worker"),
101
102
  "options": {
102
103
  "model": {
103
- "label": "Model",
104
+ "label": trans("agent.option.model"),
104
105
  "type": "combo",
105
106
  "use": "models",
106
107
  "default": "gpt-4o",
107
108
  },
108
109
  "prompt": {
109
110
  "type": "textarea",
110
- "label": "Prompt",
111
- "description": "Prompt for worker",
111
+ "label": trans("agent.option.prompt"),
112
+ "description": trans("agent.option.prompt.worker.desc"),
112
113
  "default": WORKER_PROMPT,
113
114
  },
114
115
  }
@@ -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.08.26 01:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  import copy
@@ -31,6 +31,7 @@ from pygpt_net.item.preset import PresetItem
31
31
 
32
32
  from pygpt_net.provider.gpt.agents.remote_tools import append_tools
33
33
  from pygpt_net.provider.gpt.agents.response import StreamHandler
34
+ from pygpt_net.utils import trans
34
35
 
35
36
  from ..base import BaseAgent
36
37
  from ...gpt.agents.experts import get_experts
@@ -73,7 +74,7 @@ class Agent(BaseAgent):
73
74
  id = kwargs.get("bot_id", 1)
74
75
  option_key = f"bot_{id}"
75
76
  kwargs = {
76
- "name": "Bot {}".format(id),
77
+ "name": self.get_option(preset, option_key, "name"),
77
78
  "instructions": self.get_option(preset, option_key, "prompt"),
78
79
  "model": window.core.agents.provider.get_openai_model(model),
79
80
  }
@@ -226,6 +227,7 @@ class Agent(BaseAgent):
226
227
  tools=tools,
227
228
  )
228
229
 
230
+ bot_1_name = self.get_option(preset, "bot_1", "name")
229
231
  bot_1_kwargs = copy.deepcopy(agent_kwargs)
230
232
  bot_2_kwargs = copy.deepcopy(agent_kwargs)
231
233
 
@@ -239,6 +241,7 @@ class Agent(BaseAgent):
239
241
  if model_name_2:
240
242
  model_2 = window.core.models.get(model_name_2)
241
243
  bot_2_kwargs["model"] = model_2
244
+ bot_2_name = self.get_option(preset, "bot_2", "name")
242
245
  bot_2_kwargs["bot_id"] = 2
243
246
  if experts:
244
247
  bot_2_kwargs["handoffs"] = experts
@@ -334,7 +337,7 @@ class Agent(BaseAgent):
334
337
  handler.reset()
335
338
 
336
339
  # bot 1 title
337
- title = "\n\n**Bot 1**\n\n"
340
+ title = f"\n\n**{bot_1_name}**\n\n"
338
341
  ctx.stream = title
339
342
  bridge.on_step(ctx, begin)
340
343
  begin = False
@@ -380,7 +383,7 @@ class Agent(BaseAgent):
380
383
  handler.reset()
381
384
 
382
385
  # bot 2 title
383
- title = "\n\n**Bot 2**\n\n"
386
+ title = f"\n\n**{bot_2_name}**\n\n"
384
387
  ctx.stream = title
385
388
  bridge.on_step(ctx, False)
386
389
  if not use_partial_ctx:
@@ -427,22 +430,27 @@ class Agent(BaseAgent):
427
430
  "bot_1": {
428
431
  "label": "Bot 1",
429
432
  "options": {
433
+ "name": {
434
+ "type": "text",
435
+ "label": trans("agent.option.name"),
436
+ "default": "Bot 1",
437
+ },
430
438
  "prompt": {
431
439
  "type": "textarea",
432
- "label": "Prompt",
433
- "description": "Prompt for bot 1",
440
+ "label": trans("agent.option.prompt"),
441
+ "description": trans("agent.option.prompt.b1.desc"),
434
442
  "default": self.PROMPT_BOT_1,
435
443
  },
436
444
  "allow_local_tools": {
437
445
  "type": "bool",
438
- "label": "Allow local tools",
439
- "description": "Allow usage of local tools for this agent",
446
+ "label": trans("agent.option.tools.local"),
447
+ "description": trans("agent.option.tools.local.desc"),
440
448
  "default": False,
441
449
  },
442
450
  "allow_remote_tools": {
443
451
  "type": "bool",
444
- "label": "Allow remote tools",
445
- "description": "Allow usage of remote tools for this agent",
452
+ "label": trans("agent.option.tools.remote"),
453
+ "description": trans("agent.option.tools.remote.desc"),
446
454
  "default": False,
447
455
  },
448
456
  }
@@ -450,28 +458,33 @@ class Agent(BaseAgent):
450
458
  "bot_2": {
451
459
  "label": "Bot 2",
452
460
  "options": {
461
+ "name": {
462
+ "type": "text",
463
+ "label": trans("agent.option.name"),
464
+ "default": "Bot 2",
465
+ },
453
466
  "model": {
454
- "label": "Model",
467
+ "label": trans("agent.option.model"),
455
468
  "type": "combo",
456
469
  "use": "models",
457
470
  "default": "gpt-4o",
458
471
  },
459
472
  "prompt": {
460
473
  "type": "textarea",
461
- "label": "Prompt",
462
- "description": "Prompt for bot 2",
474
+ "label": trans("agent.option.prompt"),
475
+ "description": trans("agent.option.prompt.b2.desc"),
463
476
  "default": self.PROMPT_BOT_2,
464
477
  },
465
478
  "allow_local_tools": {
466
479
  "type": "bool",
467
- "label": "Allow local tools",
468
- "description": "Allow usage of local tools for this agent",
480
+ "label": trans("agent.option.tools.local"),
481
+ "description": trans("agent.option.tools.local.desc"),
469
482
  "default": False,
470
483
  },
471
484
  "allow_remote_tools": {
472
485
  "type": "bool",
473
- "label": "Allow remote tools",
474
- "description": "Allow usage of remote tools for this agent",
486
+ "label": trans("agent.option.tools.remote"),
487
+ "description": trans("agent.option.tools.remote.desc"),
475
488
  "default": False,
476
489
  },
477
490
  }
@@ -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.08.26 01:00:00 #
10
10
  # ================================================== #
11
11
 
12
12
  from dataclasses import dataclass
@@ -16,7 +16,6 @@ from agents import (
16
16
  Agent as OpenAIAgent,
17
17
  Runner,
18
18
  RunConfig,
19
- ModelSettings,
20
19
  TResponseInputItem,
21
20
  )
22
21
 
@@ -32,8 +31,9 @@ from pygpt_net.item.model import ModelItem
32
31
  from pygpt_net.item.preset import PresetItem
33
32
 
34
33
  from pygpt_net.provider.gpt.agents.client import get_custom_model_provider, set_openai_env
35
- from pygpt_net.provider.gpt.agents.remote_tools import get_remote_tools, is_computer_tool, append_tools
34
+ from pygpt_net.provider.gpt.agents.remote_tools import append_tools
36
35
  from pygpt_net.provider.gpt.agents.response import StreamHandler
36
+ from pygpt_net.utils import trans
37
37
 
38
38
  from ..base import BaseAgent
39
39
  from ...gpt.agents.experts import get_experts
@@ -390,9 +390,9 @@ class Agent(BaseAgent):
390
390
  evaluator_result = await Runner.run(evaluator, input_items)
391
391
  result: EvaluationFeedback = evaluator_result.final_output
392
392
 
393
- info = f"\n___\n**Evaluator score: {result.score}**\n\n"
393
+ info = f"\n___\n**{trans('agent.eval.score')}: {result.score}**\n\n"
394
394
  if result.score == "pass":
395
- info += "\n\n**Response is good enough, exiting.**\n"
395
+ info += f"\n\n**{trans('agent.eval.score.good')}**\n"
396
396
  if use_partial_ctx:
397
397
  ctx = bridge.on_next_ctx(
398
398
  ctx=ctx,
@@ -408,7 +408,7 @@ class Agent(BaseAgent):
408
408
  final_output += info
409
409
  break
410
410
 
411
- info += "\n\n**Re-running with feedback**\n\n" + f"Feedback: {result.feedback}\n___\n"
411
+ info += f"\n\n**{trans('agent.eval.next')}**\n\nFeedback: {result.feedback}\n___\n"
412
412
  input_items.append({"content": f"Feedback: {result.feedback}", "role": "user"})
413
413
 
414
414
  if use_partial_ctx:
@@ -436,82 +436,82 @@ class Agent(BaseAgent):
436
436
  """
437
437
  return {
438
438
  "base": {
439
- "label": "Base agent",
439
+ "label": trans("agent.option.section.base"),
440
440
  "options": {
441
441
  "prompt": {
442
442
  "type": "textarea",
443
- "label": "Prompt",
444
- "description": "Prompt for base agent",
443
+ "label": trans("agent.option.prompt"),
444
+ "description": trans("agent.option.prompt.base.desc"),
445
445
  "default": self.PROMPT,
446
446
  },
447
447
  "allow_local_tools": {
448
448
  "type": "bool",
449
- "label": "Allow local tools",
450
- "description": "Allow usage of local tools for this agent",
449
+ "label": trans("agent.option.tools.local"),
450
+ "description": trans("agent.option.tools.local.desc"),
451
451
  "default": False,
452
452
  },
453
453
  "allow_remote_tools": {
454
454
  "type": "bool",
455
- "label": "Allow remote tools",
456
- "description": "Allow usage of remote tools for this agent",
455
+ "label": trans("agent.option.tools.remote"),
456
+ "description": trans("agent.option.tools.remote.desc"),
457
457
  "default": False,
458
458
  },
459
459
  }
460
460
  },
461
461
  "planner": {
462
- "label": "Planner",
462
+ "label": trans("agent.option.section.planner"),
463
463
  "options": {
464
464
  "model": {
465
- "label": "Model",
465
+ "label": trans("agent.option.model"),
466
466
  "type": "combo",
467
467
  "use": "models",
468
468
  "default": "o3-mini-low",
469
469
  },
470
470
  "prompt": {
471
471
  "type": "textarea",
472
- "label": "Prompt",
473
- "description": "Prompt for planner agent",
472
+ "label": trans("agent.option.prompt"),
473
+ "description": trans("agent.option.prompt.planner.desc"),
474
474
  "default": self.PROMPT_PLANNER,
475
475
  },
476
476
  "allow_local_tools": {
477
477
  "type": "bool",
478
- "label": "Allow local tools",
479
- "description": "Allow usage of local tools for planner agent",
478
+ "label": trans("agent.option.tools.local"),
479
+ "description": trans("agent.option.tools.local.desc"),
480
480
  "default": False,
481
481
  },
482
482
  "allow_remote_tools": {
483
483
  "type": "bool",
484
- "label": "Allow remote tools",
485
- "description": "Allow usage of remote tools for planner agent",
484
+ "label": trans("agent.option.tools.remote"),
485
+ "description": trans("agent.option.tools.remote.desc"),
486
486
  "default": False,
487
487
  },
488
488
  }
489
489
  },
490
490
  "feedback": {
491
- "label": "Feedback",
491
+ "label": trans("agent.option.section.feedback"),
492
492
  "options": {
493
493
  "model": {
494
- "label": "Model",
494
+ "label": trans("agent.option.model"),
495
495
  "type": "combo",
496
496
  "use": "models",
497
497
  "default": "gpt-4o",
498
498
  },
499
499
  "prompt": {
500
500
  "type": "textarea",
501
- "label": "Prompt",
502
- "description": "Prompt for feedback evaluation",
501
+ "label": trans("agent.option.prompt"),
502
+ "description": trans("agent.option.prompt.feedback.desc"),
503
503
  "default": self.PROMPT_FEEDBACK,
504
504
  },
505
505
  "allow_local_tools": {
506
506
  "type": "bool",
507
- "label": "Allow local tools",
508
- "description": "Allow usage of local tools for this agent",
507
+ "label": trans("agent.option.tools.local"),
508
+ "description": trans("agent.option.tools.local.desc"),
509
509
  "default": False,
510
510
  },
511
511
  "allow_remote_tools": {
512
512
  "type": "bool",
513
- "label": "Allow remote tools",
514
- "description": "Allow usage of remote tools for this agent",
513
+ "label": trans("agent.option.tools.remote"),
514
+ "description": trans("agent.option.tools.remote.desc"),
515
515
  "default": False,
516
516
  },
517
517
  }