Current section
Files
Jump to
Current section
Files
lib/snakebridge_generated/dspy/clients/base_lm/__init__.ex
# Generated by SnakeBridge v0.12.0 - DO NOT EDIT MANUALLY
# Regenerate with: mix compile
# Library: dspy 3.1.2
# Python module: dspy.clients.base_lm
defmodule Dspy.Clients.BaseLm do
@moduledoc """
Submodule bindings for `dspy.clients.base_lm`.
"""
def __snakebridge_python_name__, do: "dspy.clients.base_lm"
def __snakebridge_library__, do: "dspy"
@doc """
The global history shared across all LMs.
Parameters:
- `n` (integer() default: 1)
Returns:
- `term()`
"""
@spec inspect_history() :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec inspect_history(keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec inspect_history(integer()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec inspect_history(integer(), keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
def inspect_history() do
SnakeBridge.Runtime.call(__MODULE__, :inspect_history, [], [])
end
def inspect_history(opts)
when is_list(opts) and
(opts == [] or
(is_tuple(hd(opts)) and tuple_size(hd(opts)) == 2 and is_atom(elem(hd(opts), 0)))) do
SnakeBridge.Runtime.call(__MODULE__, :inspect_history, [], opts)
end
def inspect_history(n) do
SnakeBridge.Runtime.call(__MODULE__, :inspect_history, [n], [])
end
def inspect_history(n, opts)
when is_list(opts) and
(opts == [] or
(is_tuple(hd(opts)) and tuple_size(hd(opts)) == 2 and is_atom(elem(hd(opts), 0)))) do
SnakeBridge.Runtime.call(__MODULE__, :inspect_history, [n], opts)
end
end