Skip to content

LanguageRunner

autogen.beta.tools.sandbox.adapter.code.LanguageRunner dataclass #

LanguageRunner(inline_argv=None, file_extension=None, file_runner_argv=None)

How a language maps to an argv invocation.

Exactly one of two modes:

  • Inlineinline_argv is provided. The adapter calls sandbox.exec([*inline_argv, code]). Best for languages whose interpreter accepts -c (python, bash).
  • Filefile_extension and file_runner_argv are provided. The adapter writes code to a temp file via sandbox.put_file and then sandbox.exec([*file_runner_argv, <path>]). Best for languages without a robust -c (node, ts-node).

inline_argv class-attribute instance-attribute #

inline_argv = None

file_extension class-attribute instance-attribute #

file_extension = None

file_runner_argv class-attribute instance-attribute #

file_runner_argv = None