openai-agents-python/src/agents/version.py
Rohan Mehta 7c2d7f4abd
Misc small fixes - mcp version, test for function_schema, version gen (#429)
Summary:
1. Use <2 for MCP version so it doesn't break if the MCP sdk upgrades.
2. Test the func schema extraction logic.
3. Fix the logic to get the version nuber of the framework

Test Plan:
unit tests
2025-04-03 12:08:01 -04:00

7 lines
230 B
Python

import importlib.metadata
try:
__version__ = importlib.metadata.version("openai-agents")
except importlib.metadata.PackageNotFoundError:
# Fallback if running from source without being installed
__version__ = "0.0.0"