# Generated by SnakeBridge v0.12.0 - DO NOT EDIT MANUALLY # Regenerate with: mix compile # Library: dspy 3.1.2 # Python module: dspy # Python class: Provider defmodule Dspy.Provider do def __snakebridge_python_name__, do: "dspy" def __snakebridge_python_class__, do: "Provider" def __snakebridge_library__, do: "dspy" @opaque t :: SnakeBridge.Ref.t() @spec new(keyword()) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()} def new(opts \\ []) do SnakeBridge.Runtime.call_class(__MODULE__, :__init__, [], opts) end @spec finetune( SnakeBridge.Ref.t(), Dspy.Clients.Provider.TrainingJob.t(), String.t(), list(%{optional(String.t()) => term()}), term(), list(term()), keyword() ) :: {:ok, String.t()} | {:error, Snakepit.Error.t()} def finetune(ref, job, model, train_data, train_data_format, args, opts \\ []) do {args, opts} = SnakeBridge.Runtime.normalize_args_opts(args, opts) SnakeBridge.Runtime.call_method( ref, :finetune, [job, model, train_data, train_data_format] ++ List.wrap(args), opts ) end @spec is_provider_model(SnakeBridge.Ref.t(), String.t(), keyword()) :: {:ok, boolean()} | {:error, Snakepit.Error.t()} def is_provider_model(ref, model, opts \\ []) do SnakeBridge.Runtime.call_method(ref, :is_provider_model, [model], opts) end @spec kill(SnakeBridge.Ref.t(), term(), list(term()), keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()} def kill(ref, lm, args, opts \\ []) do {args, opts} = SnakeBridge.Runtime.normalize_args_opts(args, opts) SnakeBridge.Runtime.call_method(ref, :kill, [lm] ++ List.wrap(args), opts) end @spec launch(SnakeBridge.Ref.t(), term(), list(term()), keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()} def launch(ref, lm, args, opts \\ []) do {args, opts} = SnakeBridge.Runtime.normalize_args_opts(args, opts) SnakeBridge.Runtime.call_method(ref, :launch, [lm] ++ List.wrap(args), opts) end end