flock-core 0.4.529__py3-none-any.whl → 0.4.532__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 +23 -0
- flock/core/flock_factory.py +1 -1
- flock/core/util/input_resolver.py +18 -4
- flock/evaluators/declarative/declarative_evaluator.py +1 -1
- {flock_core-0.4.529.dist-info → flock_core-0.4.532.dist-info}/METADATA +5 -5
- {flock_core-0.4.529.dist-info → flock_core-0.4.532.dist-info}/RECORD +9 -9
- {flock_core-0.4.529.dist-info → flock_core-0.4.532.dist-info}/WHEEL +0 -0
- {flock_core-0.4.529.dist-info → flock_core-0.4.532.dist-info}/entry_points.txt +0 -0
- {flock_core-0.4.529.dist-info → flock_core-0.4.532.dist-info}/licenses/LICENSE +0 -0
flock/core/flock.py
CHANGED
|
@@ -179,6 +179,27 @@ class Flock(BaseModel, Serializable):
|
|
|
179
179
|
if not future.done():
|
|
180
180
|
future.cancel()
|
|
181
181
|
|
|
182
|
+
|
|
183
|
+
def _patch_litellm_proxy_imports(self) -> None:
|
|
184
|
+
"""Stub litellm proxy_server to avoid optional proxy deps when not used.
|
|
185
|
+
|
|
186
|
+
Some litellm versions import `litellm.proxy.proxy_server` during standard logging
|
|
187
|
+
to read `general_settings`, which pulls in optional dependencies like `apscheduler`.
|
|
188
|
+
We provide a stub so imports succeed but cold storage remains disabled.
|
|
189
|
+
"""
|
|
190
|
+
try:
|
|
191
|
+
import sys
|
|
192
|
+
import types
|
|
193
|
+
|
|
194
|
+
if "litellm.proxy.proxy_server" not in sys.modules:
|
|
195
|
+
stub = types.ModuleType("litellm.proxy.proxy_server")
|
|
196
|
+
# Minimal surface that cold_storage_handler accesses
|
|
197
|
+
setattr(stub, "general_settings", {})
|
|
198
|
+
sys.modules["litellm.proxy.proxy_server"] = stub
|
|
199
|
+
except Exception as e:
|
|
200
|
+
# Safe to ignore; worst case litellm will log a warning
|
|
201
|
+
logger.debug(f"Failed to stub litellm proxy_server: {e}")
|
|
202
|
+
|
|
182
203
|
def __init__(
|
|
183
204
|
self,
|
|
184
205
|
name: str | None = None,
|
|
@@ -217,6 +238,8 @@ class Flock(BaseModel, Serializable):
|
|
|
217
238
|
self._start_input = {}
|
|
218
239
|
self._mgr = FlockServerManager()
|
|
219
240
|
|
|
241
|
+
self._patch_litellm_proxy_imports()
|
|
242
|
+
|
|
220
243
|
# Register passed servers
|
|
221
244
|
# (need to be registered first so that agents can retrieve them from the registry)
|
|
222
245
|
# This will also add them to the managed list of self._mgr
|
flock/core/flock_factory.py
CHANGED
|
@@ -403,7 +403,7 @@ class FlockFactory:
|
|
|
403
403
|
enable_rich_tables: bool = False,
|
|
404
404
|
output_theme: OutputTheme = OutputTheme.abernathy,
|
|
405
405
|
wait_for_input: bool = False,
|
|
406
|
-
temperature: float =
|
|
406
|
+
temperature: float = 1.0,
|
|
407
407
|
max_tokens: int = 8192,
|
|
408
408
|
max_tool_calls: int = 10,
|
|
409
409
|
max_retries: int = 3,
|
|
@@ -75,6 +75,16 @@ def resolve_inputs(
|
|
|
75
75
|
keys = _parse_keys(split_input)
|
|
76
76
|
inputs = {}
|
|
77
77
|
|
|
78
|
+
def _normalize_empty_string(val):
|
|
79
|
+
"""Treat empty string inputs as None to match None semantics.
|
|
80
|
+
|
|
81
|
+
This aligns behavior so passing "" behaves like passing None
|
|
82
|
+
for agent input properties.
|
|
83
|
+
"""
|
|
84
|
+
if isinstance(val, str) and val == "":
|
|
85
|
+
return None
|
|
86
|
+
return val
|
|
87
|
+
|
|
78
88
|
for key in keys:
|
|
79
89
|
split_key = key.split(".")
|
|
80
90
|
|
|
@@ -95,16 +105,18 @@ def resolve_inputs(
|
|
|
95
105
|
# Fallback to the most recent value in the state
|
|
96
106
|
historic_value = context.get_most_recent_value(key)
|
|
97
107
|
if historic_value is not None:
|
|
98
|
-
inputs[key] = historic_value
|
|
108
|
+
inputs[key] = _normalize_empty_string(historic_value)
|
|
99
109
|
continue
|
|
100
110
|
|
|
101
111
|
# Fallback to the initial input
|
|
102
112
|
var_value = context.get_variable(key)
|
|
103
113
|
if var_value is not None:
|
|
104
|
-
inputs[key] = var_value
|
|
114
|
+
inputs[key] = _normalize_empty_string(var_value)
|
|
105
115
|
continue
|
|
106
116
|
|
|
107
|
-
inputs[key] =
|
|
117
|
+
inputs[key] = _normalize_empty_string(
|
|
118
|
+
context.get_variable("flock." + key)
|
|
119
|
+
)
|
|
108
120
|
|
|
109
121
|
# Case 2: A compound key (e.g., "agent_name.property" or "context.property")
|
|
110
122
|
elif len(split_key) == 2:
|
|
@@ -121,7 +133,9 @@ def resolve_inputs(
|
|
|
121
133
|
continue
|
|
122
134
|
|
|
123
135
|
# Otherwise, attempt to look up a state variable with the key "agent_name.property"
|
|
124
|
-
inputs[key] =
|
|
136
|
+
inputs[key] = _normalize_empty_string(
|
|
137
|
+
context.get_variable(f"{entity_name}.{property_name}")
|
|
138
|
+
)
|
|
125
139
|
continue
|
|
126
140
|
|
|
127
141
|
return inputs
|
|
@@ -24,7 +24,7 @@ class DeclarativeEvaluatorConfig(FlockEvaluatorConfig):
|
|
|
24
24
|
override_evaluator_type: str | None = None
|
|
25
25
|
model: str | None = "openai/gpt-4o"
|
|
26
26
|
use_cache: bool = True
|
|
27
|
-
temperature: float =
|
|
27
|
+
temperature: float = 1.0
|
|
28
28
|
max_tokens: int = 4096
|
|
29
29
|
max_retries: int = 3
|
|
30
30
|
max_tool_calls: int = 10
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flock-core
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.532
|
|
4
4
|
Summary: Declarative LLM Orchestration at Scale
|
|
5
5
|
Author-email: Andre Ratzenberger <andre.ratzenberger@whiteduck.de>
|
|
6
6
|
License-File: LICENSE
|
|
@@ -17,7 +17,7 @@ Requires-Dist: devtools>=0.12.2
|
|
|
17
17
|
Requires-Dist: dspy==2.6.23
|
|
18
18
|
Requires-Dist: fastapi>=0.115.8
|
|
19
19
|
Requires-Dist: httpx>=0.28.1
|
|
20
|
-
Requires-Dist: litellm
|
|
20
|
+
Requires-Dist: litellm>=v1.75.3
|
|
21
21
|
Requires-Dist: loguru>=0.7.3
|
|
22
22
|
Requires-Dist: markdown2>=2.5.3
|
|
23
23
|
Requires-Dist: mcp>=1.7.1
|
|
@@ -41,15 +41,15 @@ Requires-Dist: python-decouple>=3.8
|
|
|
41
41
|
Requires-Dist: python-dotenv>=1.0.1
|
|
42
42
|
Requires-Dist: pyyaml>=6.0
|
|
43
43
|
Requires-Dist: questionary>=2.1.0
|
|
44
|
-
Requires-Dist: rich>=13.
|
|
44
|
+
Requires-Dist: rich>=13.7.1
|
|
45
45
|
Requires-Dist: temporalio>=1.9.0
|
|
46
46
|
Requires-Dist: thefuzz>=0.22.1
|
|
47
47
|
Requires-Dist: tiktoken>=0.8.0
|
|
48
48
|
Requires-Dist: toml>=0.10.2
|
|
49
49
|
Requires-Dist: tqdm>=4.60.1
|
|
50
|
-
Requires-Dist: uvicorn>=0.
|
|
50
|
+
Requires-Dist: uvicorn>=0.29.1
|
|
51
51
|
Requires-Dist: wd-di>=0.2.14
|
|
52
|
-
Requires-Dist: websockets>=
|
|
52
|
+
Requires-Dist: websockets>=13.0.1
|
|
53
53
|
Requires-Dist: werkzeug>=3.1.3
|
|
54
54
|
Requires-Dist: xlsxwriter>=3.2.3
|
|
55
55
|
Provides-Extra: all
|
|
@@ -26,10 +26,10 @@ flock/cli/view_results.py,sha256=dOzK0O1FHSIDERnx48y-2Xke9BkOHS7pcOhs64AyIg0,781
|
|
|
26
26
|
flock/cli/yaml_editor.py,sha256=K3N0bh61G1TSDAZDnurqW9e_-hO6CtSQKXQqlDhCjVo,12527
|
|
27
27
|
flock/cli/assets/release_notes.md,sha256=bqnk50jxM3w5uY44Dc7MkdT8XmRREFxrVBAG9XCOSSU,4896
|
|
28
28
|
flock/core/__init__.py,sha256=juwyNr3QqKXUS5-E3hlMYRhgqHgQBqgtP12OF3tUCAI,1249
|
|
29
|
-
flock/core/flock.py,sha256=
|
|
29
|
+
flock/core/flock.py,sha256=ITtBIkoSjq31_QR5-enxTBztEYRsr7cef20INQ-ECLE,39214
|
|
30
30
|
flock/core/flock_agent.py,sha256=Hl6TONSiJi2I-N_49-1hkW2q_hyPXMebMr-5oZLI-PY,48842
|
|
31
31
|
flock/core/flock_evaluator.py,sha256=TPy6u6XX3cqkY1r9NW1w2lTwCMNW7pxhFYKLefnEbXg,1820
|
|
32
|
-
flock/core/flock_factory.py,sha256=
|
|
32
|
+
flock/core/flock_factory.py,sha256=OWyJ7VNb-aH6oo6IeJnBfwTNdiUrcNRiUHVJ82KKG5Q,18814
|
|
33
33
|
flock/core/flock_module.py,sha256=ObILimpVaPnaaqYvcBYJJ20lQzfrjgTdADplaNRjHU0,7448
|
|
34
34
|
flock/core/flock_registry.py,sha256=KzdFfc3QC-Dk42G24hdf6Prp3HvGj9ymXR3TTBe-T-A,27161
|
|
35
35
|
flock/core/flock_router.py,sha256=1OAXDsdaIIFApEfo6SRfFEDoTuGt3Si7n2MXiySEfis,2644
|
|
@@ -92,12 +92,12 @@ flock/core/serialization/serialization_utils.py,sha256=AHRf90trgnj2Q6aaGaq5eja5P
|
|
|
92
92
|
flock/core/util/cli_helper.py,sha256=9MiAw8y0IRlWKF7lRYViRFzSwbWSeiiLv0usyhn8XlU,49966
|
|
93
93
|
flock/core/util/file_path_utils.py,sha256=Odf7uU32C-x1KNighbNERSiMtkzW4h8laABIoFK7A5M,6246
|
|
94
94
|
flock/core/util/hydrator.py,sha256=ARg4ufXNlfAESDaxPeU8j6TOJ2ywzfl00KAIfVHGIxo,10699
|
|
95
|
-
flock/core/util/input_resolver.py,sha256=
|
|
95
|
+
flock/core/util/input_resolver.py,sha256=Y2EpxC7Fqzf22YbULEiN0zZK5HvTo-Bv9Mgdk6__WOE,5181
|
|
96
96
|
flock/core/util/loader.py,sha256=j3q2qem5bFMP2SmMuYjb-ISxsNGNZd1baQmpvAnRUUk,2244
|
|
97
97
|
flock/core/util/splitter.py,sha256=rDLnZX158PWkmW8vi2UfMLAMRXcHQFUIydAABd-lDGw,7154
|
|
98
98
|
flock/evaluators/__init__.py,sha256=Y0cEkx0dujRmy--TDpKoTqFSLzbyFz8BwEOv8kdSUhg,22
|
|
99
99
|
flock/evaluators/declarative/__init__.py,sha256=Y0cEkx0dujRmy--TDpKoTqFSLzbyFz8BwEOv8kdSUhg,22
|
|
100
|
-
flock/evaluators/declarative/declarative_evaluator.py,sha256=
|
|
100
|
+
flock/evaluators/declarative/declarative_evaluator.py,sha256=uNUHPmiGh2EfXW2q-1w2I8UCum_eDjEJWdH47uCv7_A,8186
|
|
101
101
|
flock/evaluators/memory/memory_evaluator.py,sha256=ySwz7kcc8suXMJ7gKNSWThW8iOMlE8lUcUzEAHvv8rw,3559
|
|
102
102
|
flock/evaluators/test/test_case_evaluator.py,sha256=3Emcoty0LOLLBIuPGxSpKphuZC9Fu1DTr1vbGg-hd0Q,1233
|
|
103
103
|
flock/evaluators/zep/zep_evaluator.py,sha256=6_5vTdU0yJAH8I8w3-MPXiAZx6iUPhAVCsHjrHzkPLM,2058
|
|
@@ -563,8 +563,8 @@ flock/workflow/agent_execution_activity.py,sha256=Gy6FtuVAjf0NiUXmC3syS2eJpNQF4R
|
|
|
563
563
|
flock/workflow/flock_workflow.py,sha256=iSUF_soFvWar0ffpkzE4irkDZRx0p4HnwmEBi_Ne2sY,9666
|
|
564
564
|
flock/workflow/temporal_config.py,sha256=3_8O7SDEjMsSMXsWJBfnb6XTp0TFaz39uyzSlMTSF_I,3988
|
|
565
565
|
flock/workflow/temporal_setup.py,sha256=YIHnSBntzOchHfMSh8hoLeNXrz3B1UbR14YrR6soM7A,1606
|
|
566
|
-
flock_core-0.4.
|
|
567
|
-
flock_core-0.4.
|
|
568
|
-
flock_core-0.4.
|
|
569
|
-
flock_core-0.4.
|
|
570
|
-
flock_core-0.4.
|
|
566
|
+
flock_core-0.4.532.dist-info/METADATA,sha256=s30hFRT1nAen8g0axc5mhHTLwtfikpBqYjNU3rwIjkE,22894
|
|
567
|
+
flock_core-0.4.532.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
568
|
+
flock_core-0.4.532.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
|
|
569
|
+
flock_core-0.4.532.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
|
|
570
|
+
flock_core-0.4.532.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|