fastworkflow 2.15.6__tar.gz → 2.15.8__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.
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/PKG-INFO +5 -14
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/README.md +4 -13
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/you_misunderstood.py +1 -1
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/_commands/wildcard.py +85 -10
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/chat_session.py +158 -160
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/cli.py +4 -173
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/fastworkflow.env +1 -1
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/exchange_delivered_order_items.py +32 -3
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_items.py +32 -3
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/return_delivered_order_items.py +13 -2
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/transfer_to_human_agents.py +1 -1
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/run/__main__.py +32 -33
- fastworkflow-2.15.8/fastworkflow/utils/react.py +242 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/signatures.py +23 -19
- fastworkflow-2.15.8/fastworkflow/workflow_agent.py +324 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/pyproject.toml +1 -1
- fastworkflow-2.15.6/fastworkflow/workflow_agent.py +0 -311
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/LICENSE +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/.DS_Store +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_commands/.gitkeep +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/_commands/ErrorCorrection/abort.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/go_up.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/reset_context.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_can_i_do.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/_commands/IntentDetection/what_is_current_context.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/_commands/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/_workflows/command_metadata_extraction/command_context_model.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/__main__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/ast_class_extractor.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/class_analysis_structures.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/cli_specification.md +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/command_dependency_resolver.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/command_file_generator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/command_file_template.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/command_import_utils.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/command_stub_generator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/context_folder_generator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/context_model_generator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/dependency_manager.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/dir_scanner.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/documentation_generator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/genai_postprocessor.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/inheritance_block_regenerator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/libcst_transformers.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/navigator_stub_generator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/pydantic_model_generator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/build/utterance_generator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/cache_matching.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/command_context_model.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/command_directory.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/command_executor.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/command_interfaces.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/command_metadata_api.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/command_routing.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/docs/context_modules_prd.txt +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/extended_workflow_example/README.md +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/extended_workflow_example/_commands/WorkItem/get_status.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/extended_workflow_example/_commands/generate_report.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/extended_workflow_example/_commands/startup.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/extended_workflow_example/simple_workflow_template.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/extended_workflow_example/workflow_inheritance_model.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/fastworkflow.passwords.env +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/hello_world/_commands/README.md +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/hello_world/_commands/add_two_numbers.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/hello_world/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/hello_world/application/add_two_numbers.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_1/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_1/_commands/send_message.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_1/application/send_message.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_2/_commands/User/send_message.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_2/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_2/_commands/startup.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_2/application/user.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_3/_commands/PremiumUser/send_priority_message.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_3/_commands/User/send_message.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_3/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_3/_commands/initialize_user.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_3/application/user.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/_ChatRoom.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/add_user.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/broadcast_message.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/get_current_user.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/list_users.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/ChatRoom/set_current_user.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/_PremiumUser.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/PremiumUser/send_priority_message.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/User/_User.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/User/send_message.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/context_inheritance_model.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/_commands/set_root_context.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/application/chatroom.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/application/user.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/context_hierarchy_model.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/messaging_app_4/startup_action.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/calculate.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/cancel_pending_order.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_email.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/find_user_id_by_name_zip.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/get_order_details.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/get_product_details.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/get_user_details.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/list_all_product_types.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_address.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/modify_pending_order_payment.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/_commands/modify_user_address.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/context_inheritance_model.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/retail_data/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/retail_data/orders.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/retail_data/products.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/retail_data/users.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/calculate.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/cancel_pending_order.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/exchange_delivered_order_items.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_email.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/find_user_id_by_name_zip.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/get_order_details.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/get_product_details.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/get_user_details.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/list_all_product_types.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_address.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_items.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/modify_pending_order_payment.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/modify_user_address.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/return_delivered_order_items.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/think.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/tool.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/tools/transfer_to_human_agents.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/retail_workflow/workflow_description.txt +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/_WorkItem.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/add_child_workitem.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/get_status.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/go_to_workitem.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/mark_as_complete.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_first_child_workitem.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_last_child_workitem.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_next_workitem.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/move_to_previous_workitem.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_all_child_workitems.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/remove_child_workitem.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/WorkItem/show_schema.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/_commands/startup.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/application/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/application/workitem.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/simple_workflow_template.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/examples/simple_workflow_template/startup_action.json +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/mcp_server.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/model_pipeline_training.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/refine/__main__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/run/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/run_agent/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/run_agent/__main__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/run_agent/agent_module.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/train/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/train/__main__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/train/generate_synthetic.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/user_message_queues.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/__init__.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/command_dependency_graph.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/context_utils.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/dspy_cache_utils.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/dspy_logger.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/dspy_utils.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/env.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/fuzzy_match.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/generate_param_examples.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/logging.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/parameterize_func_decorator.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/pydantic_model_2_dspy_signature_class.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/python_utils.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/utils/startup_progress.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/workflow.py +0 -0
- {fastworkflow-2.15.6 → fastworkflow-2.15.8}/fastworkflow/workflow_inheritance_model.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fastworkflow
|
|
3
|
-
Version: 2.15.
|
|
3
|
+
Version: 2.15.8
|
|
4
4
|
Summary: A framework for rapidly building large-scale, deterministic, interactive workflows with a fault-tolerant, conversational UX
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Keywords: fastworkflow,ai,workflow,llm,openai
|
|
@@ -209,7 +209,7 @@ You can get a free API key from [Mistral AI](https://mistral.ai) - the example i
|
|
|
209
209
|
Train the intent-detection models for the workflow:
|
|
210
210
|
|
|
211
211
|
```sh
|
|
212
|
-
fastworkflow examples
|
|
212
|
+
fastworkflow train ./examples/hello_world ./examples/fastworkflow.env ./examples/fastworkflow.passwords.env
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
This step builds the NLP models that help the workflow understand user commands.
|
|
@@ -219,7 +219,7 @@ This step builds the NLP models that help the workflow understand user commands.
|
|
|
219
219
|
Once training is complete, run the interactive assistant:
|
|
220
220
|
|
|
221
221
|
```sh
|
|
222
|
-
fastworkflow examples
|
|
222
|
+
fastworkflow run ./examples/hello_world ./examples/fastworkflow.env ./examples/fastworkflow.passwords.env
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
You will be greeted with a `User >` prompt. Try it out by asking "what can you do?" or "add 49 + 51"!
|
|
@@ -240,12 +240,6 @@ fastworkflow examples list
|
|
|
240
240
|
|
|
241
241
|
# Fetch an example to your local directory
|
|
242
242
|
fastworkflow examples fetch <example_name>
|
|
243
|
-
|
|
244
|
-
# Train an example workflow
|
|
245
|
-
fastworkflow examples train <example_name>
|
|
246
|
-
|
|
247
|
-
# Run an example workflow
|
|
248
|
-
fastworkflow examples run <example_name>
|
|
249
243
|
```
|
|
250
244
|
|
|
251
245
|
### Workflow Operations
|
|
@@ -261,11 +255,8 @@ fastworkflow train <workflow_dir> <env_file> <passwords_file>
|
|
|
261
255
|
fastworkflow run <workflow_dir> <env_file> <passwords_file>
|
|
262
256
|
```
|
|
263
257
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
```sh
|
|
267
|
-
fastworkflow run <workflow_dir> <env_file> <passwords_file> --run_as_agent
|
|
268
|
-
```
|
|
258
|
+
> [!tip]
|
|
259
|
+
> **Deterministic execution:** Prefix a natural language command with `/` to execute it deterministically (non‑agentic) during an interactive run.
|
|
269
260
|
|
|
270
261
|
Each command has additional options that can be viewed with the `--help` flag:
|
|
271
262
|
|
|
@@ -176,7 +176,7 @@ You can get a free API key from [Mistral AI](https://mistral.ai) - the example i
|
|
|
176
176
|
Train the intent-detection models for the workflow:
|
|
177
177
|
|
|
178
178
|
```sh
|
|
179
|
-
fastworkflow examples
|
|
179
|
+
fastworkflow train ./examples/hello_world ./examples/fastworkflow.env ./examples/fastworkflow.passwords.env
|
|
180
180
|
```
|
|
181
181
|
|
|
182
182
|
This step builds the NLP models that help the workflow understand user commands.
|
|
@@ -186,7 +186,7 @@ This step builds the NLP models that help the workflow understand user commands.
|
|
|
186
186
|
Once training is complete, run the interactive assistant:
|
|
187
187
|
|
|
188
188
|
```sh
|
|
189
|
-
fastworkflow examples
|
|
189
|
+
fastworkflow run ./examples/hello_world ./examples/fastworkflow.env ./examples/fastworkflow.passwords.env
|
|
190
190
|
```
|
|
191
191
|
|
|
192
192
|
You will be greeted with a `User >` prompt. Try it out by asking "what can you do?" or "add 49 + 51"!
|
|
@@ -207,12 +207,6 @@ fastworkflow examples list
|
|
|
207
207
|
|
|
208
208
|
# Fetch an example to your local directory
|
|
209
209
|
fastworkflow examples fetch <example_name>
|
|
210
|
-
|
|
211
|
-
# Train an example workflow
|
|
212
|
-
fastworkflow examples train <example_name>
|
|
213
|
-
|
|
214
|
-
# Run an example workflow
|
|
215
|
-
fastworkflow examples run <example_name>
|
|
216
210
|
```
|
|
217
211
|
|
|
218
212
|
### Workflow Operations
|
|
@@ -228,11 +222,8 @@ fastworkflow train <workflow_dir> <env_file> <passwords_file>
|
|
|
228
222
|
fastworkflow run <workflow_dir> <env_file> <passwords_file>
|
|
229
223
|
```
|
|
230
224
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
```sh
|
|
234
|
-
fastworkflow run <workflow_dir> <env_file> <passwords_file> --run_as_agent
|
|
235
|
-
```
|
|
225
|
+
> [!tip]
|
|
226
|
+
> **Deterministic execution:** Prefix a natural language command with `/` to execute it deterministically (non‑agentic) during an interactive run.
|
|
236
227
|
|
|
237
228
|
Each command has additional options that can be viewed with the `--help` flag:
|
|
238
229
|
|
|
@@ -4,6 +4,8 @@ import sys
|
|
|
4
4
|
from typing import Dict, List, Optional, Type, Union
|
|
5
5
|
import json
|
|
6
6
|
import os
|
|
7
|
+
from collections import Counter
|
|
8
|
+
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
7
9
|
|
|
8
10
|
from pydantic import BaseModel
|
|
9
11
|
from pydantic_core import PydanticUndefined
|
|
@@ -38,6 +40,67 @@ INVALID = fastworkflow.get_env_var("INVALID")
|
|
|
38
40
|
PARAMETER_EXTRACTION_ERROR_MSG = None
|
|
39
41
|
|
|
40
42
|
|
|
43
|
+
# TODO - generation is deterministic. They all return the same answer
|
|
44
|
+
# TODO - Need 'temperature' for intent detection pipeline
|
|
45
|
+
def majority_vote_predictions(command_router, command: str, n_predictions: int = 5) -> list[str]:
|
|
46
|
+
"""
|
|
47
|
+
Generate N prediction sets in parallel and return the set that wins the majority vote.
|
|
48
|
+
|
|
49
|
+
This function improves prediction reliability by running multiple parallel predictions
|
|
50
|
+
and selecting the most common result through majority voting. This helps reduce
|
|
51
|
+
the impact of random variations in model predictions.
|
|
52
|
+
|
|
53
|
+
Args:
|
|
54
|
+
command_router: The CommandRouter instance to use for predictions
|
|
55
|
+
command: The input command string
|
|
56
|
+
n_predictions: Number of parallel predictions to generate (default: 5)
|
|
57
|
+
Can be configured via N_PARALLEL_PREDICTIONS environment variable
|
|
58
|
+
|
|
59
|
+
Returns:
|
|
60
|
+
The prediction set that received the majority vote. Falls back to a single
|
|
61
|
+
prediction if all parallel predictions fail.
|
|
62
|
+
|
|
63
|
+
Note:
|
|
64
|
+
Uses ThreadPoolExecutor with max_workers limited to min(n_predictions, 10)
|
|
65
|
+
to avoid overwhelming the system with too many concurrent threads.
|
|
66
|
+
"""
|
|
67
|
+
def get_single_prediction():
|
|
68
|
+
"""Helper function to get a single prediction"""
|
|
69
|
+
return command_router.predict(command)
|
|
70
|
+
|
|
71
|
+
# Generate N predictions in parallel
|
|
72
|
+
prediction_sets = []
|
|
73
|
+
with ThreadPoolExecutor(max_workers=min(n_predictions, 10)) as executor:
|
|
74
|
+
# Submit all prediction tasks
|
|
75
|
+
futures = [executor.submit(get_single_prediction) for _ in range(n_predictions)]
|
|
76
|
+
|
|
77
|
+
# Collect results as they complete
|
|
78
|
+
for future in as_completed(futures):
|
|
79
|
+
try:
|
|
80
|
+
prediction_set = future.result()
|
|
81
|
+
prediction_sets.append(prediction_set)
|
|
82
|
+
except Exception as e:
|
|
83
|
+
logger.warning(f"Prediction failed: {e}")
|
|
84
|
+
# Continue with other predictions even if one fails
|
|
85
|
+
|
|
86
|
+
if not prediction_sets:
|
|
87
|
+
# Fallback to single prediction if all parallel predictions failed
|
|
88
|
+
logger.warning("All parallel predictions failed, falling back to single prediction")
|
|
89
|
+
return command_router.predict(command)
|
|
90
|
+
|
|
91
|
+
# Convert lists to tuples so they can be hashed and counted
|
|
92
|
+
prediction_tuples = [tuple(sorted(pred_set)) for pred_set in prediction_sets]
|
|
93
|
+
|
|
94
|
+
# Count occurrences of each unique prediction set
|
|
95
|
+
vote_counts = Counter(prediction_tuples)
|
|
96
|
+
|
|
97
|
+
# Get the prediction set with the most votes
|
|
98
|
+
winning_tuple = vote_counts.most_common(1)[0][0]
|
|
99
|
+
|
|
100
|
+
# Convert back to list and return
|
|
101
|
+
return list(winning_tuple)
|
|
102
|
+
|
|
103
|
+
|
|
41
104
|
class CommandNamePrediction:
|
|
42
105
|
class Output(BaseModel):
|
|
43
106
|
command_name: Optional[str] = None
|
|
@@ -140,12 +203,15 @@ class CommandNamePrediction:
|
|
|
140
203
|
command_name = cache_result
|
|
141
204
|
else:
|
|
142
205
|
predictions=command_router.predict(command)
|
|
206
|
+
# predictions = majority_vote_predictions(command_router, command)
|
|
143
207
|
|
|
144
208
|
if len(predictions)==1:
|
|
145
209
|
command_name = predictions[0].split('/')[-1]
|
|
146
210
|
else:
|
|
147
211
|
# If confidence is low, treat as ambiguous command (type 1)
|
|
148
|
-
error_msg = self._formulate_ambiguous_command_error_message(
|
|
212
|
+
error_msg = self._formulate_ambiguous_command_error_message(
|
|
213
|
+
predictions, "run_as_agent" in self.app_workflow.context)
|
|
214
|
+
|
|
149
215
|
# Store suggested commands
|
|
150
216
|
self._store_suggested_commands(self.path, predictions, 1)
|
|
151
217
|
return CommandNamePrediction.Output(error_msg=error_msg)
|
|
@@ -296,7 +362,8 @@ class CommandNamePrediction:
|
|
|
296
362
|
db.close()
|
|
297
363
|
|
|
298
364
|
@staticmethod
|
|
299
|
-
def _formulate_ambiguous_command_error_message(
|
|
365
|
+
def _formulate_ambiguous_command_error_message(
|
|
366
|
+
route_choice_list: list[str], run_as_agent: bool) -> str:
|
|
300
367
|
command_list = (
|
|
301
368
|
"\n".join([
|
|
302
369
|
f"{route_choice.split('/')[-1].lower()}"
|
|
@@ -305,10 +372,14 @@ class CommandNamePrediction:
|
|
|
305
372
|
)
|
|
306
373
|
|
|
307
374
|
return (
|
|
308
|
-
"The command is ambiguous.
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
375
|
+
"The command is ambiguous. "
|
|
376
|
+
+ (
|
|
377
|
+
"Choose the correct command name from these possible options and update your command:\n"
|
|
378
|
+
if run_as_agent
|
|
379
|
+
else "Please choose a command name from these possible options:\n"
|
|
380
|
+
)
|
|
381
|
+
+ f"{command_list}\n\nor type 'what can i do' to see all commands\n"
|
|
382
|
+
+ ("or type 'abort' to cancel" if run_as_agent else '')
|
|
312
383
|
)
|
|
313
384
|
|
|
314
385
|
class ParameterExtraction:
|
|
@@ -376,8 +447,11 @@ class ParameterExtraction:
|
|
|
376
447
|
if params_str := self._format_parameters_for_display(merged_params):
|
|
377
448
|
error_msg = f"Extracted parameters so far:\n{params_str}\n\n{error_msg}"
|
|
378
449
|
|
|
379
|
-
|
|
380
|
-
|
|
450
|
+
if "run_as_agent" not in self.app_workflow.context:
|
|
451
|
+
error_msg += "\nEnter 'abort' to get out of this error state and/or execute a different command."
|
|
452
|
+
error_msg += "\nEnter 'you misunderstood' if the wrong command was executed."
|
|
453
|
+
else:
|
|
454
|
+
error_msg += "\nCheck your command name if the wrong command was executed."
|
|
381
455
|
return self.Output(
|
|
382
456
|
parameters_are_valid=False,
|
|
383
457
|
error_msg=error_msg,
|
|
@@ -626,6 +700,7 @@ class ResponseGenerator:
|
|
|
626
700
|
workflow_context = workflow.context
|
|
627
701
|
if cnp_output.command_name == 'ErrorCorrection/you_misunderstood':
|
|
628
702
|
workflow_context["NLU_Pipeline_Stage"] = NLUPipelineStage.INTENT_MISUNDERSTANDING_CLARIFICATION
|
|
703
|
+
workflow_context["command"] = command
|
|
629
704
|
else:
|
|
630
705
|
workflow.end_command_processing()
|
|
631
706
|
workflow.context = workflow_context
|
|
@@ -664,6 +739,7 @@ class ResponseGenerator:
|
|
|
664
739
|
workflow_context = workflow.context
|
|
665
740
|
workflow_context["NLU_Pipeline_Stage"] = \
|
|
666
741
|
NLUPipelineStage.INTENT_MISUNDERSTANDING_CLARIFICATION
|
|
742
|
+
workflow_context["command"] = command
|
|
667
743
|
workflow.context = workflow_context
|
|
668
744
|
|
|
669
745
|
startup_action = Action(
|
|
@@ -686,10 +762,9 @@ class ResponseGenerator:
|
|
|
686
762
|
# move to the parameter extraction stage
|
|
687
763
|
workflow_context = workflow.context
|
|
688
764
|
workflow_context["NLU_Pipeline_Stage"] = NLUPipelineStage.PARAMETER_EXTRACTION
|
|
689
|
-
workflow_context["command_name"] = cnp_output.command_name
|
|
690
765
|
workflow.context = workflow_context
|
|
691
766
|
|
|
692
|
-
command_name =
|
|
767
|
+
command_name = cnp_output.command_name
|
|
693
768
|
extractor = ParameterExtraction(workflow, app_workflow, command_name, command)
|
|
694
769
|
pe_output = extractor.extract()
|
|
695
770
|
if not pe_output.parameters_are_valid:
|