Dspy.Predict (dspy v0.1.0)

View Source

Basic prediction module for DSPy.

The Predict module takes a signature and generates predictions by constructing prompts and calling the language model.

Summary

Types

t()

@type t() :: %Dspy.Predict{
  examples: [Dspy.Example.t()],
  max_retries: non_neg_integer(),
  signature: Dspy.Signature.t()
}

Functions

new(signature, opts \\ [])

Create a new Predict module.

parameters(module)

Callback implementation for Dspy.Module.parameters/1.

update_parameters(module, parameters)

Callback implementation for Dspy.Module.update_parameters/2.