fastworkflow 2.17.35__tar.gz → 2.18.2__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.
Files changed (184) hide show
  1. fastworkflow-2.17.35/README.md → fastworkflow-2.18.2/PKG-INFO +85 -1
  2. fastworkflow-2.17.35/PKG-INFO → fastworkflow-2.18.2/README.md +33 -46
  3. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/cli.py +33 -0
  4. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/fastworkflow.env +9 -0
  5. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/model_pipeline_training.py +21 -3
  6. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/dspy_logger.py +1 -1
  7. fastworkflow-2.18.2/pyproject.toml +117 -0
  8. fastworkflow-2.17.35/pyproject.toml +0 -85
  9. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/LICENSE +0 -0
  10. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/.DS_Store +0 -0
  11. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/__init__.py +0 -0
  12. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_commands/.gitkeep +0 -0
  13. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/__init__.py +0 -0
  14. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/__init__.py +0 -0
  15. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/abort.py +0 -0
  16. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/you_misunderstood.py +0 -0
  17. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/go_up.py +0 -0
  18. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/reset_context.py +0 -0
  19. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_can_i_do.py +0 -0
  20. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_is_current_context.py +0 -0
  21. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/_commands/__init__.py +0 -0
  22. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/_commands/wildcard.py +0 -0
  23. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/command_context_model.json +0 -0
  24. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/intent_detection.py +0 -0
  25. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/_workflows/command_metadata_extraction/parameter_extraction.py +0 -0
  26. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/__main__.py +0 -0
  27. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/ast_class_extractor.py +0 -0
  28. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/class_analysis_structures.py +0 -0
  29. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/cli_specification.md +0 -0
  30. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/command_dependency_resolver.py +0 -0
  31. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/command_file_generator.py +0 -0
  32. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/command_file_template.py +0 -0
  33. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/command_import_utils.py +0 -0
  34. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/command_stub_generator.py +0 -0
  35. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/context_folder_generator.py +0 -0
  36. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/context_model_generator.py +0 -0
  37. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/dependency_manager.py +0 -0
  38. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/dir_scanner.py +0 -0
  39. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/documentation_generator.py +0 -0
  40. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/genai_postprocessor.py +0 -0
  41. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/inheritance_block_regenerator.py +0 -0
  42. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/libcst_transformers.py +0 -0
  43. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/navigator_stub_generator.py +0 -0
  44. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/pydantic_model_generator.py +0 -0
  45. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/build/utterance_generator.py +0 -0
  46. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/cache_matching.py +0 -0
  47. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/chat_session.py +0 -0
  48. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/command_context_model.py +0 -0
  49. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/command_directory.py +0 -0
  50. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/command_executor.py +0 -0
  51. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/command_interfaces.py +0 -0
  52. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/command_metadata_api.py +0 -0
  53. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/command_routing.py +0 -0
  54. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/docs/context_modules_prd.txt +0 -0
  55. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/extended_workflow_example/README.md +0 -0
  56. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/extended_workflow_example/_commands/WorkItem/get_status.py +0 -0
  57. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/extended_workflow_example/_commands/generate_report.py +0 -0
  58. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/extended_workflow_example/_commands/startup.py +0 -0
  59. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/extended_workflow_example/simple_workflow_template.json +0 -0
  60. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/extended_workflow_example/workflow_inheritance_model.json +0 -0
  61. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/fastworkflow.passwords.env +0 -0
  62. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/hello_world/_commands/README.md +0 -0
  63. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/hello_world/_commands/add_two_numbers.py +0 -0
  64. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/hello_world/_commands/context_inheritance_model.json +0 -0
  65. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/hello_world/application/add_two_numbers.py +0 -0
  66. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_1/_commands/context_inheritance_model.json +0 -0
  67. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_1/_commands/send_message.py +0 -0
  68. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_1/application/send_message.py +0 -0
  69. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_2/_commands/User/send_message.py +0 -0
  70. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_2/_commands/context_inheritance_model.json +0 -0
  71. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_2/_commands/startup.py +0 -0
  72. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_2/application/user.py +0 -0
  73. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_3/_commands/PremiumUser/send_priority_message.py +0 -0
  74. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_3/_commands/User/send_message.py +0 -0
  75. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_3/_commands/context_inheritance_model.json +0 -0
  76. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_3/_commands/initialize_user.py +0 -0
  77. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_3/application/user.py +0 -0
  78. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/_ChatRoom.py +0 -0
  79. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/add_user.py +0 -0
  80. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/broadcast_message.py +0 -0
  81. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/get_current_user.py +0 -0
  82. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/list_users.py +0 -0
  83. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/set_current_user.py +0 -0
  84. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/_PremiumUser.py +0 -0
  85. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/send_priority_message.py +0 -0
  86. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/User/_User.py +0 -0
  87. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/User/send_message.py +0 -0
  88. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/context_inheritance_model.json +0 -0
  89. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/_commands/set_root_context.py +0 -0
  90. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/application/chatroom.py +0 -0
  91. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/application/user.py +0 -0
  92. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/context_hierarchy_model.json +0 -0
  93. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/messaging_app_4/startup_action.json +0 -0
  94. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/calculate.py +0 -0
  95. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/cancel_pending_order.py +0 -0
  96. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/exchange_delivered_order_items.py +0 -0
  97. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_email.py +0 -0
  98. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_name_zip.py +0 -0
  99. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/get_order_details.py +0 -0
  100. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/get_product_details.py +0 -0
  101. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/get_user_details.py +0 -0
  102. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/list_all_product_types.py +0 -0
  103. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_address.py +0 -0
  104. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_items.py +0 -0
  105. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_payment.py +0 -0
  106. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/modify_user_address.py +0 -0
  107. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/return_delivered_order_items.py +0 -0
  108. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/_commands/transfer_to_human_agents.py +0 -0
  109. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/context_inheritance_model.json +0 -0
  110. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/retail_data/__init__.py +0 -0
  111. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/retail_data/orders.json +0 -0
  112. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/retail_data/products.json +0 -0
  113. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/retail_data/users.json +0 -0
  114. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/calculate.py +0 -0
  115. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/cancel_pending_order.py +0 -0
  116. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/exchange_delivered_order_items.py +0 -0
  117. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_email.py +0 -0
  118. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_name_zip.py +0 -0
  119. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/get_order_details.py +0 -0
  120. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/get_product_details.py +0 -0
  121. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/get_user_details.py +0 -0
  122. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/list_all_product_types.py +0 -0
  123. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_address.py +0 -0
  124. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_items.py +0 -0
  125. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_payment.py +0 -0
  126. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/modify_user_address.py +0 -0
  127. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/return_delivered_order_items.py +0 -0
  128. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/think.py +0 -0
  129. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/tool.py +0 -0
  130. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/tools/transfer_to_human_agents.py +0 -0
  131. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/retail_workflow/workflow_description.txt +0 -0
  132. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/__init__.py +0 -0
  133. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/_WorkItem.py +0 -0
  134. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/add_child_workitem.py +0 -0
  135. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/get_status.py +0 -0
  136. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/go_to_workitem.py +0 -0
  137. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/mark_as_complete.py +0 -0
  138. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_first_child_workitem.py +0 -0
  139. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_last_child_workitem.py +0 -0
  140. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_next_workitem.py +0 -0
  141. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_previous_workitem.py +0 -0
  142. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_all_child_workitems.py +0 -0
  143. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_child_workitem.py +0 -0
  144. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/show_schema.py +0 -0
  145. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/_commands/startup.py +0 -0
  146. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/application/__init__.py +0 -0
  147. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/application/workitem.py +0 -0
  148. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/simple_workflow_template.json +0 -0
  149. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/examples/simple_workflow_template/startup_action.json +0 -0
  150. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/intent_clarification_agent.py +0 -0
  151. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/mcp_server.py +0 -0
  152. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/refine/__main__.py +0 -0
  153. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run/__init__.py +0 -0
  154. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run/__main__.py +0 -0
  155. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run_fastapi_mcp/README.md +0 -0
  156. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run_fastapi_mcp/__init__.py +0 -0
  157. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run_fastapi_mcp/__main__.py +0 -0
  158. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run_fastapi_mcp/conversation_store.py +0 -0
  159. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run_fastapi_mcp/jwt_manager.py +0 -0
  160. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run_fastapi_mcp/mcp_specific.py +0 -0
  161. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run_fastapi_mcp/redoc_2_standalone_html.py +0 -0
  162. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/run_fastapi_mcp/utils.py +0 -0
  163. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/train/__init__.py +0 -0
  164. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/train/__main__.py +0 -0
  165. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/train/generate_synthetic.py +0 -0
  166. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/user_message_queues.py +0 -0
  167. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/__init__.py +0 -0
  168. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/chat_adapter.py +0 -0
  169. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/context_utils.py +0 -0
  170. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/dspy_cache_utils.py +0 -0
  171. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/dspy_utils.py +0 -0
  172. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/env.py +0 -0
  173. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/fuzzy_match.py +0 -0
  174. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/generate_param_examples.py +0 -0
  175. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/logging.py +0 -0
  176. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/parameterize_func_decorator.py +0 -0
  177. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/pydantic_model_2_dspy_signature_class.py +0 -0
  178. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/python_utils.py +0 -0
  179. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/react.py +0 -0
  180. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/signatures.py +0 -0
  181. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/utils/startup_progress.py +0 -0
  182. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/workflow.py +0 -0
  183. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/workflow_agent.py +0 -0
  184. {fastworkflow-2.17.35 → fastworkflow-2.18.2}/fastworkflow/workflow_inheritance_model.py +0 -0
@@ -1,3 +1,55 @@
1
+ Metadata-Version: 2.1
2
+ Name: fastworkflow
3
+ Version: 2.18.2
4
+ Summary: A framework for rapidly building large-scale, deterministic, interactive workflows with a fault-tolerant, conversational UX
5
+ License: Apache-2.0
6
+ Keywords: fastworkflow,ai,workflow,llm,openai
7
+ Author: Dhar Rawal
8
+ Author-email: drawal@radiantlogic.com
9
+ Requires-Python: >=3.11,<3.14
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Provides-Extra: fastapi
15
+ Provides-Extra: server
16
+ Provides-Extra: training
17
+ Requires-Dist: aiohttp (>=3.13.4)
18
+ Requires-Dist: colorama (>=0.4.6,<0.5.0)
19
+ Requires-Dist: cryptography (>=46.0.7)
20
+ Requires-Dist: datasets (>=4.0.0,<5.0.0) ; extra == "training"
21
+ Requires-Dist: dspy (>=3.0.1,<4.0.0)
22
+ Requires-Dist: fastapi (>=0.120.1) ; extra == "server" or extra == "fastapi"
23
+ Requires-Dist: fastapi-mcp (>=0.4.0,<0.5.0) ; extra == "server" or extra == "fastapi"
24
+ Requires-Dist: filelock (>=3.20.1)
25
+ Requires-Dist: idna (>=3.15)
26
+ Requires-Dist: libcst (>=1.8.2,<2.0.0)
27
+ Requires-Dist: litellm (>=1.83.7,<2.0.0)
28
+ Requires-Dist: mmh3 (>=5.1.0,<6.0.0)
29
+ Requires-Dist: openai (>=2.8.0)
30
+ Requires-Dist: orjson (>=3.11.6)
31
+ Requires-Dist: prompt_toolkit (>=3.0.43,<4.0.0)
32
+ Requires-Dist: pyarrow (>=23.0.1)
33
+ Requires-Dist: pyasn1 (>=0.6.3)
34
+ Requires-Dist: pydantic (>=2.9.2,<3.0.0)
35
+ Requires-Dist: pygments (>=2.20.0)
36
+ Requires-Dist: pyjwt[crypto] (>=2.13.0) ; extra == "server" or extra == "fastapi"
37
+ Requires-Dist: python-dotenv (>=1.2.2,<2.0.0)
38
+ Requires-Dist: python-levenshtein (>=0.27.1,<0.28.0)
39
+ Requires-Dist: python-multipart (>=0.0.27) ; extra == "server" or extra == "fastapi"
40
+ Requires-Dist: requests (>=2.33.0)
41
+ Requires-Dist: scikit-learn (>=1.6.1,<2.0.0)
42
+ Requires-Dist: sentencepiece (>=0.2.0,<0.3.0)
43
+ Requires-Dist: speedict (>=0.3.12,<0.4.0)
44
+ Requires-Dist: starlette (>=0.49.1) ; extra == "server" or extra == "fastapi"
45
+ Requires-Dist: torch (>=2.7.1,<3.0.0)
46
+ Requires-Dist: transformers (>=4.48.2,<6.0.0)
47
+ Requires-Dist: urllib3 (>=2.7.0)
48
+ Requires-Dist: uvicorn (>=0.33.0) ; extra == "server" or extra == "fastapi"
49
+ Project-URL: homepage, https://github.com/radiantlogicinc/fastworkflow
50
+ Project-URL: repository, https://github.com/radiantlogicinc/fastworkflow
51
+ Description-Content-Type: text/markdown
52
+
1
53
  <!-- Logo and Title -->
2
54
  <img src="logo.png" height="64" alt="fastWorkflow Logo and Title">
3
55
 
@@ -149,6 +201,33 @@ uv pip install fastworkflow
149
201
  - `fastWorkflow` requires Python 3.11+ or higher.
150
202
  - Training (`fastworkflow train`) also expects the optional Hugging Face `datasets` package. Install it by including the dev group when using Poetry.
151
203
 
204
+ ### Optional extras
205
+
206
+ The core install depends on **plain** `litellm` (used only as a client via `dspy.LM`) and pulls **no** proxy-server packages, so it stays lean and co-installs cleanly with downstream apps that pin a plain `litellm` (e.g. `litellm>=1.83.11,<1.84.0`). Server- and training-only dependencies are gated behind extras:
207
+
208
+ | Extra | Install | Provides |
209
+ | --- | --- | --- |
210
+ | `server` | `pip install "fastworkflow[server]"` | The FastAPI-MCP HTTP service (`fastworkflow run_fastapi_mcp`): `fastapi`, `uvicorn`, `fastapi-mcp`, `pyjwt[crypto]`, `python-multipart`, `starlette` (with security-patched floors). |
211
+ | `training` | `pip install "fastworkflow[training]"` | The Hugging Face `datasets` package required by `fastworkflow train` for synthetic-utterance / parameter-example generation. |
212
+
213
+ The `server` extra is only needed to *host* the FastAPI-MCP service.
214
+
215
+ ### Dependency compatibility
216
+
217
+ `fastWorkflow` is designed to co-install with modern ML/LLM stacks. The key supported ranges are:
218
+
219
+ | Package | Supported range | Notes |
220
+ | --- | --- | --- |
221
+ | `transformers` | `>=4.48.2,<6.0.0` | Works on transformers 5.x. The intent-detection base models are BERT/DistilBERT checkpoints that load natively on 5.x (no slow→fast tokenizer conversion required). |
222
+ | `dspy` | `>=3.0.1,<4.0.0` | Migrated off the dspy 2.x API. |
223
+ | `openai` | `>=2.8.0` | Compatible with openai 2.x. |
224
+ | `litellm` | `>=1.83.7,<2.0.0` | Core depends on **plain** `litellm` (client only, no `[proxy]` extra), so downstreams can pin e.g. `litellm>=1.83.11,<1.84.0` without pulling the proxy server stack. The FastAPI-MCP server deps live in the optional `fastworkflow[server]` extra. |
225
+ | `sentence-transformers` | not a dependency | `fastWorkflow` does not depend on `sentence-transformers`, so it imposes no constraint (use any 5.x version downstream). |
226
+
227
+ `sentencepiece` is bundled as a dependency because transformers 5.x can require it to instantiate certain tokenizers.
228
+
229
+ The intent-detection base models are configurable via environment variables (`INTENT_DETECTION_TINY_MODEL`, `INTENT_DETECTION_LARGE_MODEL`); see `fastworkflow.env`.
230
+
152
231
  ---
153
232
 
154
233
  ## Quick Start: Running an Example in 5 Minutes
@@ -551,6 +630,9 @@ For workflows with complex initialization requirements, creating a dedicated sta
551
630
 
552
631
  For production deployments and integrations, fastWorkflow provides a FastAPI-based HTTP service via the `run_fastapi_mcp` module. This exposes your workflow as REST endpoints with JWT authentication, SSE streaming, and MCP (Model Context Protocol) support.
553
632
 
633
+ > [!note]
634
+ > The FastAPI-MCP service requires the optional `server` extra: `pip install "fastworkflow[server]"` (or `poetry install --extras server`). Running `fastworkflow run_fastapi_mcp` without it fails fast with a clear install hint.
635
+
554
636
  ```sh
555
637
  # Run the FastAPI service
556
638
  python -m fastworkflow.run_fastapi_mcp \
@@ -684,6 +766,8 @@ This single command will generate the `greet.py` command, `get_properties` and `
684
766
  | `LLM_AGENT` | LiteLLM model string for the DSPy agent | `run` (agent mode) | `mistral/mistral-small-latest` |
685
767
  | `LLM_CONVERSATION_STORE` | LiteLLM model string for conversation topic/summary generation | FastAPI service | `mistral/mistral-small-latest` |
686
768
  | `LITELLM_PROXY_API_BASE` | URL of your LiteLLM Proxy server | When using `litellm_proxy/` models | *not set* |
769
+ | `INTENT_DETECTION_TINY_MODEL` | HuggingFace model id for the small intent-detection model | `train` (optional) | `google/bert_uncased_L-4_H-128_A-2` |
770
+ | `INTENT_DETECTION_LARGE_MODEL` | HuggingFace model id for the large intent-detection model | `train` (optional) | `distilbert-base-uncased` |
687
771
  | `NOT_FOUND` | Placeholder value for missing parameters during extraction | Always | `"NOT_FOUND"` |
688
772
  | `MISSING_INFORMATION_ERRMSG` | Error message prefix for missing parameters | Always | `"Missing required..."` |
689
773
  | `INVALID_INFORMATION_ERRMSG` | Error message prefix for invalid parameters | Always | `"Invalid information..."` |
@@ -762,4 +846,4 @@ Interested in contributing to `fastWorkflow` itself? Great!
762
846
 
763
847
  ## License
764
848
 
765
- `fastWorkflow` is released under the Apache License 2.0
849
+ `fastWorkflow` is released under the Apache License 2.0
@@ -1,48 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: fastworkflow
3
- Version: 2.17.35
4
- Summary: A framework for rapidly building large-scale, deterministic, interactive workflows with a fault-tolerant, conversational UX
5
- License: Apache-2.0
6
- Keywords: fastworkflow,ai,workflow,llm,openai
7
- Author: Dhar Rawal
8
- Author-email: drawal@radiantlogic.com
9
- Requires-Python: >=3.11,<3.14
10
- Classifier: License :: OSI Approved :: Apache Software License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Provides-Extra: fastapi
15
- Provides-Extra: training
16
- Requires-Dist: aiohttp (>=3.13.3)
17
- Requires-Dist: colorama (>=0.4.6,<0.5.0)
18
- Requires-Dist: datasets (>=4.0.0,<5.0.0) ; extra == "training"
19
- Requires-Dist: dspy (>=3.0.1,<4.0.0)
20
- Requires-Dist: fastapi (>=0.120.1) ; extra == "fastapi"
21
- Requires-Dist: fastapi-mcp (>=0.4.0,<0.5.0) ; extra == "fastapi"
22
- Requires-Dist: filelock (>=3.20.1)
23
- Requires-Dist: libcst (>=1.8.2,<2.0.0)
24
- Requires-Dist: litellm[proxy] (>=1.81.4,<2.0.0)
25
- Requires-Dist: mmh3 (>=5.1.0,<6.0.0)
26
- Requires-Dist: openai (>=2.8.0)
27
- Requires-Dist: orjson (>=3.9.15)
28
- Requires-Dist: prompt_toolkit (>=3.0.43,<4.0.0)
29
- Requires-Dist: pyasn1 (>=0.6.2)
30
- Requires-Dist: pydantic (>=2.9.2,<3.0.0)
31
- Requires-Dist: pyjwt[crypto] (>=2.4.0) ; extra == "fastapi"
32
- Requires-Dist: pynacl (>=1.6.2)
33
- Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
34
- Requires-Dist: python-levenshtein (>=0.27.1,<0.28.0)
35
- Requires-Dist: scikit-learn (>=1.6.1,<2.0.0)
36
- Requires-Dist: speedict (>=0.3.12,<0.4.0)
37
- Requires-Dist: starlette (>=0.49.1)
38
- Requires-Dist: torch (>=2.7.1,<3.0.0)
39
- Requires-Dist: transformers (>=4.48.2,<5.0.0)
40
- Requires-Dist: urllib3 (>=2.6.0)
41
- Requires-Dist: uvicorn (>=0.31.1,<0.32.0) ; extra == "fastapi"
42
- Project-URL: homepage, https://github.com/radiantlogicinc/fastworkflow
43
- Project-URL: repository, https://github.com/radiantlogicinc/fastworkflow
44
- Description-Content-Type: text/markdown
45
-
46
1
  <!-- Logo and Title -->
47
2
  <img src="logo.png" height="64" alt="fastWorkflow Logo and Title">
48
3
 
@@ -194,6 +149,33 @@ uv pip install fastworkflow
194
149
  - `fastWorkflow` requires Python 3.11+ or higher.
195
150
  - Training (`fastworkflow train`) also expects the optional Hugging Face `datasets` package. Install it by including the dev group when using Poetry.
196
151
 
152
+ ### Optional extras
153
+
154
+ The core install depends on **plain** `litellm` (used only as a client via `dspy.LM`) and pulls **no** proxy-server packages, so it stays lean and co-installs cleanly with downstream apps that pin a plain `litellm` (e.g. `litellm>=1.83.11,<1.84.0`). Server- and training-only dependencies are gated behind extras:
155
+
156
+ | Extra | Install | Provides |
157
+ | --- | --- | --- |
158
+ | `server` | `pip install "fastworkflow[server]"` | The FastAPI-MCP HTTP service (`fastworkflow run_fastapi_mcp`): `fastapi`, `uvicorn`, `fastapi-mcp`, `pyjwt[crypto]`, `python-multipart`, `starlette` (with security-patched floors). |
159
+ | `training` | `pip install "fastworkflow[training]"` | The Hugging Face `datasets` package required by `fastworkflow train` for synthetic-utterance / parameter-example generation. |
160
+
161
+ The `server` extra is only needed to *host* the FastAPI-MCP service.
162
+
163
+ ### Dependency compatibility
164
+
165
+ `fastWorkflow` is designed to co-install with modern ML/LLM stacks. The key supported ranges are:
166
+
167
+ | Package | Supported range | Notes |
168
+ | --- | --- | --- |
169
+ | `transformers` | `>=4.48.2,<6.0.0` | Works on transformers 5.x. The intent-detection base models are BERT/DistilBERT checkpoints that load natively on 5.x (no slow→fast tokenizer conversion required). |
170
+ | `dspy` | `>=3.0.1,<4.0.0` | Migrated off the dspy 2.x API. |
171
+ | `openai` | `>=2.8.0` | Compatible with openai 2.x. |
172
+ | `litellm` | `>=1.83.7,<2.0.0` | Core depends on **plain** `litellm` (client only, no `[proxy]` extra), so downstreams can pin e.g. `litellm>=1.83.11,<1.84.0` without pulling the proxy server stack. The FastAPI-MCP server deps live in the optional `fastworkflow[server]` extra. |
173
+ | `sentence-transformers` | not a dependency | `fastWorkflow` does not depend on `sentence-transformers`, so it imposes no constraint (use any 5.x version downstream). |
174
+
175
+ `sentencepiece` is bundled as a dependency because transformers 5.x can require it to instantiate certain tokenizers.
176
+
177
+ The intent-detection base models are configurable via environment variables (`INTENT_DETECTION_TINY_MODEL`, `INTENT_DETECTION_LARGE_MODEL`); see `fastworkflow.env`.
178
+
197
179
  ---
198
180
 
199
181
  ## Quick Start: Running an Example in 5 Minutes
@@ -596,6 +578,9 @@ For workflows with complex initialization requirements, creating a dedicated sta
596
578
 
597
579
  For production deployments and integrations, fastWorkflow provides a FastAPI-based HTTP service via the `run_fastapi_mcp` module. This exposes your workflow as REST endpoints with JWT authentication, SSE streaming, and MCP (Model Context Protocol) support.
598
580
 
581
+ > [!note]
582
+ > The FastAPI-MCP service requires the optional `server` extra: `pip install "fastworkflow[server]"` (or `poetry install --extras server`). Running `fastworkflow run_fastapi_mcp` without it fails fast with a clear install hint.
583
+
599
584
  ```sh
600
585
  # Run the FastAPI service
601
586
  python -m fastworkflow.run_fastapi_mcp \
@@ -729,6 +714,8 @@ This single command will generate the `greet.py` command, `get_properties` and `
729
714
  | `LLM_AGENT` | LiteLLM model string for the DSPy agent | `run` (agent mode) | `mistral/mistral-small-latest` |
730
715
  | `LLM_CONVERSATION_STORE` | LiteLLM model string for conversation topic/summary generation | FastAPI service | `mistral/mistral-small-latest` |
731
716
  | `LITELLM_PROXY_API_BASE` | URL of your LiteLLM Proxy server | When using `litellm_proxy/` models | *not set* |
717
+ | `INTENT_DETECTION_TINY_MODEL` | HuggingFace model id for the small intent-detection model | `train` (optional) | `google/bert_uncased_L-4_H-128_A-2` |
718
+ | `INTENT_DETECTION_LARGE_MODEL` | HuggingFace model id for the large intent-detection model | `train` (optional) | `distilbert-base-uncased` |
732
719
  | `NOT_FOUND` | Placeholder value for missing parameters during extraction | Always | `"NOT_FOUND"` |
733
720
  | `MISSING_INFORMATION_ERRMSG` | Error message prefix for missing parameters | Always | `"Missing required..."` |
734
721
  | `INVALID_INFORMATION_ERRMSG` | Error message prefix for invalid parameters | Always | `"Invalid information..."` |
@@ -807,4 +794,4 @@ Interested in contributing to `fastWorkflow` itself? Great!
807
794
 
808
795
  ## License
809
796
 
810
- `fastWorkflow` is released under the Apache License 2.0
797
+ `fastWorkflow` is released under the Apache License 2.0
@@ -381,8 +381,41 @@ def run_with_defaults(args): # sourcery skip: extract-duplicate-method
381
381
  from .run.__main__ import run_main as _run_main
382
382
  return _run_main(args)
383
383
 
384
+ def _require_server_extra():
385
+ """Ensure the optional `server` extra is installed before launching the FastAPI-MCP service.
386
+
387
+ The FastAPI-MCP server (`fastworkflow run_fastapi_mcp`) is the only feature that
388
+ needs the server-only dependencies (fastapi, uvicorn, fastapi-mcp, pyjwt). These
389
+ live behind the optional `fastworkflow[server]` extra so that the core/client
390
+ install (and `fastworkflow train`) stays lean. Fail early with a clear, actionable
391
+ message instead of letting the subprocess die with a bare ImportError.
392
+ """
393
+ import importlib.util
394
+
395
+ if missing := [
396
+ pkg
397
+ for pkg, mod in (
398
+ ("fastapi", "fastapi"),
399
+ ("uvicorn", "uvicorn"),
400
+ ("fastapi-mcp", "fastapi_mcp"),
401
+ ("pyjwt", "jwt"),
402
+ )
403
+ if importlib.util.find_spec(mod) is None
404
+ ]:
405
+ rprint(
406
+ "[bold red]Error:[/bold red] the FastAPI-MCP server requires the optional "
407
+ "'server' extra, which is not installed.\n"
408
+ f"Missing packages: {', '.join(missing)}\n\n"
409
+ "Install it with one of:\n"
410
+ " pip install \"fastworkflow[server]\"\n"
411
+ " poetry install --extras server"
412
+ )
413
+ sys.exit(1)
414
+
415
+
384
416
  def run_fastapi_mcp_with_defaults(args): # sourcery skip: extract-duplicate-method
385
417
  """Wrapper for fastapi mcp server that sets default env file paths based on context."""
418
+ _require_server_extra()
386
419
  if args.env_file_path is None or args.passwords_file_path is None:
387
420
  default_env, default_passwords = find_default_env_files(args.workflow_path)
388
421
  if args.env_file_path is None:
@@ -21,6 +21,15 @@ LLM_CONVERSATION_STORE=mistral/mistral-small-latest
21
21
  # The proxy API key should be set in fastworkflow.passwords.env
22
22
  # LITELLM_PROXY_API_BASE=http://127.0.0.1:4000
23
23
 
24
+ # ============================================================================
25
+ # Intent-detection base models (Optional)
26
+ # ============================================================================
27
+ # The intent-detection trainer uses two small HuggingFace models. These defaults
28
+ # are BERT/DistilBERT checkpoints that are natively compatible with transformers
29
+ # 4.48+ and 5.x (they ship a model_type and a loadable tokenizer).
30
+ # INTENT_DETECTION_TINY_MODEL=google/bert_uncased_L-4_H-128_A-2
31
+ # INTENT_DETECTION_LARGE_MODEL=distilbert-base-uncased
32
+
24
33
  # ============================================================================
25
34
  # Workflow Configuration
26
35
  # ============================================================================
@@ -1,5 +1,5 @@
1
1
  import os
2
- from typing import Optional, ClassVar
2
+ from typing import ClassVar
3
3
  from transformers import AutoTokenizer, AutoModel, AutoModelForSequenceClassification
4
4
  from torch.optim import AdamW
5
5
  from sklearn.decomposition import PCA
@@ -23,9 +23,19 @@ from fastworkflow.command_routing import RoutingDefinition
23
23
 
24
24
  device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
25
25
 
26
+ # transformers 5.x emits a tqdm "Loading weights" progress bar on every
27
+ # from_pretrained() call. fastWorkflow loads one intent-detection model per
28
+ # context, so these bars are noise when running/training a workflow. Suppress them.
29
+ try:
30
+ from transformers.utils.logging import disable_progress_bar
31
+ disable_progress_bar()
32
+ except Exception: # noqa: BLE001 - older transformers may not expose this
33
+ pass
34
+
26
35
  dataset=None
27
36
  label_encoder=LabelEncoder()
28
37
 
38
+
29
39
  def save_label_encoder(filepath):
30
40
  global label_encoder
31
41
  with open(filepath, 'wb') as f:
@@ -823,12 +833,20 @@ def train(workflow: fastworkflow.Workflow):
823
833
  X, y = zip(*utterance_command_tuples)
824
834
  num= len(set(y))
825
835
  k_val = 3 if num>2 else 2
826
- model_name = "prajjwal1/bert-tiny"
836
+ # Base models are configurable so downstream apps can swap them without
837
+ # code changes. The defaults are transformers 5.x-compatible BERT/DistilBERT
838
+ # checkpoints that ship a `model_type` and a loadable tokenizer.
839
+ tiny_model_name = fastworkflow.get_env_var(
840
+ "INTENT_DETECTION_TINY_MODEL", default="google/bert_uncased_L-4_H-128_A-2")
841
+ large_model_name = fastworkflow.get_env_var(
842
+ "INTENT_DETECTION_LARGE_MODEL", default="distilbert-base-uncased")
843
+
844
+ model_name = tiny_model_name
827
845
  print(f"\nLoading {model_name}...")
828
846
  tiny_tokenizer = AutoTokenizer.from_pretrained(model_name)
829
847
  tiny_model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=num).to(device)
830
848
 
831
- model_name = "distilbert-base-uncased"
849
+ model_name = large_model_name
832
850
  print(f"Loading {model_name}...")
833
851
  distil_tokenizer = AutoTokenizer.from_pretrained(model_name)
834
852
  #large_model = AutoModel.from_pretrained(model_name).to(device)
@@ -160,7 +160,7 @@ def _how_to_use():
160
160
 
161
161
  self.generate_answer = dspy.Predict("topic, question -> answer")
162
162
 
163
- gpt3_turbo = dspy.OpenAI(model="gpt-3.5-turbo", api_key="<YOUR_API_KEY>")
163
+ gpt3_turbo = dspy.LM(model="openai/gpt-3.5-turbo", api_key="<YOUR_API_KEY>")
164
164
 
165
165
  @DSPyForward.intercept
166
166
  def forward(self, topic, question):
@@ -0,0 +1,117 @@
1
+ [build-system]
2
+ requires = ["poetry-core"]
3
+ build-backend = "poetry.core.masonry.api"
4
+
5
+ [tool.poetry.urls]
6
+ homepage = "https://github.com/radiantlogicinc/fastworkflow"
7
+ repository = "https://github.com/radiantlogicinc/fastworkflow"
8
+ # documentation = "https://fastworkflow.ai/readthedocs"
9
+
10
+ [tool.poetry]
11
+ name = "fastworkflow"
12
+ version = "2.18.2"
13
+ description = "A framework for rapidly building large-scale, deterministic, interactive workflows with a fault-tolerant, conversational UX"
14
+ authors = ["Dhar Rawal <drawal@radiantlogic.com>"]
15
+ license = "Apache-2.0"
16
+ readme = "README.md"
17
+ keywords = ["fastworkflow", "ai", "workflow", "llm", "openai"]
18
+ include = [
19
+ "fastworkflow/examples/fastworkflow.env",
20
+ "fastworkflow/examples/fastworkflow.passwords.env",
21
+ "fastworkflow/_commands/.gitkeep"
22
+ ]
23
+ exclude = [
24
+ "**/___command_info",
25
+ "**/___workflow_contexts",
26
+ "./.env",
27
+ "**/simple_workflow_template/tests"
28
+ ]
29
+
30
+ [tool.poetry.scripts]
31
+ fastworkflow = "fastworkflow.cli:main"
32
+
33
+ [tool.poetry.dependencies]
34
+ python = ">=3.11,<3.14"
35
+ pydantic = "^2.9.2"
36
+ speedict = "^0.3.12"
37
+ python-dotenv = "^1.2.2" # CVE-2026-28684 (set_key/unset_key symlink overwrite)
38
+ scikit-learn = "^1.6.1"
39
+ # Allow transformers 5.x (downstream apps pin >=5,<6). The intent-detection
40
+ # trainer no longer relies on the slow->fast tokenizer conversion path that
41
+ # transformers 5.x removed (see model_pipeline_training._load_tokenizer).
42
+ transformers = ">=4.48.2,<6.0.0"
43
+ # sentencepiece is required by transformers 5.x to instantiate some tokenizers
44
+ # (it replaced the in-tree slow->fast conversion path). Declared here so users
45
+ # never have to add it manually.
46
+ sentencepiece = "^0.2.0"
47
+ mmh3 = "^5.1.0"
48
+ python-levenshtein = "^0.27.1"
49
+ colorama = "^0.4.6"
50
+ dspy = "^3.0.1"
51
+ torch = "^2.7.1"
52
+ prompt_toolkit = "^3.0.43"
53
+ libcst = "^1.8.2"
54
+ openai = ">=2.8.0"
55
+ # CORE depends on PLAIN litellm (no proxy extra). fastworkflow uses litellm only
56
+ # as a client (via dspy.LM and litellm.completion); it never runs a litellm proxy
57
+ # SERVER. The old `litellm[proxy]` extra dragged in the full proxy stack
58
+ # (fastapi-sso, gunicorn, apscheduler, litellm-enterprise, mcp, ...) AND pinned
59
+ # python-multipart, which combined with our python-multipart>=0.0.27 floor forced
60
+ # a prerelease (1.88.0rc1). Plain litellm lets the resolver pick a STABLE release
61
+ # and lets downstreams pin e.g. litellm>=1.83.11,<1.84.0 without the proxy extra.
62
+ # CVE coverage (CVE-2026-35029/35030/42203/42271 + GHSA-69x8-hrgq-fjj8) is satisfied
63
+ # by stable litellm >=1.83.7. Proxy-server deps now live in the optional `server` extra.
64
+ litellm = ">=1.83.7,<2.0.0"
65
+ # ---- Optional `server` extra (FastAPI-MCP service: `fastworkflow run_fastapi_mcp`) ----
66
+ uvicorn = {version = ">=0.33.0", optional = true}
67
+ fastapi = {version = ">=0.120.1", optional = true}
68
+ fastapi-mcp = {version = "^0.4.0", optional = true}
69
+ pyjwt = {extras = ["crypto"], version = ">=2.13.0", optional = true} # Replaces python-jose (CVE-2024-23342); >=2.13.0 fixes alg allow-list bypass (PYSEC-2026-176) + DoS (PYSEC-2026-175/177/178/179)
70
+ python-multipart = {version = ">=0.0.27", optional = true} # CVE-2026-40347, CVE-2026-42561 (multipart parsing DoS). Only pulled by the `server` extra (FastAPI form parsing); not needed by the client/core install.
71
+ starlette = {version = ">=0.49.1", optional = true} # CVE-2025-62727, CVE-2025-54121 (Range header DoS). Pulled transitively by fastapi in the `server` extra.
72
+ datasets = {version = "^4.0.0", optional = true}
73
+
74
+ # Security floor constraints for transitive dependencies of the CORE (client) install.
75
+ # These ensure users get patched versions even though these are not direct deps.
76
+ # NOTE: floors that only applied to the litellm proxy SERVER (python-multipart,
77
+ # pyjwt, uvicorn, starlette) are scoped to the `server` extra above. Floors that
78
+ # only existed because `litellm[proxy]` pulled the package (mako -> alembic,
79
+ # pynacl, fastapi-sso) have been dropped: with the proxy extra gone those packages
80
+ # are no longer in the dependency graph for any fastworkflow install (core OR
81
+ # server), so there is nothing to patch and no CVE regression.
82
+ orjson = ">=3.11.6" # CVE-2024-27454 (loads recursion) + CVE-2025-67221 (dumps recursion DoS, fixed in 3.11.6)
83
+ urllib3 = ">=2.7.0" # CVE-2025-66418, CVE-2025-66471 (decompression chain) + PYSEC-2026-141/142
84
+ aiohttp = ">=3.13.4" # CVE-2025-69223 + 7 others (zip bomb, DoS) + CVE-2026-22815/34513-34525 (3.13.4)
85
+ pyasn1 = ">=0.6.3" # CVE-2026-23490 + CVE-2026-30922 (decoder DoS)
86
+ filelock = ">=3.20.1" # CVE-2025-68146 (TOCTOU symlink)
87
+ cryptography = ">=46.0.7" # CVE-2026-26007 + PYSEC-2026-35/36
88
+ requests = ">=2.33.0" # CVE-2026-25645 (extract_zipped_paths temp reuse)
89
+ idna = ">=3.15" # CVE-2026-45409
90
+ pygments = ">=2.20.0" # CVE-2026-4539 (ReDoS in AdlLexer)
91
+ pyarrow = ">=23.0.1" # PYSEC-2026-113 (use-after-free; only via datasets/training extra)
92
+
93
+ [tool.poetry.group.dev.dependencies]
94
+ isort = "^5.13.2"
95
+ black = "^26.3.1" # CVE-2026-32274
96
+ flake8 = "^7.1.1"
97
+ pylint = "^3.3.1"
98
+ mypy = "^1.13.0"
99
+ bandit = "^1.7.10"
100
+
101
+ [tool.poetry.group.test.dependencies]
102
+ pytest = "^9.0.3" # CVE-2025-71176 (tmp dir privilege/DoS)
103
+ requests-mock = "^1.12.1"
104
+ pytest-cov = "^6.2.1"
105
+
106
+ # poetry install --with aws if you are using AWS Bedrock for LLM or LLM_AGENT
107
+ [tool.poetry.group.aws.dependencies]
108
+ boto3 = {version = ">=1.36.0", optional = true}
109
+
110
+ [tool.poetry.extras]
111
+ training = ["datasets"]
112
+ # Full FastAPI-MCP server feature set (`fastworkflow run_fastapi_mcp`) with the
113
+ # security-patched server deps. `litellm_proxy/` client routing does NOT require
114
+ # this extra (plain litellm handles it via api_base).
115
+ server = ["uvicorn", "fastapi", "fastapi-mcp", "pyjwt", "python-multipart", "starlette"]
116
+ # Backward-compatible alias for the pre-2.18.2 extra name.
117
+ fastapi = ["uvicorn", "fastapi", "fastapi-mcp", "pyjwt", "python-multipart", "starlette"]
@@ -1,85 +0,0 @@
1
- [build-system]
2
- requires = ["poetry-core"]
3
- build-backend = "poetry.core.masonry.api"
4
-
5
- [tool.poetry.urls]
6
- homepage = "https://github.com/radiantlogicinc/fastworkflow"
7
- repository = "https://github.com/radiantlogicinc/fastworkflow"
8
- # documentation = "https://fastworkflow.ai/readthedocs"
9
-
10
- [tool.poetry]
11
- name = "fastworkflow"
12
- version = "2.17.35"
13
- description = "A framework for rapidly building large-scale, deterministic, interactive workflows with a fault-tolerant, conversational UX"
14
- authors = ["Dhar Rawal <drawal@radiantlogic.com>"]
15
- license = "Apache-2.0"
16
- readme = "README.md"
17
- keywords = ["fastworkflow", "ai", "workflow", "llm", "openai"]
18
- include = [
19
- "fastworkflow/examples/fastworkflow.env",
20
- "fastworkflow/examples/fastworkflow.passwords.env",
21
- "fastworkflow/_commands/.gitkeep"
22
- ]
23
- exclude = [
24
- "**/___command_info",
25
- "**/___workflow_contexts",
26
- "./.env",
27
- "**/simple_workflow_template/tests"
28
- ]
29
-
30
- [tool.poetry.scripts]
31
- fastworkflow = "fastworkflow.cli:main"
32
-
33
- [tool.poetry.dependencies]
34
- python = ">=3.11,<3.14"
35
- pydantic = "^2.9.2"
36
- speedict = "^0.3.12"
37
- python-dotenv = "^1.0.1"
38
- scikit-learn = "^1.6.1"
39
- transformers = "^4.48.2"
40
- mmh3 = "^5.1.0"
41
- python-levenshtein = "^0.27.1"
42
- colorama = "^0.4.6"
43
- dspy = "^3.0.1"
44
- torch = "^2.7.1"
45
- prompt_toolkit = "^3.0.43"
46
- libcst = "^1.8.2"
47
- openai = ">=2.8.0"
48
- litellm = {extras = ["proxy"], version = "^1.81.4"}
49
- uvicorn = {version = ">=0.31.1,<0.32.0", optional = true}
50
- fastapi = {version = ">=0.120.1", optional = true}
51
- fastapi-mcp = {version = "^0.4.0", optional = true}
52
- pyjwt = {extras = ["crypto"], version = ">=2.4.0", optional = true} # Replaces python-jose (CVE-2024-23342 in ecdsa dep)
53
- datasets = {version = "^4.0.0", optional = true}
54
-
55
- # Security floor constraints for transitive dependencies
56
- # These ensure users get patched versions even though these are not direct deps
57
- orjson = ">=3.9.15" # CVE-2024-27454 (loads recursion) - NOTE: dumps recursion DoS <=3.11.4, no upstream patch
58
- urllib3 = ">=2.6.0" # CVE-2025-66418, CVE-2025-66471 (decompression chain)
59
- aiohttp = ">=3.13.3" # CVE-2025-69223 + 7 others (zip bomb, DoS)
60
- starlette = ">=0.49.1" # CVE-2025-62727, CVE-2025-54121 (Range header DoS)
61
- pyasn1 = ">=0.6.2" # CVE-2026-23490 (decoder DoS)
62
- filelock = ">=3.20.1" # CVE-2025-68146 (TOCTOU symlink)
63
- pynacl = ">=1.6.2" # CVE-2025-69277 (libsodium validation)
64
- # NOTE: fastapi-sso CSRF vuln (needs >=0.19.0) blocked by litellm pinning to <0.17.0 - upstream issue
65
-
66
- [tool.poetry.group.dev.dependencies]
67
- isort = "^5.13.2"
68
- black = "^24.10.0"
69
- flake8 = "^7.1.1"
70
- pylint = "^3.3.1"
71
- mypy = "^1.13.0"
72
- bandit = "^1.7.10"
73
-
74
- [tool.poetry.group.test.dependencies]
75
- pytest = "^8.3.3"
76
- requests-mock = "^1.12.1"
77
- pytest-cov = "^6.2.1"
78
-
79
- # poetry install --with aws if you are using AWS Bedrock for LLM or LLM_AGENT
80
- [tool.poetry.group.aws.dependencies]
81
- boto3 = {version = ">=1.36.0", optional = true}
82
-
83
- [tool.poetry.extras]
84
- training = ["datasets"]
85
- fastapi = ["uvicorn", "fastapi", "fastapi-mcp", "pyjwt"]
File without changes