lionagi 0.7.4__py3-none-any.whl → 0.7.5__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.
- lionagi/operations/ReAct/ReAct.py +1 -1
- lionagi/operations/brainstorm/brainstorm.py +9 -9
- lionagi/operations/plan/plan.py +4 -4
- lionagi/operatives/strategies/concurrent.py +1 -1
- lionagi/operatives/strategies/concurrent_sequential_chunk.py +1 -1
- lionagi/operatives/strategies/sequential.py +1 -1
- lionagi/operatives/strategies/sequential_chunk.py +1 -1
- lionagi/operatives/strategies/sequential_concurrent_chunk.py +1 -1
- lionagi/version.py +1 -1
- {lionagi-0.7.4.dist-info → lionagi-0.7.5.dist-info}/METADATA +1 -1
- {lionagi-0.7.4.dist-info → lionagi-0.7.5.dist-info}/RECORD +13 -13
- {lionagi-0.7.4.dist-info → lionagi-0.7.5.dist-info}/WHEEL +0 -0
- {lionagi-0.7.4.dist-info → lionagi-0.7.5.dist-info}/licenses/LICENSE +0 -0
@@ -112,7 +112,7 @@ async def ReAct(
|
|
112
112
|
if extensions:
|
113
113
|
extensions -= 1
|
114
114
|
|
115
|
-
# Step 3: Produce final answer by calling branch.
|
115
|
+
# Step 3: Produce final answer by calling branch.instruct with an answer prompt
|
116
116
|
answer_prompt = ReActAnalysis.ANSWER_PROMPT.format(
|
117
117
|
instruction=instruct_dict["instruction"]
|
118
118
|
)
|
@@ -75,7 +75,7 @@ async def run_instruct(
|
|
75
75
|
if verbose:
|
76
76
|
snippet = (
|
77
77
|
child_ins.guidance[:100] + "..."
|
78
|
-
if len(child_ins.guidance) > 100
|
78
|
+
if len(child_ins.guidance or "") > 100
|
79
79
|
else child_ins.guidance
|
80
80
|
)
|
81
81
|
print(f"\n-----Running instruction-----\n{snippet}")
|
@@ -181,7 +181,7 @@ async def brainstorm(
|
|
181
181
|
if verbose:
|
182
182
|
snippet = (
|
183
183
|
ins_.guidance[:100] + "..."
|
184
|
-
if len(ins_.guidance) > 100
|
184
|
+
if len(ins_.guidance or "") > 100
|
185
185
|
else ins_.guidance
|
186
186
|
)
|
187
187
|
print(f"\n-----Running instruction-----\n{snippet}")
|
@@ -255,12 +255,12 @@ async def brainstorm(
|
|
255
255
|
if verbose:
|
256
256
|
snippet = (
|
257
257
|
ins_.guidance[:100] + "..."
|
258
|
-
if len(ins_.guidance) > 100
|
258
|
+
if len(ins_.guidance or "") > 100
|
259
259
|
else ins_.guidance
|
260
260
|
)
|
261
261
|
print(f"\n-----Exploring Idea-----\n{snippet}")
|
262
262
|
new_branch = session.split(branch)
|
263
|
-
resp = await new_branch.
|
263
|
+
resp = await new_branch.instruct(
|
264
264
|
ins_, **(explore_kwargs or {})
|
265
265
|
)
|
266
266
|
return InstructResponse(instruct=ins_, response=resp)
|
@@ -303,11 +303,11 @@ async def brainstorm(
|
|
303
303
|
if verbose:
|
304
304
|
snippet = (
|
305
305
|
i.guidance[:100] + "..."
|
306
|
-
if len(i.guidance) > 100
|
306
|
+
if len(i.guidance or "") > 100
|
307
307
|
else i.guidance
|
308
308
|
)
|
309
309
|
print(f"\n-----Exploring Idea-----\n{snippet}")
|
310
|
-
seq_res = await branch.
|
310
|
+
seq_res = await branch.instruct(
|
311
311
|
i, **(explore_kwargs or {})
|
312
312
|
)
|
313
313
|
explore_results.append(
|
@@ -337,7 +337,7 @@ async def brainstorm(
|
|
337
337
|
|
338
338
|
async def _explore(ins_: Instruct):
|
339
339
|
child_branch = session.split(base_branch)
|
340
|
-
child_resp = await child_branch.
|
340
|
+
child_resp = await child_branch.instruct(
|
341
341
|
ins_, **(explore_kwargs or {})
|
342
342
|
)
|
343
343
|
return InstructResponse(
|
@@ -393,14 +393,14 @@ async def brainstorm(
|
|
393
393
|
if verbose:
|
394
394
|
snippet = (
|
395
395
|
ins_.guidance[:100] + "..."
|
396
|
-
if len(ins_.guidance) > 100
|
396
|
+
if len(ins_.guidance or "") > 100
|
397
397
|
else ins_.guidance
|
398
398
|
)
|
399
399
|
print(
|
400
400
|
f"\n-----Exploring Idea (sequential in chunk)-----\n{snippet}"
|
401
401
|
)
|
402
402
|
|
403
|
-
seq_resp = await local_branch.
|
403
|
+
seq_resp = await local_branch.instruct(
|
404
404
|
ins_, **(explore_kwargs or {})
|
405
405
|
)
|
406
406
|
chunk_results.append(
|
lionagi/operations/plan/plan.py
CHANGED
@@ -249,7 +249,7 @@ async def plan(
|
|
249
249
|
)
|
250
250
|
print(f"Instruction: {snippet}")
|
251
251
|
|
252
|
-
step_response = await execute_branch.
|
252
|
+
step_response = await execute_branch.instruct(
|
253
253
|
plan_step, **(execution_kwargs or {})
|
254
254
|
)
|
255
255
|
seq_results.append(
|
@@ -277,7 +277,7 @@ async def plan(
|
|
277
277
|
print(f"\n------ Executing step (concurrently) ------")
|
278
278
|
print(f"Instruction: {snippet}")
|
279
279
|
local_branch = session.split(execute_branch)
|
280
|
-
resp = await local_branch.
|
280
|
+
resp = await local_branch.instruct(
|
281
281
|
plan_step, **(execution_kwargs or {})
|
282
282
|
)
|
283
283
|
return InstructResponse(instruct=plan_step, response=resp)
|
@@ -309,7 +309,7 @@ async def plan(
|
|
309
309
|
|
310
310
|
async def _execute(plan_step: Instruct):
|
311
311
|
local_branch = session.split(execute_branch)
|
312
|
-
resp = await local_branch.
|
312
|
+
resp = await local_branch.instruct(
|
313
313
|
plan_step, **(execution_kwargs or {})
|
314
314
|
)
|
315
315
|
return InstructResponse(
|
@@ -355,7 +355,7 @@ async def plan(
|
|
355
355
|
print(
|
356
356
|
f"\n--- Executing step (sequential in chunk) ---\nInstruction: {snippet}"
|
357
357
|
)
|
358
|
-
resp = await local_branch.
|
358
|
+
resp = await local_branch.instruct(
|
359
359
|
plan_step, **(execution_kwargs or {})
|
360
360
|
)
|
361
361
|
chunk_result.append(
|
@@ -25,7 +25,7 @@ class ConcurrentExecutor(StrategyExecutor):
|
|
25
25
|
return await self.execute_instruct(ins_, b_, False, **kwargs)
|
26
26
|
|
27
27
|
config = {**ins.model_dump(), **kwargs}
|
28
|
-
res = await branch.
|
28
|
+
res = await branch.instruct(**config)
|
29
29
|
branch.msgs.logger.dump()
|
30
30
|
instructs = (
|
31
31
|
res.instruct_models if hasattr(res, "instruct_models") else []
|
@@ -68,7 +68,7 @@ class ConcurrentSequentialChunkExecutor(StrategyExecutor):
|
|
68
68
|
else f"\n-----Executing Instruct {idx}-----\n{msg_}"
|
69
69
|
)
|
70
70
|
|
71
|
-
res = await self.branch.
|
71
|
+
res = await self.branch.instruct(ins_, **self.params.execute_kwargs)
|
72
72
|
return InstructResponse(instruct=ins_, response=res)
|
73
73
|
|
74
74
|
async def _execute_chunk(
|
@@ -20,7 +20,7 @@ class SequentialExecutor(StrategyExecutor):
|
|
20
20
|
for idx, item in enumerate(instructs, start=1):
|
21
21
|
if self.params.verbose:
|
22
22
|
print(f"\nExecuting step {idx}/{len(instructs)}")
|
23
|
-
out = await self.execute_branch.
|
23
|
+
out = await self.execute_branch.instruct(
|
24
24
|
item, **self.params.execute_kwargs
|
25
25
|
)
|
26
26
|
ress.append(InstructResponse(instruct=item, response=out))
|
@@ -60,7 +60,7 @@ class SequentialChunkExecutor(StrategyExecutor):
|
|
60
60
|
else:
|
61
61
|
print(f"\n-----Executing Instruct-----\n{msg_}")
|
62
62
|
|
63
|
-
res = await self.branch.
|
63
|
+
res = await self.branch.instruct(ins_, **self.params.execute_kwargs)
|
64
64
|
return InstructResponse(instruct=ins_, response=res)
|
65
65
|
|
66
66
|
async def _execute_chunk(
|
@@ -71,7 +71,7 @@ class SequentialConcurrentChunkExecutor(StrategyExecutor):
|
|
71
71
|
)
|
72
72
|
|
73
73
|
branch = self.session.split(self.branch)
|
74
|
-
res = await branch.
|
74
|
+
res = await branch.instruct(ins_, **self.params.execute_kwargs)
|
75
75
|
return InstructResponse(instruct=ins_, response=res)
|
76
76
|
|
77
77
|
async def _execute_chunk(
|
lionagi/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.7.
|
1
|
+
__version__ = "0.7.5"
|
@@ -4,7 +4,7 @@ lionagi/_errors.py,sha256=wNKdnVQvE_CHEstK7htrrj334RA_vbGcIds-3pUiRkc,455
|
|
4
4
|
lionagi/_types.py,sha256=9g7iytvSj3UjZxD-jL06_fxuNfgZyWT3Qnp0XYp1wQU,63
|
5
5
|
lionagi/settings.py,sha256=k9zRJXv57TveyfHO3Vr9VGiKrSwlRUUVKt5zf6v9RU4,1627
|
6
6
|
lionagi/utils.py,sha256=X12H-O8Lx9tUOKGtjpoxHjRsKYHRqty0qD9i2W12kpI,73121
|
7
|
-
lionagi/version.py,sha256=
|
7
|
+
lionagi/version.py,sha256=6qL_qyowXO9Pc6v11Zx2s-yd28_548ZZC-OsfzO_Pjc,22
|
8
8
|
lionagi/libs/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
9
9
|
lionagi/libs/parse.py,sha256=tpEbmIRGuHhLCJlUlm6fjmqm_Z6XJLAXGNFHNuk422I,1011
|
10
10
|
lionagi/libs/file/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
@@ -47,13 +47,13 @@ lionagi/libs/validate/validate_boolean.py,sha256=h3d7Dn7asJokBozWaKxaV_3Y6vUWBc0
|
|
47
47
|
lionagi/operations/__init__.py,sha256=O7nV0tedpUe7_OlUWmCcduGPFtqtzWZcR_SIOnjLsro,134
|
48
48
|
lionagi/operations/types.py,sha256=LIa68xcyKLVafof-DSFwKtSkneuYPFqrtGyClohYI6o,704
|
49
49
|
lionagi/operations/utils.py,sha256=Twy6L_UFt9JqJFRYuKKTKVZIXsePidNl5ipcYcCbesI,1220
|
50
|
-
lionagi/operations/ReAct/ReAct.py,sha256=
|
50
|
+
lionagi/operations/ReAct/ReAct.py,sha256=tAZ-3Ya68tVUa112wgOMUJpBVw-RWBSYTfgicbInRuQ,3954
|
51
51
|
lionagi/operations/ReAct/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
52
52
|
lionagi/operations/ReAct/utils.py,sha256=0OhZhoc8QsTsMFo2Jmys1mgpnMwHsldKuLVSbev9uZM,994
|
53
53
|
lionagi/operations/_act/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
54
54
|
lionagi/operations/_act/act.py,sha256=HBp-sNwNigLDNkuEZqGU_98UCaJXPZsaokkFAXwOMn0,2454
|
55
55
|
lionagi/operations/brainstorm/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
56
|
-
lionagi/operations/brainstorm/brainstorm.py,sha256=
|
56
|
+
lionagi/operations/brainstorm/brainstorm.py,sha256=OwByrh6E-rTU_u6fDNTwWOlkJ4ycYJB9ZF-x-HYOs8I,17222
|
57
57
|
lionagi/operations/brainstorm/prompt.py,sha256=f-Eh6pO606dT2TrX9BFv_einRDpYwFi6Gep9Strd1cM,610
|
58
58
|
lionagi/operations/chat/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
59
59
|
lionagi/operations/chat/chat.py,sha256=Ji3covyt64EFoBFbvPhxAGl8bGMwRQqmHtb7tY9jP54,5229
|
@@ -68,7 +68,7 @@ lionagi/operations/operate/operate.py,sha256=jgVV9CjtnVLmR5ZdDmunicS5Pp9dT3hV5kM
|
|
68
68
|
lionagi/operations/parse/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
69
69
|
lionagi/operations/parse/parse.py,sha256=LpF6LVAvCVoE8n63BkhSxXSHYgSx7CNkN7yXUwaNpQo,3003
|
70
70
|
lionagi/operations/plan/__init__.py,sha256=AFkAmOJBTqPlYuqFRRn7rCvIw3CGh9XXH_22cNWbfig,156
|
71
|
-
lionagi/operations/plan/plan.py,sha256=
|
71
|
+
lionagi/operations/plan/plan.py,sha256=vo995UHEHLCBM9t0xr_9yO8TDaOFcRscbemcK18UaO4,15313
|
72
72
|
lionagi/operations/plan/prompt.py,sha256=ig4JjJR5gV-lXPRVbiaJuL9qeoahM_afYvWphpY1lWA,993
|
73
73
|
lionagi/operations/select/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
74
74
|
lionagi/operations/select/select.py,sha256=qCxgsqNSDQVmtINHTee2973UU6VuBuAsO7fdhQ0VYjQ,2492
|
@@ -106,13 +106,13 @@ lionagi/operatives/models/operable_model.py,sha256=Br9vCo_Z3iqqE8Zdfy_n4fqu7xfIo
|
|
106
106
|
lionagi/operatives/models/schema_model.py,sha256=-BeCwW_1Rle--w-f7MajbOYH7t_8SPWw0_qK0fpTsRg,666
|
107
107
|
lionagi/operatives/strategies/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
108
108
|
lionagi/operatives/strategies/base.py,sha256=cfZXUZYPypW-hFZJj7HDtTPc-x99XB6dO_S5os1srTk,1820
|
109
|
-
lionagi/operatives/strategies/concurrent.py,sha256=
|
109
|
+
lionagi/operatives/strategies/concurrent.py,sha256=SV-zQNhUb1uSaVXzF_sHRYwklVL1Pa8yjfG9XjigsK0,2720
|
110
110
|
lionagi/operatives/strategies/concurrent_chunk.py,sha256=9qwYoqO0LO1BMIyxU-tc_9ppBK0J94cnWs3e7wx7PR0,1678
|
111
|
-
lionagi/operatives/strategies/concurrent_sequential_chunk.py,sha256=
|
111
|
+
lionagi/operatives/strategies/concurrent_sequential_chunk.py,sha256=PBNsJDZwd36ocVwkm3QKNBUYhsWINhAZoKPHHZlqkHw,3657
|
112
112
|
lionagi/operatives/strategies/params.py,sha256=XNCD8sQJCm7xk0yGFKSQ14FuUNV1f8wLfNNJg_NYsn8,5407
|
113
|
-
lionagi/operatives/strategies/sequential.py,sha256=
|
114
|
-
lionagi/operatives/strategies/sequential_chunk.py,sha256=
|
115
|
-
lionagi/operatives/strategies/sequential_concurrent_chunk.py,sha256=
|
113
|
+
lionagi/operatives/strategies/sequential.py,sha256=NvcREg-DhMPZx6-4yXjm1z1bVKmAO9w3VDTpdZ0mu74,948
|
114
|
+
lionagi/operatives/strategies/sequential_chunk.py,sha256=66m6LW2NkMDyLUYL-4m15_9_b6765aOww-uzMqgJVaY,3160
|
115
|
+
lionagi/operatives/strategies/sequential_concurrent_chunk.py,sha256=v3pQyJRRfnWKy1RUvrXIkvqgt_PIXQ63ol5lZtj1-V8,3558
|
116
116
|
lionagi/operatives/strategies/utils.py,sha256=plZg84Yqba5GAmNPvsiUjbAavdDmCfwZkKnK_c_aORw,1414
|
117
117
|
lionagi/protocols/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
118
118
|
lionagi/protocols/_concepts.py,sha256=2vHkG_Zbh4y3YAOqgJw0HXa2HS0VogjjvV3o1oXG7HM,1555
|
@@ -183,7 +183,7 @@ lionagi/service/providers/perplexity_/chat_completions.py,sha256=SsDbrtXwQsR4Yu2
|
|
183
183
|
lionagi/session/__init__.py,sha256=v8vNyJVIVj8_Oz9RJdVe6ZKUQMYTgDh1VQpnr1KdLaw,112
|
184
184
|
lionagi/session/branch.py,sha256=2KMMl-YVVfbgbz1qtyXpw3SrRZ5yAfoqm44s-gnbjyU,59319
|
185
185
|
lionagi/session/session.py,sha256=po6C7PnM0iu_ISHUo4PBzzQ61HFOgcsAUfPoO--eLak,8987
|
186
|
-
lionagi-0.7.
|
187
|
-
lionagi-0.7.
|
188
|
-
lionagi-0.7.
|
189
|
-
lionagi-0.7.
|
186
|
+
lionagi-0.7.5.dist-info/METADATA,sha256=BzOxAvQTuo7KixBKczhR3Ne6LPcWNDo1zOV36Y0fZo4,22768
|
187
|
+
lionagi-0.7.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
188
|
+
lionagi-0.7.5.dist-info/licenses/LICENSE,sha256=VXFWsdoN5AAknBCgFqQNgPWYx7OPp-PFEP961zGdOjc,11288
|
189
|
+
lionagi-0.7.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|