# Generated by SnakeBridge v0.12.0 - DO NOT EDIT MANUALLY # Regenerate with: mix compile # Library: dspy 3.1.2 # Python module: dspy.dsp.utils.settings defmodule Dspy.Dsp.Utils.Settings do @moduledoc """ Submodule bindings for `dspy.dsp.utils.settings`. """ def __snakebridge_python_name__, do: "dspy.dsp.utils.settings" def __snakebridge_library__, do: "dspy" @doc """ A singleton class for DSPy configuration settings. Thread-safe global configuration. - 'configure' can be called by only one 'owner' thread (the first thread that calls it). - Other threads see the configured global values from 'main_thread_config'. - 'context' sets thread-local overrides. These overrides propagate to threads spawned inside that context block, when (and only when!) using a ParallelExecutor that copies overrides. 1. Only one unique thread (which can be any thread!) can call dspy.configure. 2. It affects a global state, visible to all. As a result, user threads work, but they shouldn't be mixed with concurrent changes to dspy.configure from the "main" thread. (TODO: In the future, add warnings: if there are near-in-time user-thread reads followed by .configure calls.) 3. Any thread can use dspy.context. It propagates to child threads created with DSPy primitives: Parallel, asyncify, etc. Returns: - `Dspy.Dsp.Utils.Settings.Settings.t()` """ @spec settings() :: {:ok, Dspy.Dsp.Utils.Settings.Settings.t()} | {:error, Snakepit.Error.t()} def settings() do SnakeBridge.Runtime.get_module_attr(__MODULE__, :settings) end end