waldiez 0.6.0__py3-none-any.whl → 0.6.1__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.
Potentially problematic release.
This version of waldiez might be problematic. Click here for more details.
- waldiez/__init__.py +1 -1
- waldiez/_version.py +1 -1
- waldiez/cli.py +18 -7
- waldiez/cli_extras/jupyter.py +3 -0
- waldiez/cli_extras/runner.py +3 -1
- waldiez/cli_extras/studio.py +3 -1
- waldiez/exporter.py +9 -3
- waldiez/exporting/agent/exporter.py +9 -10
- waldiez/exporting/agent/extras/captain_agent_extras.py +6 -6
- waldiez/exporting/agent/extras/doc_agent_extras.py +6 -6
- waldiez/exporting/agent/extras/group_manager_agent_extas.py +34 -23
- waldiez/exporting/agent/extras/group_member_extras.py +6 -5
- waldiez/exporting/agent/extras/handoffs/after_work.py +1 -1
- waldiez/exporting/agent/extras/handoffs/available.py +1 -1
- waldiez/exporting/agent/extras/handoffs/condition.py +3 -2
- waldiez/exporting/agent/extras/handoffs/handoff.py +1 -1
- waldiez/exporting/agent/extras/handoffs/target.py +6 -4
- waldiez/exporting/agent/extras/rag/chroma_extras.py +27 -19
- waldiez/exporting/agent/extras/rag/mongo_extras.py +8 -8
- waldiez/exporting/agent/extras/rag/pgvector_extras.py +5 -5
- waldiez/exporting/agent/extras/rag/qdrant_extras.py +5 -4
- waldiez/exporting/agent/extras/rag/vector_db_extras.py +1 -1
- waldiez/exporting/agent/extras/rag_user_proxy_agent_extras.py +5 -7
- waldiez/exporting/agent/extras/reasoning_agent_extras.py +3 -5
- waldiez/exporting/chats/exporter.py +4 -4
- waldiez/exporting/chats/processor.py +1 -2
- waldiez/exporting/chats/utils/common.py +89 -48
- waldiez/exporting/chats/utils/group.py +9 -9
- waldiez/exporting/chats/utils/nested.py +7 -7
- waldiez/exporting/chats/utils/sequential.py +1 -1
- waldiez/exporting/chats/utils/single.py +2 -2
- waldiez/exporting/core/content.py +7 -7
- waldiez/exporting/core/context.py +5 -3
- waldiez/exporting/core/exporter.py +5 -3
- waldiez/exporting/core/exporters.py +2 -2
- waldiez/exporting/core/extras/agent_extras/captain_extras.py +2 -2
- waldiez/exporting/core/extras/agent_extras/group_manager_extras.py +2 -2
- waldiez/exporting/core/extras/agent_extras/rag_user_extras.py +2 -2
- waldiez/exporting/core/extras/agent_extras/standard_extras.py +3 -8
- waldiez/exporting/core/extras/base.py +7 -5
- waldiez/exporting/core/extras/flow_extras.py +4 -5
- waldiez/exporting/core/extras/model_extras.py +2 -2
- waldiez/exporting/core/extras/path_resolver.py +1 -2
- waldiez/exporting/core/extras/serializer.py +2 -2
- waldiez/exporting/core/protocols.py +6 -5
- waldiez/exporting/core/result.py +25 -28
- waldiez/exporting/core/types.py +10 -10
- waldiez/exporting/core/utils/llm_config.py +2 -2
- waldiez/exporting/core/validation.py +10 -11
- waldiez/exporting/flow/execution_generator.py +98 -10
- waldiez/exporting/flow/exporter.py +2 -2
- waldiez/exporting/flow/factory.py +2 -2
- waldiez/exporting/flow/file_generator.py +4 -2
- waldiez/exporting/flow/merger.py +5 -3
- waldiez/exporting/flow/orchestrator.py +72 -2
- waldiez/exporting/flow/utils/common.py +5 -5
- waldiez/exporting/flow/utils/importing.py +6 -7
- waldiez/exporting/flow/utils/linting.py +25 -9
- waldiez/exporting/flow/utils/logging.py +2 -2
- waldiez/exporting/models/exporter.py +8 -8
- waldiez/exporting/models/processor.py +5 -5
- waldiez/exporting/tools/exporter.py +2 -2
- waldiez/exporting/tools/processor.py +7 -4
- waldiez/io/__init__.py +8 -4
- waldiez/io/_ws.py +10 -6
- waldiez/io/models/constants.py +10 -10
- waldiez/io/models/content/audio.py +1 -0
- waldiez/io/models/content/base.py +20 -18
- waldiez/io/models/content/file.py +1 -0
- waldiez/io/models/content/image.py +1 -0
- waldiez/io/models/content/text.py +1 -0
- waldiez/io/models/content/video.py +1 -0
- waldiez/io/models/user_input.py +10 -5
- waldiez/io/models/user_response.py +17 -16
- waldiez/io/mqtt.py +18 -31
- waldiez/io/redis.py +18 -22
- waldiez/io/structured.py +52 -53
- waldiez/io/utils.py +3 -0
- waldiez/io/ws.py +5 -1
- waldiez/logger.py +16 -3
- waldiez/models/agents/__init__.py +3 -0
- waldiez/models/agents/agent/agent.py +23 -16
- waldiez/models/agents/agent/agent_data.py +25 -22
- waldiez/models/agents/agent/code_execution.py +9 -11
- waldiez/models/agents/agent/termination_message.py +10 -12
- waldiez/models/agents/agent/update_system_message.py +2 -4
- waldiez/models/agents/agents.py +8 -8
- waldiez/models/agents/assistant/assistant.py +6 -3
- waldiez/models/agents/assistant/assistant_data.py +2 -2
- waldiez/models/agents/captain/captain_agent.py +7 -4
- waldiez/models/agents/captain/captain_agent_data.py +5 -7
- waldiez/models/agents/doc_agent/doc_agent.py +7 -4
- waldiez/models/agents/doc_agent/doc_agent_data.py +9 -10
- waldiez/models/agents/doc_agent/rag_query_engine.py +10 -12
- waldiez/models/agents/extra_requirements.py +3 -3
- waldiez/models/agents/group_manager/group_manager.py +12 -7
- waldiez/models/agents/group_manager/group_manager_data.py +13 -12
- waldiez/models/agents/group_manager/speakers.py +17 -19
- waldiez/models/agents/rag_user_proxy/rag_user_proxy.py +7 -4
- waldiez/models/agents/rag_user_proxy/rag_user_proxy_data.py +4 -1
- waldiez/models/agents/rag_user_proxy/retrieve_config.py +69 -63
- waldiez/models/agents/rag_user_proxy/vector_db_config.py +19 -19
- waldiez/models/agents/reasoning/reasoning_agent.py +7 -4
- waldiez/models/agents/reasoning/reasoning_agent_data.py +3 -2
- waldiez/models/agents/reasoning/reasoning_agent_reason_config.py +8 -8
- waldiez/models/agents/user_proxy/user_proxy.py +6 -3
- waldiez/models/agents/user_proxy/user_proxy_data.py +1 -1
- waldiez/models/chat/chat.py +27 -20
- waldiez/models/chat/chat_data.py +22 -19
- waldiez/models/chat/chat_message.py +9 -9
- waldiez/models/chat/chat_nested.py +9 -9
- waldiez/models/chat/chat_summary.py +6 -6
- waldiez/models/common/__init__.py +2 -0
- waldiez/models/common/ag2_version.py +2 -0
- waldiez/models/common/dict_utils.py +8 -6
- waldiez/models/common/handoff.py +18 -17
- waldiez/models/common/method_utils.py +7 -7
- waldiez/models/common/naming.py +49 -0
- waldiez/models/flow/flow.py +11 -6
- waldiez/models/flow/flow_data.py +23 -17
- waldiez/models/flow/info.py +3 -3
- waldiez/models/flow/naming.py +2 -1
- waldiez/models/model/_aws.py +11 -13
- waldiez/models/model/_llm.py +5 -0
- waldiez/models/model/_price.py +2 -4
- waldiez/models/model/extra_requirements.py +1 -3
- waldiez/models/model/model.py +2 -2
- waldiez/models/model/model_data.py +21 -21
- waldiez/models/tool/extra_requirements.py +2 -4
- waldiez/models/tool/predefined/_duckduckgo.py +1 -0
- waldiez/models/tool/predefined/_email.py +1 -0
- waldiez/models/tool/predefined/_google.py +1 -0
- waldiez/models/tool/predefined/_perplexity.py +1 -0
- waldiez/models/tool/predefined/_searxng.py +1 -0
- waldiez/models/tool/predefined/_tavily.py +1 -0
- waldiez/models/tool/predefined/_wikipedia.py +1 -0
- waldiez/models/tool/predefined/_youtube.py +1 -0
- waldiez/models/tool/tool.py +8 -5
- waldiez/models/tool/tool_data.py +2 -2
- waldiez/models/waldiez.py +152 -4
- waldiez/runner.py +11 -5
- waldiez/running/async_utils.py +192 -0
- waldiez/running/base_runner.py +117 -264
- waldiez/running/dir_utils.py +52 -0
- waldiez/running/environment.py +10 -44
- waldiez/running/events_mixin.py +252 -0
- waldiez/running/exceptions.py +20 -0
- waldiez/running/gen_seq_diagram.py +18 -15
- waldiez/running/io_utils.py +216 -0
- waldiez/running/protocol.py +11 -5
- waldiez/running/requirements_mixin.py +65 -0
- waldiez/running/results_mixin.py +926 -0
- waldiez/running/standard_runner.py +22 -25
- waldiez/running/step_by_step/breakpoints_mixin.py +192 -60
- waldiez/running/step_by_step/command_handler.py +3 -0
- waldiez/running/step_by_step/events_processor.py +194 -14
- waldiez/running/step_by_step/step_by_step_models.py +110 -43
- waldiez/running/step_by_step/step_by_step_runner.py +107 -57
- waldiez/running/subprocess_runner/__base__.py +9 -1
- waldiez/running/subprocess_runner/_async_runner.py +5 -3
- waldiez/running/subprocess_runner/_sync_runner.py +6 -2
- waldiez/running/subprocess_runner/runner.py +39 -23
- waldiez/running/timeline_processor.py +1 -1
- waldiez/utils/__init__.py +2 -0
- waldiez/utils/conflict_checker.py +4 -4
- waldiez/utils/python_manager.py +415 -0
- waldiez/ws/_file_handler.py +18 -18
- waldiez/ws/_mock.py +2 -1
- waldiez/ws/cli.py +36 -12
- waldiez/ws/client_manager.py +35 -27
- waldiez/ws/errors.py +3 -0
- waldiez/ws/models.py +43 -52
- waldiez/ws/reloader.py +12 -4
- waldiez/ws/server.py +85 -55
- waldiez/ws/session_manager.py +8 -9
- waldiez/ws/session_stats.py +1 -1
- waldiez/ws/utils.py +4 -1
- {waldiez-0.6.0.dist-info → waldiez-0.6.1.dist-info}/METADATA +82 -93
- waldiez-0.6.1.dist-info/RECORD +254 -0
- waldiez/running/post_run.py +0 -186
- waldiez/running/pre_run.py +0 -281
- waldiez/running/run_results.py +0 -14
- waldiez/running/utils.py +0 -625
- waldiez-0.6.0.dist-info/RECORD +0 -251
- {waldiez-0.6.0.dist-info → waldiez-0.6.1.dist-info}/WHEEL +0 -0
- {waldiez-0.6.0.dist-info → waldiez-0.6.1.dist-info}/entry_points.txt +0 -0
- {waldiez-0.6.0.dist-info → waldiez-0.6.1.dist-info}/licenses/LICENSE +0 -0
- {waldiez-0.6.0.dist-info → waldiez-0.6.1.dist-info}/licenses/NOTICE.md +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# SPDX-License-Identifier: Apache-2.0.
|
|
2
2
|
# Copyright (c) 2024 - 2025 Waldiez and contributors.
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
# pylint: disable=line-too-long
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
"""Extra requirements for agents."""
|
|
7
7
|
|
|
8
8
|
from .agent import WaldiezAgent
|
|
9
9
|
from .rag_user_proxy import WaldiezRagUserProxy
|
|
@@ -26,7 +26,7 @@ def get_retrievechat_extra_requirements(
|
|
|
26
26
|
"""
|
|
27
27
|
# https://github.com/ag2ai/ag2/blob/main/pyproject.toml
|
|
28
28
|
# with chromadb and sentence_transdormers relaxed
|
|
29
|
-
rag_requirements:
|
|
29
|
+
rag_requirements: set[str] = {
|
|
30
30
|
"protobuf==5.29.3",
|
|
31
31
|
"chromadb>=0.5.23",
|
|
32
32
|
"sentence_transformers",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# SPDX-License-Identifier: Apache-2.0.
|
|
2
2
|
# Copyright (c) 2024 - 2025 Waldiez and contributors.
|
|
3
|
+
|
|
4
|
+
# pyright: reportArgumentType=false,reportIncompatibleVariableOverride=false
|
|
5
|
+
|
|
3
6
|
"""Group chat manager agent."""
|
|
4
7
|
|
|
5
8
|
import warnings
|
|
@@ -29,23 +32,23 @@ class WaldiezGroupManager(WaldiezAgent):
|
|
|
29
32
|
The group manager agent's data.
|
|
30
33
|
"""
|
|
31
34
|
|
|
32
|
-
agent_type: Annotated[
|
|
35
|
+
agent_type: Annotated[
|
|
33
36
|
Literal["group_manager", "manager"],
|
|
34
37
|
Field(
|
|
35
|
-
"
|
|
38
|
+
"group_manager",
|
|
36
39
|
title="Agent type",
|
|
37
40
|
description=(
|
|
38
41
|
"The agent type: 'group_manager' for a group manager agent"
|
|
39
42
|
),
|
|
40
43
|
alias="agentType",
|
|
41
44
|
),
|
|
42
|
-
]
|
|
43
|
-
data: Annotated[
|
|
45
|
+
]
|
|
46
|
+
data: Annotated[
|
|
44
47
|
WaldiezGroupManagerData,
|
|
45
48
|
Field(
|
|
46
49
|
title="Data",
|
|
47
50
|
description="The group manager agent's data",
|
|
48
|
-
default_factory=WaldiezGroupManagerData,
|
|
51
|
+
default_factory=WaldiezGroupManagerData,
|
|
49
52
|
),
|
|
50
53
|
]
|
|
51
54
|
|
|
@@ -83,10 +86,11 @@ class WaldiezGroupManager(WaldiezAgent):
|
|
|
83
86
|
stacklevel=2,
|
|
84
87
|
)
|
|
85
88
|
if v != "group_manager": # pragma: no cover
|
|
86
|
-
|
|
89
|
+
msg = (
|
|
87
90
|
"The agent type must be 'group_manager'. "
|
|
88
91
|
"Use 'group_manager' instead."
|
|
89
92
|
)
|
|
93
|
+
raise ValueError(msg)
|
|
90
94
|
return "group_manager"
|
|
91
95
|
|
|
92
96
|
def validate_initial_agent_id(self, all_agent_ids: list[str]) -> None:
|
|
@@ -106,10 +110,11 @@ class WaldiezGroupManager(WaldiezAgent):
|
|
|
106
110
|
"""
|
|
107
111
|
initial_agent_id = self.data.initial_agent_id
|
|
108
112
|
if initial_agent_id not in all_agent_ids:
|
|
109
|
-
|
|
113
|
+
msg = (
|
|
110
114
|
f"Initial agent ID '{initial_agent_id}' "
|
|
111
115
|
f"is not in the list of agent IDs: {all_agent_ids}"
|
|
112
116
|
)
|
|
117
|
+
raise ValueError(msg)
|
|
113
118
|
|
|
114
119
|
def get_speakers_order(self) -> list[str]:
|
|
115
120
|
"""Get the order of the speakers.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# SPDX-License-Identifier: Apache-2.0.
|
|
2
2
|
# Copyright (c) 2024 - 2025 Waldiez and contributors.
|
|
3
|
-
"""Group chat manager data."""
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
# pyright: reportArgumentType=false
|
|
5
|
+
|
|
6
|
+
"""Group chat manager data."""
|
|
6
7
|
|
|
7
8
|
from pydantic import Field
|
|
8
9
|
from typing_extensions import Annotated, Literal
|
|
@@ -47,7 +48,7 @@ class WaldiezGroupManagerData(WaldiezAgentData):
|
|
|
47
48
|
description="The human input mode, Defaults to `NEVER`",
|
|
48
49
|
alias="humanInputMode",
|
|
49
50
|
),
|
|
50
|
-
]
|
|
51
|
+
]
|
|
51
52
|
max_round: Annotated[
|
|
52
53
|
int,
|
|
53
54
|
Field(
|
|
@@ -56,9 +57,9 @@ class WaldiezGroupManagerData(WaldiezAgentData):
|
|
|
56
57
|
description="The maximum number of rounds to have in the group.",
|
|
57
58
|
alias="maxRound",
|
|
58
59
|
),
|
|
59
|
-
]
|
|
60
|
+
]
|
|
60
61
|
admin_name: Annotated[
|
|
61
|
-
|
|
62
|
+
str | None,
|
|
62
63
|
Field(
|
|
63
64
|
default=None,
|
|
64
65
|
title="Group Admin name",
|
|
@@ -68,24 +69,24 @@ class WaldiezGroupManagerData(WaldiezAgentData):
|
|
|
68
69
|
),
|
|
69
70
|
alias="adminName",
|
|
70
71
|
),
|
|
71
|
-
]
|
|
72
|
+
]
|
|
72
73
|
speakers: Annotated[
|
|
73
74
|
WaldiezGroupManagerSpeakers,
|
|
74
75
|
Field(
|
|
75
76
|
title="Speakers",
|
|
76
77
|
description="The rules for the speaker selection and repetition",
|
|
77
|
-
default_factory=WaldiezGroupManagerSpeakers,
|
|
78
|
+
default_factory=WaldiezGroupManagerSpeakers,
|
|
78
79
|
),
|
|
79
80
|
]
|
|
80
81
|
enable_clear_history: Annotated[
|
|
81
|
-
|
|
82
|
+
bool | None,
|
|
82
83
|
Field(
|
|
83
84
|
default=None,
|
|
84
85
|
title="Enable clear history",
|
|
85
86
|
description="Enable clearing the history in the chat group.",
|
|
86
87
|
alias="enableClearHistory",
|
|
87
88
|
),
|
|
88
|
-
]
|
|
89
|
+
]
|
|
89
90
|
send_introductions: Annotated[
|
|
90
91
|
bool,
|
|
91
92
|
Field(
|
|
@@ -94,16 +95,16 @@ class WaldiezGroupManagerData(WaldiezAgentData):
|
|
|
94
95
|
description="Send the group members' introductions.",
|
|
95
96
|
alias="sendIntroductions",
|
|
96
97
|
),
|
|
97
|
-
]
|
|
98
|
+
]
|
|
98
99
|
group_name: Annotated[
|
|
99
|
-
|
|
100
|
+
str | None,
|
|
100
101
|
Field(
|
|
101
102
|
default=None,
|
|
102
103
|
title="Group name",
|
|
103
104
|
description="The name of the group.",
|
|
104
105
|
alias="groupName",
|
|
105
106
|
),
|
|
106
|
-
]
|
|
107
|
+
]
|
|
107
108
|
initial_agent_id: Annotated[
|
|
108
109
|
str,
|
|
109
110
|
Field(
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
# Copyright (c) 2024 - 2025 Waldiez and contributors.
|
|
3
3
|
"""Group chat speakers."""
|
|
4
4
|
|
|
5
|
-
from typing import Optional, Union
|
|
6
|
-
|
|
7
5
|
from pydantic import Field, model_validator
|
|
8
6
|
from typing_extensions import Annotated, Literal, Self
|
|
9
7
|
|
|
@@ -61,7 +59,7 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
61
59
|
----------
|
|
62
60
|
selection_method : WaldiezGroupManagerSpeakersSelectionMethod
|
|
63
61
|
The next speaker selection method.
|
|
64
|
-
selection_custom_method :
|
|
62
|
+
selection_custom_method : str | None
|
|
65
63
|
Method for custom selection.
|
|
66
64
|
max_retries_for_selecting : Optional[int]
|
|
67
65
|
Max retries for selecting a speaker.
|
|
@@ -85,9 +83,9 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
85
83
|
description="The next speaker selection method",
|
|
86
84
|
alias="selectionMethod",
|
|
87
85
|
),
|
|
88
|
-
]
|
|
86
|
+
]
|
|
89
87
|
selection_custom_method: Annotated[
|
|
90
|
-
|
|
88
|
+
str | None,
|
|
91
89
|
Field(
|
|
92
90
|
default=None,
|
|
93
91
|
title="Method for custom selection.",
|
|
@@ -102,9 +100,9 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
102
100
|
),
|
|
103
101
|
alias="selectionCustomMethod",
|
|
104
102
|
),
|
|
105
|
-
]
|
|
103
|
+
]
|
|
106
104
|
max_retries_for_selecting: Annotated[
|
|
107
|
-
|
|
105
|
+
int | None,
|
|
108
106
|
Field(
|
|
109
107
|
default=None,
|
|
110
108
|
title="Max retries for a selecting",
|
|
@@ -114,7 +112,7 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
114
112
|
),
|
|
115
113
|
alias="maxRetriesForSelecting",
|
|
116
114
|
),
|
|
117
|
-
]
|
|
115
|
+
]
|
|
118
116
|
selection_mode: Annotated[
|
|
119
117
|
WaldiezGroupManagerSpeakersSelectionMode,
|
|
120
118
|
Field(
|
|
@@ -127,9 +125,9 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
127
125
|
),
|
|
128
126
|
alias="selectionMode",
|
|
129
127
|
),
|
|
130
|
-
]
|
|
128
|
+
]
|
|
131
129
|
allow_repeat: Annotated[
|
|
132
|
-
|
|
130
|
+
bool | list[str] | None,
|
|
133
131
|
Field(
|
|
134
132
|
default=True,
|
|
135
133
|
title="Allow repeat",
|
|
@@ -139,7 +137,7 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
139
137
|
),
|
|
140
138
|
alias="allowRepeat",
|
|
141
139
|
),
|
|
142
|
-
]
|
|
140
|
+
]
|
|
143
141
|
allowed_or_disallowed_transitions: Annotated[
|
|
144
142
|
dict[str, list[str]],
|
|
145
143
|
Field(
|
|
@@ -151,7 +149,7 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
151
149
|
),
|
|
152
150
|
alias="allowedOrDisallowedTransitions",
|
|
153
151
|
),
|
|
154
|
-
]
|
|
152
|
+
]
|
|
155
153
|
transitions_type: Annotated[
|
|
156
154
|
WaldiezGroupManagerSpeakersTransitionsType,
|
|
157
155
|
Field(
|
|
@@ -164,7 +162,7 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
164
162
|
),
|
|
165
163
|
alias="transitionsType",
|
|
166
164
|
),
|
|
167
|
-
]
|
|
165
|
+
]
|
|
168
166
|
order: Annotated[
|
|
169
167
|
list[str],
|
|
170
168
|
Field(
|
|
@@ -176,12 +174,12 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
176
174
|
"will be determined by the order of the agents in the flow."
|
|
177
175
|
),
|
|
178
176
|
),
|
|
179
|
-
]
|
|
180
|
-
_custom_method_string:
|
|
181
|
-
_order:
|
|
177
|
+
]
|
|
178
|
+
_custom_method_string: str | None = None
|
|
179
|
+
_order: list[str] | None = None
|
|
182
180
|
|
|
183
181
|
@property
|
|
184
|
-
def custom_method_string(self) ->
|
|
182
|
+
def custom_method_string(self) -> str | None:
|
|
185
183
|
"""Get the custom method string.
|
|
186
184
|
|
|
187
185
|
Returns
|
|
@@ -193,8 +191,8 @@ class WaldiezGroupManagerSpeakers(WaldiezBase):
|
|
|
193
191
|
|
|
194
192
|
def get_custom_method_function(
|
|
195
193
|
self,
|
|
196
|
-
name_prefix:
|
|
197
|
-
name_suffix:
|
|
194
|
+
name_prefix: str | None = None,
|
|
195
|
+
name_suffix: str | None = None,
|
|
198
196
|
) -> tuple[str, str]:
|
|
199
197
|
"""Get the custom method function.
|
|
200
198
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# SPDX-License-Identifier: Apache-2.0.
|
|
2
2
|
# Copyright (c) 2024 - 2025 Waldiez and contributors.
|
|
3
|
+
|
|
4
|
+
# pyright: reportArgumentType=false,reportIncompatibleVariableOverride=false
|
|
5
|
+
|
|
3
6
|
"""RAG user agent.
|
|
4
7
|
|
|
5
8
|
It extends a user agent and has RAG related parameters (`retrieve_config`).
|
|
@@ -27,7 +30,7 @@ class WaldiezRagUserProxy(WaldiezAgent):
|
|
|
27
30
|
See `WaldiezRagUserProxyData` for more info.
|
|
28
31
|
"""
|
|
29
32
|
|
|
30
|
-
agent_type: Annotated[
|
|
33
|
+
agent_type: Annotated[
|
|
31
34
|
Literal["rag_user", "rag_user_proxy"],
|
|
32
35
|
Field(
|
|
33
36
|
"rag_user_proxy",
|
|
@@ -39,14 +42,14 @@ class WaldiezRagUserProxy(WaldiezAgent):
|
|
|
39
42
|
),
|
|
40
43
|
alias="agentType",
|
|
41
44
|
),
|
|
42
|
-
]
|
|
45
|
+
]
|
|
43
46
|
|
|
44
|
-
data: Annotated[
|
|
47
|
+
data: Annotated[
|
|
45
48
|
WaldiezRagUserProxyData,
|
|
46
49
|
Field(
|
|
47
50
|
title="Data",
|
|
48
51
|
description="The RAG user agent's data",
|
|
49
|
-
default_factory=WaldiezRagUserProxyData,
|
|
52
|
+
default_factory=WaldiezRagUserProxyData,
|
|
50
53
|
),
|
|
51
54
|
]
|
|
52
55
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# SPDX-License-Identifier: Apache-2.0.
|
|
2
2
|
# Copyright (c) 2024 - 2025 Waldiez and contributors.
|
|
3
|
+
|
|
4
|
+
# pyright: reportArgumentType=false
|
|
5
|
+
|
|
3
6
|
"""Waldiez RAG user agent data."""
|
|
4
7
|
|
|
5
8
|
from pydantic import Field
|
|
@@ -27,7 +30,7 @@ class WaldiezRagUserProxyData(WaldiezUserProxyData):
|
|
|
27
30
|
Field(
|
|
28
31
|
title="Retrieve Config",
|
|
29
32
|
description="The RAG user agent's retrieve config",
|
|
30
|
-
default_factory=WaldiezRagUserProxyRetrieveConfig,
|
|
33
|
+
default_factory=WaldiezRagUserProxyRetrieveConfig,
|
|
31
34
|
alias="retrieveConfig",
|
|
32
35
|
),
|
|
33
36
|
]
|