stanfordnlp / dspy

DSPy: The framework for programming—not prompting—language models
https://dspy.ai
MIT License
19.07k stars 1.46k forks source link

Type annotations with ChainOfThought are not included in prompt or enforced #1743

Closed neil-sola closed 2 weeks ago

neil-sola commented 2 weeks ago

Previously with TypedChainOfThought, I used a signature with pydantic type annotations - even though TypedChainOfThought is now deprecated, it doesn't include the schema in the prompt if I use the recommended ChainOfThought in the same way. Is there updated reference on how to achieve this?

okhat commented 2 weeks ago

Hey @neil-sola , could you include an example of what you're saying? Make sure to check with pip install -U dspy.

Type annotations are, to my knowledge, included and enforced in ChainOfThought, if you're on a recent version of DSPy.

neil-sola commented 2 weeks ago

Sorry, after debugging looks like it's an issue on our end - all good here!