Current section
Files
Jump to
Current section
Files
lib/snakebridge_generated/dspy/utils/asyncify/__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.asyncify
defmodule Dspy.Utils.Asyncify do
@moduledoc """
Submodule bindings for `dspy.utils.asyncify`.
"""
def __snakebridge_python_name__, do: "dspy.utils.asyncify"
def __snakebridge_library__, do: "dspy"
@doc """
Wraps a DSPy program so that it can be called asynchronously. This is useful for running a
program in parallel with another task (e.g., another DSPy program).
This implementation propagates the current thread's configuration context to the worker thread.
## Parameters
- `program` - The DSPy program to be wrapped for asynchronous execution.
Parameters:
- `program` (term())
Returns:
- `term()`
"""
@spec asyncify(term(), keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def asyncify(program, opts \\ []) do
SnakeBridge.Runtime.call(__MODULE__, :asyncify, [program], opts)
end
@doc """
"""
@spec get_async_max_workers(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def get_async_max_workers(opts \\ []) do
SnakeBridge.Runtime.call(__MODULE__, :get_async_max_workers, [], opts)
end
@doc """
"""
@spec get_limiter(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def get_limiter(opts \\ []) do
SnakeBridge.Runtime.call(__MODULE__, :get_limiter, [], opts)
end
end