MCPcopy
hub / github.com/huggingface/smolagents / lambda_func

Function lambda_func

src/smolagents/local_python_executor.py:425–435  ·  view source on GitHub ↗
(*values: Any)

Source from the content-addressed store, hash-verified

423 args = [arg.arg for arg in lambda_expression.args.args]
424
425 def lambda_func(*values: Any) -> Any:
426 new_state = state.copy()
427 for arg, value in zip(args, values):
428 new_state[arg] = value
429 return evaluate_ast(
430 lambda_expression.body,
431 new_state,
432 static_tools,
433 custom_tools,
434 authorized_imports,
435 )
436
437 return lambda_func
438

Callers

nothing calls this directly

Calls 1

evaluate_astFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…