Skip to content

Conversation

@0xRaduan
Copy link

While reading the optimizer docs, noticed the examples still referenced from dspy.teleprompt import *, which is confusing since teleprompt is deprecated. Updated to use the modern dspy.<OptimizerName> pattern that's used throughout the rest of the documentation.

Changes

  • Line 38: Updated to show dspy.<OptimizerName> access pattern
  • Example code: Changed to import dspydspy.BootstrapFewShotWithRandomSearch(...)

Changed the documentation to reflect the current best practice of importing
optimizers directly from dspy (e.g., `from dspy import MIPROv2`) rather than
the legacy `from dspy.teleprompt import *` pattern.

While the teleprompt import path still works for backward compatibility, the
modern approach is cleaner and aligns with how optimizers are referenced
throughout the rest of the documentation.

Changes:
- Updated line 38 to show `dspy.<OptimizerName>` import pattern
- Updated example code to use `from dspy import BootstrapFewShotWithRandomSearch`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Updated the example code to use `import dspy` followed by
`dspy.BootstrapFewShotWithRandomSearch(...)` instead of importing
the class directly. This matches the pattern used throughout
the rest of the documentation.

Also simplified line 38 to only mention the `dspy.<OptimizerName>`
pattern, which is the standard approach in all code examples.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants