(
model: str,
prompt: str,
har_file_path: str,
cookie_path: str,
input_variables: dict = None,
max_steps: int = 15,
to_generate_code: bool = False,
)
| 5 | agent = None |
| 6 | |
| 7 | async def call_agent( |
| 8 | model: str, |
| 9 | prompt: str, |
| 10 | har_file_path: str, |
| 11 | cookie_path: str, |
| 12 | input_variables: dict = None, |
| 13 | max_steps: int = 15, |
| 14 | to_generate_code: bool = False, |
| 15 | ): |
| 16 | |
| 17 | llm.set_default_model(model) |
| 18 | |
| 19 | global agent |
| 20 | graph, agent = build_graph(prompt, har_file_path, cookie_path, to_generate_code) |
| 21 | event_stream = graph.astream( |
| 22 | { |
| 23 | "master_node": None, |
| 24 | "in_process_node": None, |
| 25 | "to_be_processed_nodes": [], |
| 26 | "in_process_node_dynamic_parts": [], |
| 27 | "action_url": "", |
| 28 | "input_variables": input_variables or {}, |
| 29 | }, |
| 30 | { |
| 31 | "recursion_limit": max_steps, |
| 32 | }, |
| 33 | ) |
| 34 | async for event in event_stream: |
| 35 | # print("+++", event) |
| 36 | pass |
no test coverage detected