DSPy – Program, don't prompt, your LLMs

lm = dspy.LM(“openai/gpt-5.4-nano”)

 

class ExtractEvent(dspy.Signature):

“””Extract event details from an email.”””

email: str = dspy.InputField()

event_name: str = dspy.OutputField()

date: str = dspy.OutputField()

 

extract = dspy.Predict(ExtractEvent)

extract(email=inbox_message)


Source: dspy.ai…

We will be happy to hear your thoughts

Leave a reply

Forlifedeals
Logo
Compare items
  • Total (0)
Compare
0