Current section

Files

Jump to
dspex lib snakebridge_generated dspy primitives code_interpreter.ex
Raw

lib/snakebridge_generated/dspy/primitives/code_interpreter.ex

# Generated by SnakeBridge v0.12.0 - DO NOT EDIT MANUALLY
# Regenerate with: mix compile
# Library: dspy 3.1.2
# Python module: dspy.primitives
# Python class: CodeInterpreter
defmodule Dspy.Primitives.CodeInterpreterClass do
def __snakebridge_python_name__, do: "dspy.primitives"
def __snakebridge_python_class__, do: "CodeInterpreter"
def __snakebridge_library__, do: "dspy"
@opaque t :: SnakeBridge.Ref.t()
@spec new(list(term()), keyword()) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()}
def new(args, opts \\ []) do
{args, opts} = SnakeBridge.Runtime.normalize_args_opts(args, opts)
SnakeBridge.Runtime.call_class(__MODULE__, :__init__, [] ++ List.wrap(args), opts)
end
@spec execute(SnakeBridge.Ref.t(), String.t(), list(term()), keyword()) ::
{:ok, term()} | {:error, Snakepit.Error.t()}
def execute(ref, code, args, opts \\ []) do
{args, opts} = SnakeBridge.Runtime.normalize_args_opts(args, opts)
SnakeBridge.Runtime.call_method(ref, :execute, [code] ++ List.wrap(args), opts)
end
@spec shutdown(SnakeBridge.Ref.t(), keyword()) :: {:ok, nil} | {:error, Snakepit.Error.t()}
def shutdown(ref, opts \\ []) do
SnakeBridge.Runtime.call_method(ref, :shutdown, [], opts)
end
@spec start(SnakeBridge.Ref.t(), keyword()) :: {:ok, nil} | {:error, Snakepit.Error.t()}
def start(ref, opts \\ []) do
SnakeBridge.Runtime.call_method(ref, :start, [], opts)
end
@spec _abc_impl(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def _abc_impl(ref) do
SnakeBridge.Runtime.get_attr(ref, :_abc_impl)
end
@spec _is_protocol(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def _is_protocol(ref) do
SnakeBridge.Runtime.get_attr(ref, :_is_protocol)
end
@spec _is_runtime_protocol(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def _is_runtime_protocol(ref) do
SnakeBridge.Runtime.get_attr(ref, :_is_runtime_protocol)
end
@spec tools(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def tools(ref) do
SnakeBridge.Runtime.get_attr(ref, :tools)
end
end