Current section
Files
Jump to
Current section
Files
lib/snakebridge_generated/dspy/primitives/module/program_meta.ex
# Generated by SnakeBridge v0.13.0 - DO NOT EDIT MANUALLY
# Regenerate with: mix compile
# Library: dspy 3.1.2
# Python module: dspy.primitives.module
# Python class: ProgramMeta
defmodule Dspy.Primitives.Module.ProgramMeta do
@moduledoc """
Metaclass ensuring every ``dspy.Module`` instance is properly initialised.
"""
def __snakebridge_python_name__, do: "dspy.primitives.module"
def __snakebridge_python_class__, do: "ProgramMeta"
def __snakebridge_library__, do: "dspy"
@opaque t :: SnakeBridge.Ref.t()
@doc """
Initialize self. See help(type(self)) for accurate signature.
## Parameters
- `args` (term())
- `kwargs` (term())
"""
@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
@doc """
Return a type's method resolution order.
## Returns
- `term()`
"""
@spec mro(SnakeBridge.Ref.t(), keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def mro(ref, opts \\ []) do
SnakeBridge.Runtime.call_method(ref, :mro, [], opts)
end
end