@@ -207,6 +207,7 @@ async def generate_user_intent(
207
207
"examples" : examples ,
208
208
"potential_user_intents" : ", " .join (potential_user_intents ),
209
209
"user_action" : user_action ,
210
+ "context" : state .context ,
210
211
},
211
212
)
212
213
stop = self .llm_task_manager .get_stop_tokens (
@@ -266,6 +267,7 @@ async def check_for_active_flow_finished_match(
266
267
)
267
268
async def generate_flow_from_instructions (
268
269
self ,
270
+ state : State ,
269
271
instructions : str ,
270
272
events : List [dict ],
271
273
llm : Optional [BaseLLM ] = None ,
@@ -298,6 +300,7 @@ async def generate_flow_from_instructions(
298
300
"examples" : examples ,
299
301
"flow_name" : flow_name ,
300
302
"instructions" : instructions ,
303
+ "context" : state .context ,
301
304
},
302
305
)
303
306
@@ -330,6 +333,7 @@ async def generate_flow_from_instructions(
330
333
)
331
334
async def generate_flow_from_name (
332
335
self ,
336
+ state : State ,
333
337
name : str ,
334
338
events : List [dict ],
335
339
llm : Optional [BaseLLM ] = None ,
@@ -358,6 +362,7 @@ async def generate_flow_from_name(
358
362
context = {
359
363
"examples" : examples ,
360
364
"flow_name" : name ,
365
+ "context" : state .context ,
361
366
},
362
367
)
363
368
@@ -384,6 +389,7 @@ async def generate_flow_from_name(
384
389
)
385
390
async def generate_flow_continuation (
386
391
self ,
392
+ state : State ,
387
393
events : List [dict ],
388
394
temperature : Optional [float ] = None ,
389
395
llm : Optional [BaseLLM ] = None ,
@@ -421,6 +427,7 @@ async def generate_flow_continuation(
421
427
events = events ,
422
428
context = {
423
429
"examples" : examples ,
430
+ "context" : state .context ,
424
431
},
425
432
)
426
433
@@ -467,6 +474,7 @@ async def generate_flow_continuation(
467
474
@action (name = "GenerateValueAction" , is_system_action = True , execute_async = True )
468
475
async def generate_value (
469
476
self ,
477
+ state : State ,
470
478
instructions : str ,
471
479
events : List [dict ],
472
480
var_name : Optional [str ] = None ,
@@ -504,6 +512,7 @@ async def generate_value(
504
512
"examples" : examples ,
505
513
"instructions" : instructions ,
506
514
"var_name" : var_name if var_name else "result" ,
515
+ "context" : state .context ,
507
516
},
508
517
)
509
518
0 commit comments