Skip to content

Conversation

@lxdlam
Copy link
Contributor

@lxdlam lxdlam commented Mar 20, 2025

Support context protocol in PythonInterpreter to enable usage such as:

with dspy.PythonInterpreter() as interp:
    result = interp(r"print('Hello, world!')")

This will automatically release the deno process and is better suited for one-shot executions.

Tests are also refactored and passed.

@okhat okhat merged commit de88e8f into stanfordnlp:main Mar 21, 2025
4 checks passed
@lxdlam lxdlam deleted the feat/context_interp branch March 21, 2025 06:33
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