fastworkflow 2.17.15__py3-none-any.whl → 2.17.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -184,7 +184,7 @@ def run_main(args):
184
184
 
185
185
  with contextlib.suppress(queue.Empty):
186
186
  if command_output := fastworkflow.chat_session.command_output_queue.get(
187
- timeout=1.0
187
+ timeout=180.0
188
188
  ):
189
189
  print_command_output(command_output)
190
190
  while not fastworkflow.chat_session.workflow_is_complete or args.keep_alive:
@@ -370,7 +370,9 @@ async def initialize(request: InitializationRequest) -> InitializeResponse:
370
370
  if request.startup_action:
371
371
  startup_action = fastworkflow.Action(**request.startup_action)
372
372
  elif ARGS.startup_action:
373
- startup_action = fastworkflow.Action(**json.loads(ARGS.startup_action))
373
+ with open(ARGS.startup_action, 'r') as file:
374
+ startup_action_dict = json.load(file)
375
+ startup_action = fastworkflow.Action(**startup_action_dict)
374
376
 
375
377
  # Use the modular helper function to create the session
376
378
  await ensure_user_runtime_exists(
@@ -108,12 +108,23 @@ class fastWorkflowReAct(Module):
108
108
  trajectory = {}
109
109
  max_iters = input_args.pop("max_iters", self.max_iters)
110
110
  idx = 0
111
+ exception_count = 0
111
112
  while True:
112
113
  try:
113
114
  pred = self._call_with_potential_trajectory_truncation(self.react, trajectory, **input_args)
114
115
  except ValueError as err:
115
- logger.warning(f"Ending the trajectory: Agent failed to select a valid tool: {_fmt_exc(err)}")
116
- break
116
+ trajectory[f"observation_{idx}"] = f"Agent failed to select a valid tool: {_fmt_exc(err)}"
117
+ idx += 1 # this is the counter for the index of the entire trajectory
118
+ trajectory[f"thought_{idx}"] = (
119
+ "To execute a command, I should use the execute_workflow_query tool"
120
+ )
121
+ trajectory[f"observation_{idx}"] = "Use the execute_workflow_query tool with a single argument called 'command' formatted as plain text using the command name and parameter values"
122
+ idx += 1 # this is the counter for the index of the entire trajectory
123
+ exception_count += 1
124
+ if exception_count > 2:
125
+ break
126
+ else:
127
+ continue
117
128
 
118
129
  trajectory[f"thought_{idx}"] = pred.next_thought
119
130
  trajectory[f"tool_name_{idx}"] = pred.next_tool_name
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastworkflow
3
- Version: 2.17.15
3
+ Version: 2.17.17
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
@@ -145,10 +145,10 @@ fastworkflow/mcp_server.py,sha256=NxbLSKf2MA4lAHVcm6ZfiVuOjVO6IeV5Iw17wImFbxQ,88
145
145
  fastworkflow/model_pipeline_training.py,sha256=P_9wrYSfJVSYCTu8VEPkgXJ16eH58LLCK4rCRbRFAVg,46740
146
146
  fastworkflow/refine/__main__.py,sha256=bDLpPNMcdp8U4EFnMdjxx1sPDQCZuEJoBURr2KebTng,3398
147
147
  fastworkflow/run/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
148
- fastworkflow/run/__main__.py,sha256=XmybAsr1MnCx8tzvhWxtBT7xu2Om3PVZFtABXavPccU,12075
148
+ fastworkflow/run/__main__.py,sha256=WMrlkwUt0VTAp_DQwp3LAsJqZlFW63mmVXckuWdMiSo,12077
149
149
  fastworkflow/run_fastapi_mcp/README.md,sha256=dAmG2KF-9mqSjyIPSA9vhUit-DjsDH6WJUDCkQ3C1is,11943
150
150
  fastworkflow/run_fastapi_mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
- fastworkflow/run_fastapi_mcp/__main__.py,sha256=R3A5PUoBXtEufaTTKF92kWhBuDg3xsVG0IQEyg4XJOI,53536
151
+ fastworkflow/run_fastapi_mcp/__main__.py,sha256=bBfHG3QubDzWHiwwA6zjx5S66QXm7QlCzZhJdH2sf0Y,53635
152
152
  fastworkflow/run_fastapi_mcp/conversation_store.py,sha256=2qnNLO_RVHznbIzTjpdff7szsrGyr1FVt1spcKvkrKk,13534
153
153
  fastworkflow/run_fastapi_mcp/jwt_manager.py,sha256=o3JLV71WiKNhr61KFIrYDnYQvvNYrqhSqEnsWNBUya4,12480
154
154
  fastworkflow/run_fastapi_mcp/mcp_specific.py,sha256=RdOPcPn68KlxNSM9Vb2yeYEDNGoNTcKZq-AC0cd86cw,4506
@@ -172,14 +172,14 @@ fastworkflow/utils/logging.py,sha256=2SA-04fg7Lx_vGf980tfCOGDQxBvU9X6Vbhv47rbdaw
172
172
  fastworkflow/utils/parameterize_func_decorator.py,sha256=V6YJnishWRCdwiBQW6P17hmGGrga0Empk-AN5Gm7iMk,633
173
173
  fastworkflow/utils/pydantic_model_2_dspy_signature_class.py,sha256=w1pvl8rJq48ulFwaAtBgfXYn_SBIDBgq1aLMUg1zJn8,12875
174
174
  fastworkflow/utils/python_utils.py,sha256=D0JBdzkwKoyK7XvZcnIxOgsS8CRGdvuW-zcO45_pfOA,8252
175
- fastworkflow/utils/react.py,sha256=eROhiG0TQACLqa-4aVQB36kr4KsnqqQTQjqQdMpImCs,12384
175
+ fastworkflow/utils/react.py,sha256=FGDnzIPKSTwXOCrzUVluFtkZ06lVjgMdB-YQ8jhggZU,13065
176
176
  fastworkflow/utils/signatures.py,sha256=uv1HxkVK8yzu6xt0ci8RUSgQW0Njaz22YuJVO_aNUEM,33393
177
177
  fastworkflow/utils/startup_progress.py,sha256=9icSdnpFAxzIq0sUliGpNaH0Efvrt5lDtGfURV5BD98,3539
178
178
  fastworkflow/workflow.py,sha256=37gn7e3ct-gdGw43zS6Ab_ADoJJBO4eJW2PywfUpjEg,18825
179
179
  fastworkflow/workflow_agent.py,sha256=LRPdl-3lDRPx8pQtK202JWGYMYBNz5Mruy630fCBCk0,18725
180
180
  fastworkflow/workflow_inheritance_model.py,sha256=Pp-qSrQISgPfPjJVUfW84pc7HLmL2evuq0UVIYR51K0,7974
181
- fastworkflow-2.17.15.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
182
- fastworkflow-2.17.15.dist-info/METADATA,sha256=eSes8rfVIc07_sUE8CPJuhCDyHtpcT2ze_4dGmVmkeE,30635
183
- fastworkflow-2.17.15.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
184
- fastworkflow-2.17.15.dist-info/entry_points.txt,sha256=m8HqoPzCyaZLAx-V5X8MJgw3Lx3GiPDlxNEZ7K-Gb-U,54
185
- fastworkflow-2.17.15.dist-info/RECORD,,
181
+ fastworkflow-2.17.17.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
182
+ fastworkflow-2.17.17.dist-info/METADATA,sha256=5er6oCGFRWqQIiD0MyQNlHMIBQ5x2BWQxWrQobrupAI,30635
183
+ fastworkflow-2.17.17.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
184
+ fastworkflow-2.17.17.dist-info/entry_points.txt,sha256=m8HqoPzCyaZLAx-V5X8MJgw3Lx3GiPDlxNEZ7K-Gb-U,54
185
+ fastworkflow-2.17.17.dist-info/RECORD,,