Skip to content

Conversation

@creammangopie
Copy link

This PR introduces a new set of tools that enable stateful Python code execution within the OxyGent framework using isolated Jupyter kernels. This provides a powerful capability for complex computations, data analysis, and multi-step programming tasks.

Features:

  • Stateful Execution: Variables and imports persist across multiple calls with the same session_id
  • Isolated Environment: Each session runs in its own Jupyter kernel for security
  • Rich Output Handling: Captures stdout, expression results, and error messages
  • Resource Management: Explicit session lifecycle with start/stop controls
  • Asynchronous Support: Non-blocking execution that won't block the main application

Files changed:

  • oxygent/preset_tools/code_interpreter_tools.py: Main implementation
  • oxygent/preset_tools/init.py: Added module to imports
  • test/unittest/test_code_interpreter_tools.py: Unit tests
  • requirements.txt: Added jupyter_client and ipykernel dependencies

This commit introduces a new set of tools that enable stateful Python code execution within the OxyGent framework using isolated Jupyter kernels. This provides a powerful capability for complex computations, data analysis, and multi-step programming tasks.

Features:
- Stateful Execution: Variables and imports persist across multiple calls with the same session_id
- Isolated Environment: Each session runs in its own Jupyter kernel for security
- Rich Output Handling: Captures stdout, expression results, and error messages
- Resource Management: Explicit session lifecycle with start/stop controls
- Asynchronous Support: Non-blocking execution that won't block the main application

Files changed:
- oxygent/preset_tools/code_interpreter_tools.py: Main implementation
- oxygent/preset_tools/__init__.py: Added module to imports
- test/unittest/test_code_interpreter_tools.py: Unit tests
- requirements.txt: Added jupyter_client and ipykernel dependencies
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.

1 participant