flock-core 0.3.38__py3-none-any.whl → 0.3.40__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.
Potentially problematic release.
This version of flock-core might be problematic. Click here for more details.
- flock/core/flock.py +26 -9
- {flock_core-0.3.38.dist-info → flock_core-0.3.40.dist-info}/METADATA +1 -1
- {flock_core-0.3.38.dist-info → flock_core-0.3.40.dist-info}/RECORD +6 -6
- {flock_core-0.3.38.dist-info → flock_core-0.3.40.dist-info}/WHEEL +0 -0
- {flock_core-0.3.38.dist-info → flock_core-0.3.40.dist-info}/entry_points.txt +0 -0
- {flock_core-0.3.38.dist-info → flock_core-0.3.40.dist-info}/licenses/LICENSE +0 -0
flock/core/flock.py
CHANGED
|
@@ -272,16 +272,33 @@ class Flock(BaseModel, Serializable):
|
|
|
272
272
|
agents: list[FlockAgent] | None = None, # Allow adding agents via run
|
|
273
273
|
) -> Box:
|
|
274
274
|
"""Entry point for running an agent system synchronously."""
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
275
|
+
# Check if an event loop is already running
|
|
276
|
+
try:
|
|
277
|
+
loop = asyncio.get_running_loop()
|
|
278
|
+
# If we get here, an event loop is already running
|
|
279
|
+
# Run directly in this loop using run_until_complete
|
|
280
|
+
return loop.run_until_complete(
|
|
281
|
+
self.run_async(
|
|
282
|
+
start_agent=start_agent,
|
|
283
|
+
input=input,
|
|
284
|
+
context=context,
|
|
285
|
+
run_id=run_id,
|
|
286
|
+
box_result=box_result,
|
|
287
|
+
agents=agents,
|
|
288
|
+
)
|
|
289
|
+
)
|
|
290
|
+
except RuntimeError:
|
|
291
|
+
# No running event loop, create a new one with asyncio.run
|
|
292
|
+
return asyncio.run(
|
|
293
|
+
self.run_async(
|
|
294
|
+
start_agent=start_agent,
|
|
295
|
+
input=input,
|
|
296
|
+
context=context,
|
|
297
|
+
run_id=run_id,
|
|
298
|
+
box_result=box_result,
|
|
299
|
+
agents=agents,
|
|
300
|
+
)
|
|
283
301
|
)
|
|
284
|
-
)
|
|
285
302
|
|
|
286
303
|
async def run_async(
|
|
287
304
|
self,
|
|
@@ -16,7 +16,7 @@ flock/cli/view_results.py,sha256=dOzK0O1FHSIDERnx48y-2Xke9BkOHS7pcOhs64AyIg0,781
|
|
|
16
16
|
flock/cli/yaml_editor.py,sha256=VpaSwC-Xcbu_gk4HgUeIL7PXNFu1CdstuJ3mRZOkmIk,8096
|
|
17
17
|
flock/cli/assets/release_notes.md,sha256=bqnk50jxM3w5uY44Dc7MkdT8XmRREFxrVBAG9XCOSSU,4896
|
|
18
18
|
flock/core/__init__.py,sha256=6NmSXsdQOoOPWjWqdF8BYiUveb54CjH8Ta0WAjNM0Ps,574
|
|
19
|
-
flock/core/flock.py,sha256=
|
|
19
|
+
flock/core/flock.py,sha256=7bve-XWSW18BlxAJrkCHEs0qZEtDhQasVpZWJ4gZk-c,24592
|
|
20
20
|
flock/core/flock_agent.py,sha256=jkDwB7yVGYyLfg-WuwvR2X4XblXOs5DrB2dB30xBL7Q,24754
|
|
21
21
|
flock/core/flock_evaluator.py,sha256=dOXZeDOGZcAmJ9ahqq_2bdGUU1VOXY4skmwTVpAjiVw,1685
|
|
22
22
|
flock/core/flock_factory.py,sha256=MGTkJCP1WGpV614f87r1vwe0tqAvBCoH9PlqtqDyJDk,2828
|
|
@@ -429,8 +429,8 @@ flock/workflow/activities.py,sha256=eVZDnxGJl_quNO-UTV3YgvTV8LrRaHN3QDAA1ANKzac,
|
|
|
429
429
|
flock/workflow/agent_activities.py,sha256=NhBZscflEf2IMfSRa_pBM_TRP7uVEF_O0ROvWZ33eDc,963
|
|
430
430
|
flock/workflow/temporal_setup.py,sha256=VWBgmBgfTBjwM5ruS_dVpA5AVxx6EZ7oFPGw4j3m0l0,1091
|
|
431
431
|
flock/workflow/workflow.py,sha256=I9MryXW_bqYVTHx-nl2epbTqeRy27CAWHHA7ZZA0nAk,1696
|
|
432
|
-
flock_core-0.3.
|
|
433
|
-
flock_core-0.3.
|
|
434
|
-
flock_core-0.3.
|
|
435
|
-
flock_core-0.3.
|
|
436
|
-
flock_core-0.3.
|
|
432
|
+
flock_core-0.3.40.dist-info/METADATA,sha256=dxd6uHFcRVmNatOnJ2B44mOBmSA_uwDbFwua7UTtzV8,20772
|
|
433
|
+
flock_core-0.3.40.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
434
|
+
flock_core-0.3.40.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
|
|
435
|
+
flock_core-0.3.40.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
|
|
436
|
+
flock_core-0.3.40.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|