waldiez 0.5.7__tar.gz → 0.5.9__tar.gz

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.

Files changed (227) hide show
  1. {waldiez-0.5.7 → waldiez-0.5.9}/PKG-INFO +14 -13
  2. {waldiez-0.5.7 → waldiez-0.5.9}/pyproject.toml +13 -12
  3. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/_version.py +1 -1
  4. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/cli.py +16 -1
  5. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/utils/common.py +45 -1
  6. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/utils/group.py +1 -1
  7. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/execution_generator.py +54 -32
  8. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/utils/common.py +4 -11
  9. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/utils/importing.py +2 -1
  10. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/models/exporter.py +2 -1
  11. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/tools/exporter.py +2 -1
  12. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/tools/processor.py +6 -1
  13. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/model/model.py +2 -2
  14. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/_google.py +8 -16
  15. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/_perplexity.py +9 -8
  16. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/_tavily.py +0 -6
  17. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/_youtube.py +0 -4
  18. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/runner.py +17 -13
  19. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/base_runner.py +89 -38
  20. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/protocol.py +50 -48
  21. waldiez-0.5.9/waldiez/running/run_results.py +14 -0
  22. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/standard_runner.py +10 -10
  23. waldiez-0.5.7/waldiez/running/run_results.py +0 -22
  24. {waldiez-0.5.7 → waldiez-0.5.9}/.gitignore +0 -0
  25. {waldiez-0.5.7 → waldiez-0.5.9}/LICENSE +0 -0
  26. {waldiez-0.5.7 → waldiez-0.5.9}/NOTICE.md +0 -0
  27. {waldiez-0.5.7 → waldiez-0.5.9}/README.md +0 -0
  28. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/__init__.py +0 -0
  29. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/__main__.py +0 -0
  30. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/cli_extras/__init__.py +0 -0
  31. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/cli_extras/jupyter.py +0 -0
  32. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/cli_extras/runner.py +0 -0
  33. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/cli_extras/studio.py +0 -0
  34. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporter.py +0 -0
  35. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/__init__.py +0 -0
  36. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/__init__.py +0 -0
  37. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/code_execution.py +0 -0
  38. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/exporter.py +0 -0
  39. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/__init__.py +0 -0
  40. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/captain_agent_extras.py +0 -0
  41. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/doc_agent_extras.py +0 -0
  42. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/group_manager_agent_extas.py +0 -0
  43. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/group_member_extras.py +0 -0
  44. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/handoffs/__init__.py +0 -0
  45. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/handoffs/after_work.py +0 -0
  46. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/handoffs/available.py +0 -0
  47. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/handoffs/condition.py +0 -0
  48. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/handoffs/handoff.py +0 -0
  49. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/handoffs/target.py +0 -0
  50. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/rag/__init__.py +0 -0
  51. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/rag/chroma_extras.py +0 -0
  52. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/rag/mongo_extras.py +0 -0
  53. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/rag/pgvector_extras.py +0 -0
  54. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/rag/qdrant_extras.py +0 -0
  55. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/rag/vector_db_extras.py +0 -0
  56. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/rag_user_proxy_agent_extras.py +0 -0
  57. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/extras/reasoning_agent_extras.py +0 -0
  58. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/factory.py +0 -0
  59. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/processor.py +0 -0
  60. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/system_message.py +0 -0
  61. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/agent/termination.py +0 -0
  62. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/__init__.py +0 -0
  63. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/exporter.py +0 -0
  64. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/factory.py +0 -0
  65. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/processor.py +0 -0
  66. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/utils/__init__.py +0 -0
  67. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/utils/nested.py +0 -0
  68. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/utils/sequential.py +0 -0
  69. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/chats/utils/single.py +0 -0
  70. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/__init__.py +0 -0
  71. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/constants.py +0 -0
  72. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/content.py +0 -0
  73. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/context.py +0 -0
  74. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/enums.py +0 -0
  75. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/errors.py +0 -0
  76. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/exporter.py +0 -0
  77. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/exporters.py +0 -0
  78. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/__init__.py +0 -0
  79. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/agent_extras/__init__.py +0 -0
  80. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/agent_extras/captain_extras.py +0 -0
  81. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/agent_extras/group_manager_extras.py +0 -0
  82. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/agent_extras/rag_user_extras.py +0 -0
  83. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/agent_extras/reasoning_extras.py +0 -0
  84. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/agent_extras/standard_extras.py +0 -0
  85. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/base.py +0 -0
  86. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/chat_extras.py +0 -0
  87. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/flow_extras.py +0 -0
  88. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/model_extras.py +0 -0
  89. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/path_resolver.py +0 -0
  90. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/serializer.py +0 -0
  91. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/extras/tool_extras.py +0 -0
  92. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/protocols.py +0 -0
  93. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/result.py +0 -0
  94. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/types.py +0 -0
  95. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/utils/__init__.py +0 -0
  96. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/utils/comment.py +0 -0
  97. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/utils/llm_config.py +0 -0
  98. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/core/validation.py +0 -0
  99. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/__init__.py +0 -0
  100. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/exporter.py +0 -0
  101. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/factory.py +0 -0
  102. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/file_generator.py +0 -0
  103. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/merger.py +0 -0
  104. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/orchestrator.py +0 -0
  105. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/utils/__init__.py +0 -0
  106. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/utils/linting.py +0 -0
  107. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/flow/utils/logging.py +0 -0
  108. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/models/__init__.py +0 -0
  109. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/models/factory.py +0 -0
  110. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/models/processor.py +0 -0
  111. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/tools/__init__.py +0 -0
  112. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/tools/factory.py +0 -0
  113. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/exporting/tools/registration.py +0 -0
  114. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/__init__.py +0 -0
  115. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/_ws.py +0 -0
  116. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/__init__.py +0 -0
  117. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/base.py +0 -0
  118. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/constants.py +0 -0
  119. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/content/__init__.py +0 -0
  120. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/content/audio.py +0 -0
  121. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/content/base.py +0 -0
  122. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/content/file.py +0 -0
  123. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/content/image.py +0 -0
  124. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/content/text.py +0 -0
  125. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/content/video.py +0 -0
  126. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/user_input.py +0 -0
  127. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/models/user_response.py +0 -0
  128. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/mqtt.py +0 -0
  129. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/redis.py +0 -0
  130. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/structured.py +0 -0
  131. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/utils.py +0 -0
  132. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/io/ws.py +0 -0
  133. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/logger.py +0 -0
  134. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/__init__.py +0 -0
  135. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/__init__.py +0 -0
  136. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/__init__.py +0 -0
  137. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/agent.py +0 -0
  138. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/agent_data.py +0 -0
  139. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/agent_type.py +0 -0
  140. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/code_execution.py +0 -0
  141. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/human_input_mode.py +0 -0
  142. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/linked_tool.py +0 -0
  143. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/nested_chat.py +0 -0
  144. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/termination_message.py +0 -0
  145. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agent/update_system_message.py +0 -0
  146. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/agents.py +0 -0
  147. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/assistant/__init__.py +0 -0
  148. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/assistant/assistant.py +0 -0
  149. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/assistant/assistant_data.py +0 -0
  150. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/captain/__init__.py +0 -0
  151. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/captain/captain_agent.py +0 -0
  152. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/captain/captain_agent_data.py +0 -0
  153. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/captain/captain_agent_lib_entry.py +0 -0
  154. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/doc_agent/__init__.py +0 -0
  155. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/doc_agent/doc_agent.py +0 -0
  156. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/doc_agent/doc_agent_data.py +0 -0
  157. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/doc_agent/rag_query_engine.py +0 -0
  158. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/extra_requirements.py +0 -0
  159. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/group_manager/__init__.py +0 -0
  160. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/group_manager/group_manager.py +0 -0
  161. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/group_manager/group_manager_data.py +0 -0
  162. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/group_manager/speakers.py +0 -0
  163. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/rag_user_proxy/__init__.py +0 -0
  164. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/rag_user_proxy/rag_user_proxy.py +0 -0
  165. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/rag_user_proxy/rag_user_proxy_data.py +0 -0
  166. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/rag_user_proxy/retrieve_config.py +0 -0
  167. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/rag_user_proxy/vector_db_config.py +0 -0
  168. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/reasoning/__init__.py +0 -0
  169. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/reasoning/reasoning_agent.py +0 -0
  170. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/reasoning/reasoning_agent_data.py +0 -0
  171. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/reasoning/reasoning_agent_reason_config.py +0 -0
  172. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/user_proxy/__init__.py +0 -0
  173. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/user_proxy/user_proxy.py +0 -0
  174. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/agents/user_proxy/user_proxy_data.py +0 -0
  175. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/chat/__init__.py +0 -0
  176. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/chat/chat.py +0 -0
  177. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/chat/chat_data.py +0 -0
  178. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/chat/chat_message.py +0 -0
  179. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/chat/chat_nested.py +0 -0
  180. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/chat/chat_summary.py +0 -0
  181. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/__init__.py +0 -0
  182. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/ag2_version.py +0 -0
  183. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/base.py +0 -0
  184. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/date_utils.py +0 -0
  185. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/dict_utils.py +0 -0
  186. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/handoff.py +0 -0
  187. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/id_generator.py +0 -0
  188. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/method_utils.py +0 -0
  189. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/naming.py +0 -0
  190. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/common/waldiez_version.py +0 -0
  191. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/flow/__init__.py +0 -0
  192. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/flow/connection.py +0 -0
  193. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/flow/flow.py +0 -0
  194. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/flow/flow_data.py +0 -0
  195. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/flow/info.py +0 -0
  196. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/flow/naming.py +0 -0
  197. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/model/__init__.py +0 -0
  198. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/model/_aws.py +0 -0
  199. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/model/_llm.py +0 -0
  200. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/model/_price.py +0 -0
  201. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/model/extra_requirements.py +0 -0
  202. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/model/model_data.py +0 -0
  203. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/__init__.py +0 -0
  204. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/extra_requirements.py +0 -0
  205. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/__init__.py +0 -0
  206. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/_config.py +0 -0
  207. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/_duckduckgo.py +0 -0
  208. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/_searxng.py +0 -0
  209. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/_wikipedia.py +0 -0
  210. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/protocol.py +0 -0
  211. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/predefined/registry.py +0 -0
  212. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/tool.py +0 -0
  213. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/tool_data.py +0 -0
  214. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/tool/tool_type.py +0 -0
  215. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/models/waldiez.py +0 -0
  216. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/py.typed +0 -0
  217. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/__init__.py +0 -0
  218. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/environment.py +0 -0
  219. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/gen_seq_diagram.py +0 -0
  220. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/patch_io_stream.py +0 -0
  221. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/post_run.py +0 -0
  222. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/pre_run.py +0 -0
  223. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/timeline_processor.py +0 -0
  224. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/running/utils.py +0 -0
  225. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/utils/__init__.py +0 -0
  226. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/utils/conflict_checker.py +0 -0
  227. {waldiez-0.5.7 → waldiez-0.5.9}/waldiez/utils/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: waldiez
3
- Version: 0.5.7
3
+ Version: 0.5.9
4
4
  Dynamic: Keywords
5
5
  Summary: Make AG2 Agents Collaborate: Drag, Drop, and Orchestrate with Waldiez.
6
6
  Project-URL: Homepage, https://waldiez.io
@@ -104,16 +104,16 @@ Requires-Dist: ag2[websockets]==0.9.7; extra == 'dev'
104
104
  Requires-Dist: autoflake==2.3.1; extra == 'dev'
105
105
  Requires-Dist: bandit==1.8.6; extra == 'dev'
106
106
  Requires-Dist: black[jupyter]==25.1.0; extra == 'dev'
107
- Requires-Dist: build==1.2.2.post1; extra == 'dev'
108
- Requires-Dist: fakeredis==2.30.1; extra == 'dev'
107
+ Requires-Dist: build==1.3.0; extra == 'dev'
108
+ Requires-Dist: fakeredis==2.30.3; extra == 'dev'
109
109
  Requires-Dist: fastjsonschema>=2.21.1; extra == 'dev'
110
110
  Requires-Dist: flake8==7.3.0; extra == 'dev'
111
111
  Requires-Dist: hatchling==1.27.0; extra == 'dev'
112
112
  Requires-Dist: jsonschema==4.25.0; extra == 'dev'
113
113
  Requires-Dist: jupyter-server==2.16.0; extra == 'dev'
114
- Requires-Dist: jupyterlab<5.0,>=4.4.0; extra == 'dev'
114
+ Requires-Dist: jupyterlab==4.4.5; extra == 'dev'
115
115
  Requires-Dist: mypy-extensions>=1.1.0; extra == 'dev'
116
- Requires-Dist: mypy==1.17.0; extra == 'dev'
116
+ Requires-Dist: mypy==1.17.1; extra == 'dev'
117
117
  Requires-Dist: nbclient>=0.10.2; extra == 'dev'
118
118
  Requires-Dist: nbconvert>=7.16.6; extra == 'dev'
119
119
  Requires-Dist: nbformat>=5.10.4; extra == 'dev'
@@ -125,9 +125,9 @@ Requires-Dist: pre-commit==4.2.0; extra == 'dev'
125
125
  Requires-Dist: pydocstyle==6.3.0; extra == 'dev'
126
126
  Requires-Dist: pylint==3.3.7; extra == 'dev'
127
127
  Requires-Dist: python-dotenv>=1.1.1; extra == 'dev'
128
- Requires-Dist: ruff==0.12.5; extra == 'dev'
128
+ Requires-Dist: ruff==0.12.7; extra == 'dev'
129
129
  Requires-Dist: toml==0.10.2; (python_version <= '3.10') and extra == 'dev'
130
- Requires-Dist: types-aiofiles==24.1.0.20250708; extra == 'dev'
130
+ Requires-Dist: types-aiofiles==24.1.0.20250801; extra == 'dev'
131
131
  Requires-Dist: types-jsonschema==4.25.0.20250720; extra == 'dev'
132
132
  Requires-Dist: types-pyyaml==6.0.12.20250516; extra == 'dev'
133
133
  Requires-Dist: types-redis==4.6.0.20241004; extra == 'dev'
@@ -144,7 +144,7 @@ Requires-Dist: mkdocs-awesome-nav==3.1.2; extra == 'docs'
144
144
  Requires-Dist: mkdocs-jupyter==0.25.1; extra == 'docs'
145
145
  Requires-Dist: mkdocs-macros-plugin==1.3.7; extra == 'docs'
146
146
  Requires-Dist: mkdocs-material==9.6.16; extra == 'docs'
147
- Requires-Dist: mkdocs-minify-html-plugin==0.3.1; extra == 'docs'
147
+ Requires-Dist: mkdocs-minify-html-plugin==0.3.4; extra == 'docs'
148
148
  Requires-Dist: mkdocs-open-in-new-tab==1.0.8; extra == 'docs'
149
149
  Requires-Dist: mkdocs==1.6.1; extra == 'docs'
150
150
  Requires-Dist: mkdocstrings-crystal==0.3.7; extra == 'docs'
@@ -152,21 +152,22 @@ Requires-Dist: mkdocstrings-python==1.16.12; extra == 'docs'
152
152
  Requires-Dist: mkdocstrings[crystal,python]==0.30.0; extra == 'docs'
153
153
  Requires-Dist: natsort==8.4.0; extra == 'docs'
154
154
  Provides-Extra: jupyter
155
+ Requires-Dist: ipywidgets==8.1.7; extra == 'jupyter'
155
156
  Requires-Dist: jupyter-server==2.16.0; extra == 'jupyter'
156
- Requires-Dist: jupyterlab<5.0,>=4.3.0; extra == 'jupyter'
157
- Requires-Dist: waldiez-jupyter==0.5.7; extra == 'jupyter'
157
+ Requires-Dist: jupyterlab==4.4.5; extra == 'jupyter'
158
+ Requires-Dist: waldiez-jupyter==0.5.9; extra == 'jupyter'
158
159
  Provides-Extra: mqtt
159
160
  Requires-Dist: paho-mqtt<3.0,>=2.1.0; extra == 'mqtt'
160
161
  Provides-Extra: redis
161
162
  Requires-Dist: ag2[redis]==0.9.7; extra == 'redis'
162
163
  Provides-Extra: runner
163
- Requires-Dist: waldiez-runner==0.5.7; (python_version >= '3.11') and extra == 'runner'
164
+ Requires-Dist: waldiez-runner==0.5.9; (python_version >= '3.11') and extra == 'runner'
164
165
  Provides-Extra: studio
165
- Requires-Dist: waldiez-studio==0.5.7; extra == 'studio'
166
+ Requires-Dist: waldiez-studio==0.5.9; extra == 'studio'
166
167
  Provides-Extra: test
167
168
  Requires-Dist: ag2[redis]==0.9.7; extra == 'test'
168
169
  Requires-Dist: ag2[websockets]==0.9.7; extra == 'test'
169
- Requires-Dist: fakeredis==2.30.1; extra == 'test'
170
+ Requires-Dist: fakeredis==2.30.3; extra == 'test'
170
171
  Requires-Dist: paho-mqtt<3.0,>=2.1.0; extra == 'test'
171
172
  Requires-Dist: pytest-asyncio==1.1.0; extra == 'test'
172
173
  Requires-Dist: pytest-cov==6.2.1; extra == 'test'
@@ -82,15 +82,16 @@ mqtt = [
82
82
  ]
83
83
  # jupyterlab extension
84
84
  jupyter = [
85
- "waldiez_jupyter==0.5.7",
86
- "jupyterlab>=4.3.0,<5.0",
85
+ "waldiez_jupyter==0.5.9",
86
+ "jupyterlab==4.4.5",
87
+ "ipywidgets==8.1.7",
87
88
  "jupyter_server==2.16.0",
88
89
  ]
89
90
  runner = [
90
- "waldiez_runner==0.5.7; python_version >= '3.11'",
91
+ "waldiez_runner==0.5.9; python_version >= '3.11'",
91
92
  ]
92
93
  studio = [
93
- "waldiez_studio==0.5.7",
94
+ "waldiez_studio==0.5.9",
94
95
  ]
95
96
  ag2_extras = [
96
97
  "ag2[anthropic]==0.9.7",
@@ -157,11 +158,11 @@ dev = [
157
158
  "autoflake==2.3.1",
158
159
  "bandit==1.8.6",
159
160
  "black[jupyter]==25.1.0",
160
- "build==1.2.2.post1",
161
- "fakeredis==2.30.1",
161
+ "build==1.3.0",
162
+ "fakeredis==2.30.3",
162
163
  "flake8==7.3.0",
163
164
  "jsonschema==4.25.0",
164
- "jupyterlab>=4.4.0,<5.0",
165
+ "jupyterlab==4.4.5",
165
166
  "notebook-shim>=0.2.4",
166
167
  "fastjsonschema>=2.21.1",
167
168
  "jupyter_server==2.16.0",
@@ -169,7 +170,7 @@ dev = [
169
170
  "nbformat>=5.10.4",
170
171
  "nbconvert>=7.16.6",
171
172
  "hatchling==1.27.0",
172
- "mypy==1.17.0",
173
+ "mypy==1.17.1",
173
174
  "mypy-extensions>=1.1.0",
174
175
  "paho-mqtt>=2.1.0,<3.0",
175
176
  "pandas-stubs==2.3.0.250703",
@@ -178,8 +179,8 @@ dev = [
178
179
  "pydocstyle==6.3.0",
179
180
  "pylint==3.3.7",
180
181
  "python-dotenv>=1.1.1",
181
- "ruff==0.12.5",
182
- "types-aiofiles==24.1.0.20250708",
182
+ "ruff==0.12.7",
183
+ "types-aiofiles==24.1.0.20250801",
183
184
  "types-pyyaml==6.0.12.20250516",
184
185
  "types-jsonschema==4.25.0.20250720",
185
186
  "types-redis==4.6.0.20241004",
@@ -198,7 +199,7 @@ docs = [
198
199
  "mkdocs-jupyter==0.25.1",
199
200
  "mkdocs-macros-plugin==1.3.7",
200
201
  "mkdocs-material==9.6.16",
201
- "mkdocs-minify-html-plugin==0.3.1",
202
+ "mkdocs-minify-html-plugin==0.3.4",
202
203
  "mkdocstrings[crystal,python]==0.30.0",
203
204
  "mkdocstrings-crystal==0.3.7",
204
205
  "mkdocstrings-python==1.16.12",
@@ -209,7 +210,7 @@ docs = [
209
210
  test = [
210
211
  "ag2[redis]==0.9.7",
211
212
  "ag2[websockets]==0.9.7",
212
- "fakeredis==2.30.1",
213
+ "fakeredis==2.30.3",
213
214
  "paho-mqtt>=2.1.0,<3.0",
214
215
  "pytest==8.4.1",
215
216
  "pytest-asyncio==1.1.0",
@@ -5,4 +5,4 @@
5
5
  This file is automatically generated by Hatchling.
6
6
  Do not edit this file directly.
7
7
  """
8
- __version__ = VERSION = "0.5.7"
8
+ __version__ = VERSION = "0.5.9"
@@ -100,6 +100,19 @@ def run(
100
100
  False,
101
101
  help="Override the output file if it already exists.",
102
102
  ),
103
+ env_file: Optional[Path] = typer.Option( # noqa: B008
104
+ None,
105
+ "--env-file",
106
+ "-e",
107
+ help=(
108
+ "Path to a .env file containing additional environment variables. "
109
+ "These variables will be set before running the flow."
110
+ ),
111
+ file_okay=True,
112
+ dir_okay=False,
113
+ readable=True,
114
+ resolve_path=True,
115
+ ),
103
116
  ) -> None:
104
117
  """Run a Waldiez flow."""
105
118
  os.environ["AUTOGEN_USE_DOCKER"] = "0"
@@ -126,6 +139,7 @@ def run(
126
139
  structured, # structured_io
127
140
  False, # skip_mmd
128
141
  False, # skip_timeline
142
+ env_file,
129
143
  )
130
144
  else:
131
145
  runner.run(
@@ -134,6 +148,7 @@ def run(
134
148
  structured_io=structured,
135
149
  skip_mmd=False,
136
150
  skip_timeline=False,
151
+ dot_env=env_file,
137
152
  )
138
153
 
139
154
 
@@ -157,7 +172,7 @@ def convert(
157
172
  "Path to the output file. "
158
173
  "The file extension determines the output format: "
159
174
  "`.py` for Python script, `.ipynb` for Jupyter notebook."
160
- " If not provided, the output will be saved in the same directory as the input file."
175
+ " If not provided, the output (.py) will be saved in the same directory as the input file."
161
176
  " If the file already exists, it will not be overwritten unless --force is used."
162
177
  ),
163
178
  file_okay=True,
@@ -1,5 +1,7 @@
1
1
  # SPDX-License-Identifier: Apache-2.0.
2
2
  # Copyright (c) 2024 - 2025 Waldiez and contributors.
3
+ # pylint: disable=line-too-long
4
+ # flake8: noqa: E501
3
5
  """Common utilities for exporting chats."""
4
6
 
5
7
  import json
@@ -99,14 +101,56 @@ def get_event_handler_string(
99
101
  f"{tab} should_continue = False\n"
100
102
  f"{tab} if not should_continue:\n"
101
103
  f"{tab} break\n"
104
+ )
105
+ content += get_result_dicts_string(tab, is_async)
106
+ content += (
102
107
  f"{tab}else:\n"
103
108
  f"{tab} if not isinstance(results, list):\n"
104
109
  f"{tab} results = [results]\n"
105
- f"{tab} for result in results:\n"
110
+ f"{tab} for index, result in enumerate(results):\n"
106
111
  )
107
112
  if is_async:
108
113
  content += f"{tab} await result.process()\n"
109
114
  else:
110
115
  content += f"{tab} result.process()\n"
116
+ content += get_result_dicts_string(tab, is_async)
111
117
 
112
118
  return content
119
+
120
+
121
+ def get_result_dicts_string(tab: str, is_async: bool) -> str:
122
+ """Get the result dicts string.
123
+
124
+ Parameters
125
+ ----------
126
+ tab : str
127
+ The space string to use for indentation.
128
+ is_async : bool
129
+ Whether the function is asynchronous.
130
+
131
+ Returns
132
+ -------
133
+ str
134
+ The result dicts string.
135
+ """
136
+ space = f"{tab} "
137
+ flow_content = f"{space}result_dict = {{\n"
138
+ flow_content += f"{space} 'index': index,\n"
139
+ if is_async:
140
+ flow_content += f"{space} 'messages': await result.messages,\n"
141
+ flow_content += f"{space} 'summary': await result.summary,\n"
142
+ flow_content += f"{space} 'cost': (await result.cost).model_dump(mode='json', fallback=str) if await result.cost else None,\n"
143
+ flow_content += f"{space} 'context_variables': (await result.context_variables).model_dump(mode='json', fallback=str) if await result.context_variables else None,\n"
144
+ flow_content += (
145
+ f"{space} 'last_speaker': await result.last_speaker,\n"
146
+ )
147
+ else:
148
+ flow_content += f"{space} 'messages': result.messages,\n"
149
+ flow_content += f"{space} 'summary': result.summary,\n"
150
+ flow_content += f"{space} 'cost': result.cost.model_dump(mode='json', fallback=str) if result.cost else None,\n"
151
+ flow_content += f"{space} 'context_variables': result.context_variables.model_dump(mode='json', fallback=str) if result.context_variables else None,\n"
152
+ flow_content += f"{space} 'last_speaker': result.last_speaker,\n"
153
+ flow_content += f"{space} 'uuid': str(result.uuid),\n"
154
+ flow_content += f"{space}}}\n"
155
+ flow_content += f"{space}result_dicts.append(result_dict)\n"
156
+ return flow_content
@@ -43,7 +43,7 @@ def export_group_chats(
43
43
  tab = " " * tabs
44
44
  run_group_chat = "run_group_chat"
45
45
  if is_async:
46
- run_group_chat = "a_run_group_chat"
46
+ run_group_chat = "await a_run_group_chat"
47
47
  manager_name = agent_names[manager.id]
48
48
  pattern_name = f"{manager_name}_pattern"
49
49
  content = f"{tab}results = {run_group_chat}(" + "\n"
@@ -115,11 +115,14 @@ class ExecutionGenerator:
115
115
  "Callable[[BaseEvent], Coroutine[None, None, bool]]"
116
116
  "] = None"
117
117
  )
118
- return_type_hint = (
119
- "AsyncRunResponseProtocol" if is_async else "RunResponseProtocol"
120
- )
118
+ return_type_hint = "list[dict[str, Any]]"
121
119
  flow_content += f"def main({on_event_arg}) -> {return_type_hint}:\n"
122
- flow_content += f" {main_doc_string(is_async=is_async)}\n"
120
+ flow_content += f" {main_doc_string()}\n"
121
+ if not is_async:
122
+ flow_content += " results: list[RunResponseProtocol] | RunResponseProtocol = []\n"
123
+ else:
124
+ flow_content += " results: list[AsyncRunResponseProtocol] | AsyncRunResponseProtocol = []\n"
125
+ flow_content += " result_dicts: list[dict[str, Any]] = []\n"
123
126
  space = " "
124
127
  if cache_seed is not None:
125
128
  flow_content += (
@@ -138,7 +141,7 @@ class ExecutionGenerator:
138
141
  flow_content += after_run + "\n"
139
142
  if cache_seed is not None:
140
143
  space = space[4:]
141
- flow_content += f"{space}return results\n"
144
+ flow_content += f"{space}return result_dicts\n"
142
145
  return flow_content
143
146
 
144
147
  @staticmethod
@@ -163,42 +166,19 @@ class ExecutionGenerator:
163
166
  if is_async:
164
167
  return "# %%\nawait main()\n"
165
168
  return "# %%\nmain()\n"
169
+ return_type_hint = "list[dict[str, Any]]"
166
170
  if is_async:
167
171
  content += "async def call_main() -> None:\n"
168
- return_type_hint = "list[AsyncRunResponseProtocol]"
169
172
  else:
170
173
  content += "def call_main() -> None:\n"
171
- return_type_hint = "list[RunResponseProtocol]"
172
174
  content += f'{tab}"""Run the main function and print the results."""\n'
173
175
  content += f"{tab}results: {return_type_hint} = "
174
176
  if is_async:
175
177
  content += "await "
176
178
  content += "main()\n"
177
- content += f"{tab}results_dicts: list[dict[str, Any]] = []\n"
178
- content += f"{tab}for result in results:\n"
179
- if is_async:
180
- content += f"{tab}{tab}result_summary = await result.summary\n"
181
- content += f"{tab}{tab}result_messages = await result.messages\n"
182
- content += f"{tab}{tab}result_cost = await result.cost\n"
183
- else:
184
- content += f"{tab}{tab}result_summary = result.summary\n"
185
- content += f"{tab}{tab}result_messages = result.messages\n"
186
- content += f"{tab}{tab}result_cost = result.cost\n"
187
- content += f"{tab}{tab}cost: dict[str, Any] | None = None\n"
188
- content += f"{tab}{tab}if result_cost:\n"
189
- content += f'{tab}{tab}{tab}cost = result_cost.model_dump(mode="json", fallback=str)\n'
190
- content += f"{tab}{tab}results_dicts.append(\n"
191
- content += f"{tab}{tab}{tab}{{\n"
192
- content += f"{tab}{tab}{tab}{tab}'summary': result_summary,\n"
193
- content += f"{tab}{tab}{tab}{tab}'messages': result_messages,\n"
194
- content += f"{tab}{tab}{tab}{tab}'cost': cost,\n"
195
- content += f"{tab}{tab}{tab}}}\n"
196
- content += f"{tab}{tab})\n"
197
- content += "\n"
198
- content += f"{tab}results_dict = {{\n"
199
- content += f"{tab}{tab}'results': results_dicts,\n"
200
- content += f"{tab}}}\n"
201
- content += f"{tab}print(json.dumps(results_dict, indent=2))\n"
179
+ content += (
180
+ f"{tab}print(json.dumps(results, indent=2, ensure_ascii=False))\n"
181
+ )
202
182
  return content
203
183
 
204
184
  @staticmethod
@@ -226,3 +206,45 @@ class ExecutionGenerator:
226
206
  else:
227
207
  content += " call_main()\n"
228
208
  return content
209
+
210
+
211
+ def get_result_dicts_string(space: str, is_async: bool) -> str:
212
+ """Get the result dicts string.
213
+
214
+ Parameters
215
+ ----------
216
+ space : str
217
+ The space string to use for indentation.
218
+ is_async : bool
219
+ Whether the function is asynchronous.
220
+
221
+ Returns
222
+ -------
223
+ str
224
+ The result dicts string.
225
+ """
226
+ flow_content = f"{space}for index, result in enumerate(results):\n"
227
+ if not is_async:
228
+ flow_content += f"{space} result_dict = {{\n"
229
+ flow_content += f"{space} 'index': index,\n"
230
+ flow_content += f"{space} 'messages': result.messages,\n"
231
+ flow_content += f"{space} 'summary': result.summary,\n"
232
+ flow_content += f"{space} 'cost': result.cost.model_dump(mode='json', fallback=str) if result.cost else None,\n"
233
+ flow_content += f"{space} 'context_variables': result.context_variables.model_dump(mode='json', fallback=str) if result.context_variables else None,\n"
234
+ flow_content += f"{space} 'last_speaker': result.last_speaker,\n"
235
+ flow_content += f"{space} 'uuid': str(result.uuid),\n"
236
+ flow_content += f"{space} }}\n"
237
+ else:
238
+ flow_content += f"{space} result_dict = {{\n"
239
+ flow_content += f"{space} 'index': index,\n"
240
+ flow_content += f"{space} 'messages': await result.messages,\n"
241
+ flow_content += f"{space} 'summary': await result.summary,\n"
242
+ flow_content += f"{space} 'cost': (await result.cost).model_dump(mode='json', fallback=str) if await result.cost else None,\n"
243
+ flow_content += f"{space} 'context_variables': (await result.context_variables).model_dump(mode='json', fallback=str) if await result.context_variables else None,\n"
244
+ flow_content += (
245
+ f"{space} 'last_speaker': await result.last_speaker,\n"
246
+ )
247
+ flow_content += f"{space} 'uuid': str(result.uuid),\n"
248
+ flow_content += f"{space} }}\n"
249
+ flow_content += f"{space} result_dicts.append(result_dict)\n"
250
+ return flow_content
@@ -102,29 +102,21 @@ Tags: {", ".join(tags)}
102
102
  """'''
103
103
 
104
104
 
105
- def main_doc_string(is_async: bool) -> str:
105
+ def main_doc_string() -> str:
106
106
  """Generate the docstring for the main function.
107
107
 
108
- Parameters
109
- ----------
110
- is_async : bool
111
- Whether the main function is asynchronous.
112
-
113
108
  Returns
114
109
  -------
115
110
  str
116
111
  The docstring for the main function.
117
112
  """
118
- return_type_hint = (
119
- "AsyncRunResponseProtocol" if is_async else "RunResponseProtocol"
120
- )
113
+ return_type_hint = "list[dict[str, Any]]"
121
114
  return f'''"""Start chatting.
122
115
 
123
116
  Returns
124
117
  -------
125
118
  {return_type_hint}
126
- The result of the chat session, which can be a single ChatResult,
127
- a list of ChatResults, or a dictionary mapping integers to ChatResults.
119
+ The result of the chat session.
128
120
 
129
121
  Raises
130
122
  ------
@@ -193,6 +185,7 @@ def get_common_env_var_setup() -> str:
193
185
  """
194
186
  content = """
195
187
  # Common environment variable setup for Waldiez flows
188
+ load_dotenv(override=True)
196
189
  os.environ["AUTOGEN_USE_DOCKER"] = "0"
197
190
  os.environ["ANONYMIZED_TELEMETRY"] = "False"
198
191
  """
@@ -100,7 +100,8 @@ def sort_imports(
100
100
  third_party_imports.append(import_string)
101
101
  elif position == ImportPosition.LOCAL: # pragma: no branch
102
102
  local_imports.append(import_string)
103
-
103
+ if "from dotenv import load_dotenv" not in third_party_imports:
104
+ third_party_imports.append("from dotenv import load_dotenv")
104
105
  autogen_imports = clean_and_group_autogen_imports(autogen_imports)
105
106
  third_party_imports = ensure_np_import(third_party_imports)
106
107
  sorted_builtins = get_sorted_imports(builtin_imports)
@@ -186,7 +186,8 @@ class ModelsExporter(Exporter[ModelExtras]):
186
186
  for_notebook=self.config.for_notebook,
187
187
  )
188
188
  loader_script = f'''{comment}# NOTE:
189
- # This section assumes that a file named "{self.flow_name}_api_keys"
189
+ # This section assumes that a file named:
190
+ # "{self.flow_name}_api_keys.py"
190
191
  # exists in the same directory as this file.
191
192
  # This file contains the API keys for the models used in this flow.
192
193
  # It should be .gitignored and not shared publicly.
@@ -176,7 +176,8 @@ class ToolsExporter(Exporter[ToolExtras]):
176
176
  for_notebook=self.config.for_notebook,
177
177
  )
178
178
  loader_script = f'''{comment}# NOTE:
179
- # This section assumes that a file named "{self.flow_name}_{tool_name}_secrets"
179
+ # This section assumes that a file named:
180
+ # "{self.flow_name}_{tool_name}_secrets.py"
180
181
  # exists in the same directory as this file.
181
182
  # This file contains the secrets for the tool used in this flow.
182
183
  # It should be .gitignored and not shared publicly.
@@ -192,7 +192,12 @@ ag2_{tool_name} = ag2_{tool_name}_interop.convert_tool(
192
192
  )
193
193
  f.write("import os\n\n")
194
194
  for key, value in tool.secrets.items():
195
- f.write(f'os.environ["{key}"] = "{value}"\n')
195
+ # f.write(f'os.environ["{key}"] = "{value}"\n')
196
+ # check first if the key already exists in os.environ
197
+ f.write(
198
+ f'os.environ["{key}"] = '
199
+ f'os.environ.get("{key}", "{value}")\n'
200
+ )
196
201
  except Exception as exc: # pragma: no cover
197
202
  raise ExporterContentError(
198
203
  f"Failed to write secrets file for tool '{tool_name}': {exc}"
@@ -338,11 +338,11 @@ def set_bedrock_aws_config(
338
338
  value = getattr(aws_config, param, "") if aws_config else ""
339
339
 
340
340
  # If not found, try environment variable
341
- if not value: # pragma: no cover
341
+ if not value or value == "REPLACE_ME": # pragma: no cover
342
342
  value = os.environ.get(env_var, "")
343
343
 
344
344
  # Add to extra_args if value exists
345
- if value: # pragma: no branch
345
+ if value and value != "REPLACE_ME": # pragma: no branch
346
346
  extra_args[config_key] = value
347
347
 
348
348
  # Update llm_config with extra_args
@@ -16,10 +16,9 @@ class GoogleSearchToolImpl(PredefinedTool):
16
16
 
17
17
  required_secrets: list[str] = [
18
18
  "GOOGLE_SEARCH_API_KEY",
19
+ "GOOGLE_SEARCH_ENGINE_ID",
19
20
  ]
20
- required_kwargs: dict[str, type] = {
21
- "google_search_engine_id": str,
22
- }
21
+ required_kwargs: dict[str, type] = {}
23
22
  _kwargs: dict[str, Any] = {}
24
23
 
25
24
  @property
@@ -138,25 +137,15 @@ class GoogleSearchToolImpl(PredefinedTool):
138
137
  str
139
138
  The content for the tool.
140
139
  """
141
- os.environ["GOOGLE_SEARCH_API_KEY"] = secrets.get(
142
- "GOOGLE_SEARCH_API_KEY", ""
143
- )
144
- google_search_engine_id = self.google_search_engine_id
145
- if not google_search_engine_id:
146
- google_search_engine_id = secrets.get("GOOGLE_SEARCH_ENGINE_ID", "")
147
140
  content = f'''
148
141
  def {self.name}(
149
142
  query: str,
150
- search_api_key: str,
151
- search_engine_id: str,
152
143
  num_results: int = 10,
153
144
  ) -> list[dict[str, Any]]:
154
145
  """Perform a Google search and return formatted results.
155
146
 
156
147
  Args:
157
148
  query: The search query string.
158
- search_api_key: The API key for the Google Search API.
159
- search_engine_id: The search engine ID for the Google Search API.
160
149
  num_results: The maximum number of results to return. Defaults to 10.
161
150
  Returns:
162
151
  A list of dictionaries of the search results.
@@ -164,14 +153,17 @@ def {self.name}(
164
153
  google_search_api_key = os.environ.get("GOOGLE_SEARCH_API_KEY", "")
165
154
  if not google_search_api_key:
166
155
  raise ValueError("GOOGLE_SEARCH_API_KEY is required for Google search tool.")
156
+ google_search_engine_id = os.environ.get("GOOGLE_SEARCH_ENGINE_ID", "")
157
+ if not google_search_engine_id:
158
+ raise ValueError("Google Search Engine ID is required for Google search tool.")
167
159
  {self.name}_tool = GoogleSearchTool(
168
160
  search_api_key=google_search_api_key,
169
- search_engine_id="{google_search_engine_id}",
161
+ search_engine_id=google_search_engine_id,
170
162
  )
171
163
  return {self.name}_tool(
172
164
  query=query,
173
- search_api_key=search_api_key,
174
- search_engine_id=search_engine_id,
165
+ search_api_key=google_search_api_key,
166
+ search_engine_id=google_search_engine_id,
175
167
  num_results=num_results
176
168
  )
177
169
  '''
@@ -4,7 +4,6 @@
4
4
  # flake8: noqa: E501
5
5
  """Predefined Perplexity AI search tool for Waldiez."""
6
6
 
7
- import os
8
7
  from typing import Any
9
8
 
10
9
  from ._config import PredefinedToolConfig
@@ -120,21 +119,23 @@ class PerplexitySearchToolImpl(PredefinedTool):
120
119
  str
121
120
  Content retrieved by the tool.
122
121
  """
123
- os.environ["PERPLEXITY_API_KEY"] = secrets.get("PERPLEXITY_API_KEY", "")
122
+ model = self.kwargs["model"]
123
+ max_tokens = self.kwargs["max_tokens"]
124
+ search_domain_filter = self.kwargs["search_domain_filter"]
124
125
  content = f'''
125
126
  def {self.name}(
126
127
  query: str,
127
- model: str = "{self.kwargs["model"]}",
128
- max_tokens: int = {self.kwargs["max_tokens"]},
129
- search_domain_filter: Optional[list[str]] = {self.kwargs["search_domain_filter"]},
128
+ model: str = "{model}",
129
+ max_tokens: int = {max_tokens},
130
+ search_domain_filter: Optional[list[str]] = {search_domain_filter},
130
131
  ) -> "SearchResponse":
131
132
  """Perform a Perplexity AI search and return formatted results.
132
133
 
133
134
  Args:
134
135
  query: The search query string.
135
- model: The model to use for the search. Defaults to "{self.kwargs["model"]}".
136
- max_tokens: The maximum number of tokens to return. Defaults to {self.kwargs["max_tokens"]}.
137
- search_domain_filter: List of domain filters for the search. Defaults to {self.kwargs["search_domain_filter"]}.
136
+ model: The model to use for the search. Defaults to "{model}".
137
+ max_tokens: The maximum number of tokens to return. Defaults to {max_tokens}.
138
+ search_domain_filter: List of domain filters for the search. Defaults to {search_domain_filter}.
138
139
  Returns:
139
140
  A list of dictionaries of the search results.
140
141
  """
@@ -4,7 +4,6 @@
4
4
  # flake8: noqa: E501
5
5
  """Predefined Tavily search tool for Waldiez."""
6
6
 
7
- import os
8
7
  from typing import Any
9
8
 
10
9
  from ._config import PredefinedToolConfig
@@ -98,13 +97,9 @@ class TavilySearchToolImpl(PredefinedTool):
98
97
  str
99
98
  The content for the tool.
100
99
  """
101
- os.environ["TAVILY_API_KEY"] = secrets.get(
102
- "TAVILY_API_KEY", os.environ.get("TAVILY_API_KEY", "")
103
- )
104
100
  content = f'''
105
101
  def {self.name}(
106
102
  query: str,
107
- tavily_api_key: str = os.environ.get("TAVILY_API_KEY", ""),
108
103
  search_depth: str = "basic",
109
104
  topic: str = "general",
110
105
  include_answer: str = "basic",
@@ -116,7 +111,6 @@ def {self.name}(
116
111
 
117
112
  Args:
118
113
  query: The search query string.
119
- tavily_api_key: The API key for Tavily (injected dependency).
120
114
  search_depth: The depth of the search ('basic' or 'advanced'). Defaults to "basic".
121
115
  include_answer: Whether to include an AI-generated answer ('basic' or 'advanced'). Defaults to "basic".
122
116
  include_raw_content: Whether to include raw content in the results. Defaults to False.
@@ -4,7 +4,6 @@
4
4
  # flake8: noqa: E501
5
5
  """Predefined YouTube search tool for Waldiez."""
6
6
 
7
- import os
8
7
  from typing import Any
9
8
 
10
9
  from ._config import PredefinedToolConfig
@@ -101,11 +100,9 @@ class YouTubeSearchToolImpl(PredefinedTool):
101
100
  str
102
101
  The content for the tool.
103
102
  """
104
- os.environ["YOUTUBE_API_KEY"] = secrets.get("YOUTUBE_API_KEY", "")
105
103
  content = f'''
106
104
  def {self.name}(
107
105
  query: str,
108
- youtube_api_key: str = os.environ.get("YOUTUBE_API_KEY", ""),
109
106
  max_results: int = 5,
110
107
  include_video_details: bool = True,
111
108
  ) -> list[dict[str, Any]]:
@@ -113,7 +110,6 @@ def {self.name}(
113
110
 
114
111
  Args:
115
112
  query: The search query string.
116
- youtube_api_key: The API key for the YouTube Data API.
117
113
  max_results: The maximum number of results to return. Defaults to 5.
118
114
  include_video_details: Whether to include detailed video information. Defaults to True.
119
115