Skip to content

Conversation

@lxdlam
Copy link
Contributor

@lxdlam lxdlam commented Mar 21, 2025

  • The code introduces a bridge function to forward exception arguments directly to the dspy side manager.
  • Implement a smolagents-inspired FinalAnswer exception, allowing user code to call final_answer() for a clean, non-local exit. The manager captures this to produce a structured final output rather than relying on stdout, particularly beneficial for complex generated code. Add corresponding unit tests to cover new functionality.
  • Minor enhancements included (see code for details).

@lxdlam lxdlam force-pushed the feat/python_exception_args branch from 5c6a170 to bf248c7 Compare March 21, 2025 06:18
@okhat okhat merged commit a8df4a7 into stanfordnlp:main Mar 21, 2025
4 checks passed
@lxdlam lxdlam deleted the feat/python_exception_args branch March 21, 2025 06:42
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