Agents
Export agents.
AgentExporter(agent: WaldiezAgent, agent_names: Dict[str, str], models: Tuple[List[WaldiezModel], Dict[str, str]], chats: Tuple[List[WaldiezChat], Dict[str, str]], skill_names: Dict[str, str], is_async: bool, group_chat_members: List[WaldiezAgent], for_notebook: bool, arguments_resolver: Callable[[WaldiezAgent], List[str]], output_dir: Optional[Union[str, Path]] = None)
¶
Bases: BaseExporter
, ExporterMixin
Agents exporter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
agent | WaldiezAgent | The agent to export. | required |
agent_names | Dict[str, str] | The agent ids to names mapping. | required |
models | Tuple[List[WaldiezModel], Dict[str, str]] | All the models and the model ids to names mapping. | required |
chats | Tuple[List[WaldiezChat], Dict[str, str]] | All the chats and the chat ids to names mapping. | required |
skill_names | Dict[str, str] | The skill ids to names mapping. | required |
is_async | bool | Whether the whole flow is async. | required |
for_notebook | bool | Whether the exporter is for a notebook. | required |
output_dir | Optional[Union[str, Path]] | The output directory, by default None | None |
Source code in waldiez/exporting/agent/agent_exporter.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
export() -> ExporterReturnType
¶
Export the agent.
Returns:
Type | Description |
---|---|
ExporterReturnType | The exported agent. |
Source code in waldiez/exporting/agent/agent_exporter.py
generate() -> Optional[str]
¶
Generate the exported agent.
Returns:
Type | Description |
---|---|
Optional[str] | The exported agent. |
Source code in waldiez/exporting/agent/agent_exporter.py
get_after_export() -> Optional[List[Tuple[str, Union[ExportPosition, AgentPosition]]]]
¶
Generate the content after the main export.
Returns:
Type | Description |
---|---|
Optional[List[Tuple[str, Union[ExportPosition, AgentPosition]]]] | The exported content after the main export and its position. |
Source code in waldiez/exporting/agent/agent_exporter.py
get_before_export() -> Optional[List[Tuple[str, Union[ExportPosition, AgentPosition]]]]
¶
Generate the content before the main export.
Returns:
Type | Description |
---|---|
Optional[List[Tuple[str, Union[ExportPosition, AgentPosition]]]] | The exported content before the main export and its position. |
Source code in waldiez/exporting/agent/agent_exporter.py
get_imports() -> Optional[List[Tuple[str, ImportPosition]]]
¶
Get the imports.
Returns:
Type | Description |
---|---|
Optional[Tuple[str, ImportPosition]] | The imports. |