dspy
dspy copied to clipboard
[Bug] Adding string formatting to the docstring
What feature would you like to see?
e.g., in docstrings, when there is string formatting like f-strings, the docstring doesn't recognise the string and returns to the default: https://github.com/stanfordnlp/dspy/issues/1429
Is this possible to implement? if so, I'd love to help! For now, I've used the workaround in that issue but: a) This wasn't made clear from the docs b) the workaround isn't quite hacky
Would you like to contribute?
- [x] Yes, I'd like to help implement this.
- [ ] No, I just want to request it.
Additional Context
No response
@streidarai Thanks for reporting the issue!
Do you mean building instructions dynamically? You can use dspy.make_signature(..., instructions=f"....") for this purposes. Docstring is meant to be static.