Current section
Files
Jump to
Current section
Files
lib/snakebridge_generated/dspy/utils/callback/__init__.ex
# Generated by SnakeBridge v0.12.0 - DO NOT EDIT MANUALLY
# Regenerate with: mix compile
# Library: dspy 3.1.2
# Python module: dspy.utils.callback
defmodule Dspy.Utils.Callback do
@moduledoc """
Submodule bindings for `dspy.utils.callback`.
"""
def __snakebridge_python_name__, do: "dspy.utils.callback"
def __snakebridge_library__, do: "dspy"
@doc """
Decorator to add callback functionality to instance methods.
Parameters:
- `fn` (term())
Returns:
- `term()`
"""
@spec with_callbacks(term(), keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def with_callbacks(py_fn, opts \\ []) do
SnakeBridge.Runtime.call(__MODULE__, :with_callbacks, [py_fn], opts)
end
end