diff --git a/python/instrumentation/openinference-instrumentation-autogen/CHANGELOG.md b/python/instrumentation/openinference-instrumentation-ag2/CHANGELOG.md similarity index 100% rename from python/instrumentation/openinference-instrumentation-autogen/CHANGELOG.md rename to python/instrumentation/openinference-instrumentation-ag2/CHANGELOG.md diff --git a/python/instrumentation/openinference-instrumentation-autogen/LICENSE b/python/instrumentation/openinference-instrumentation-ag2/LICENSE similarity index 100% rename from python/instrumentation/openinference-instrumentation-autogen/LICENSE rename to python/instrumentation/openinference-instrumentation-ag2/LICENSE diff --git a/python/instrumentation/openinference-instrumentation-ag2/README.md b/python/instrumentation/openinference-instrumentation-ag2/README.md new file mode 100644 index 000000000..ac7808c66 --- /dev/null +++ b/python/instrumentation/openinference-instrumentation-ag2/README.md @@ -0,0 +1,3 @@ +# OpenInference AG2 Instrumentation + +WIP diff --git a/python/instrumentation/openinference-instrumentation-autogen/pyproject.toml b/python/instrumentation/openinference-instrumentation-ag2/pyproject.toml similarity index 88% rename from python/instrumentation/openinference-instrumentation-autogen/pyproject.toml rename to python/instrumentation/openinference-instrumentation-ag2/pyproject.toml index 792eea179..49b4d3357 100644 --- a/python/instrumentation/openinference-instrumentation-autogen/pyproject.toml +++ b/python/instrumentation/openinference-instrumentation-ag2/pyproject.toml @@ -3,9 +3,9 @@ requires = ["hatchling"] build-backend = "hatchling.build" [project] -name = "openinference-instrumentation-autogen" +name = "openinference-instrumentation-ag2" dynamic = ["version"] -description = "OpenInference Autogen Instrumentation" +description = "OpenInference AG2 Instrumentation" readme = "README.md" license = "Apache-2.0" requires-python = ">=3.8, <3.13" @@ -38,10 +38,10 @@ instruments = [ ] [project.urls] -Homepage = "https://github.com/Arize-ai/openinference/tree/main/python/instrumentation/openinference-instrumentation-autogen" +Homepage = "https://github.com/Arize-ai/openinference/tree/main/python/instrumentation/openinference-instrumentation-ag2" [tool.hatch.version] -path = "src/openinference/instrumentation/autogen/version.py" +path = "src/openinference/instrumentation/ag2/version.py" [tool.hatch.build.targets.sdist] include = [ diff --git a/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py b/python/instrumentation/openinference-instrumentation-ag2/src/openinference/instrumentation/ag2/__init__.py similarity index 98% rename from python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py rename to python/instrumentation/openinference-instrumentation-ag2/src/openinference/instrumentation/ag2/__init__.py index e224d008e..908a18649 100644 --- a/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/__init__.py +++ b/python/instrumentation/openinference-instrumentation-ag2/src/openinference/instrumentation/ag2/__init__.py @@ -7,7 +7,7 @@ from autogen import ConversableAgent # type: ignore -class AutogenInstrumentor: +class AG2Instrumentor: def __init__(self) -> None: self.tracer = trace.get_tracer(__name__) self._original_generate: Optional[Callable[..., Any]] = None @@ -20,7 +20,7 @@ def _safe_json_dumps(self, obj: Any) -> str: except (TypeError, ValueError): return json.dumps(str(obj)) - def instrument(self) -> "AutogenInstrumentor": + def instrument(self) -> "AG2Instrumentor": # Save original methods self._original_generate = ConversableAgent.generate_reply self._original_initiate_chat = ConversableAgent.initiate_chat @@ -205,7 +205,7 @@ def wrapped_execute_function( return self - def uninstrument(self) -> "AutogenInstrumentor": + def uninstrument(self) -> "AG2Instrumentor": """Restore original behavior.""" if ( self._original_generate diff --git a/python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/version.py b/python/instrumentation/openinference-instrumentation-ag2/src/openinference/instrumentation/ag2/version.py similarity index 100% rename from python/instrumentation/openinference-instrumentation-autogen/src/openinference/instrumentation/autogen/version.py rename to python/instrumentation/openinference-instrumentation-ag2/src/openinference/instrumentation/ag2/version.py diff --git a/python/instrumentation/openinference-instrumentation-autogen/tests/test_instrumentor.py b/python/instrumentation/openinference-instrumentation-ag2/tests/test.py similarity index 100% rename from python/instrumentation/openinference-instrumentation-autogen/tests/test_instrumentor.py rename to python/instrumentation/openinference-instrumentation-ag2/tests/test.py diff --git a/python/instrumentation/openinference-instrumentation-autogen/README.md b/python/instrumentation/openinference-instrumentation-autogen/README.md deleted file mode 100644 index 1c0bc8640..000000000 --- a/python/instrumentation/openinference-instrumentation-autogen/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# OpenInference Autogen (ag2) Instrumentation - -EXPERIMENTAL diff --git a/python/tox.ini b/python/tox.ini index 6caf4410b..b7636f640 100644 --- a/python/tox.ini +++ b/python/tox.ini @@ -19,7 +19,7 @@ envlist = ; py3{9,12}-ci-instructor py3{8,12}-ci-{anthropic,anthropic-latest} py3{10,13}-ci-{smolagents,smolagents-latest} - py3{8,12}-ci-{autogen,autogen-latest} + py3{8,12}-ci-{ag2,ag2-latest} py38-mypy-langchain_core [testenv] @@ -46,7 +46,7 @@ changedir = instructor: instrumentation/openinference-instrumentation-instructor/ anthropic: instrumentation/openinference-instrumentation-anthropic/ smolagents: instrumentation/openinference-instrumentation-smolagents/ - autogen: instrumentation/openinference-instrumentation-autogen/ + ag2: instrumentation/openinference-instrumentation-ag2/ commands_pre = instrumentation: uv pip install --reinstall {toxinidir}/openinference-instrumentation[test] semconv: uv pip install --reinstall {toxinidir}/openinference-semantic-conventions @@ -89,7 +89,7 @@ commands_pre = anthropic: uv pip install -r test-requirements.txt anthropic-latest: uv pip install -U anthropic 'httpx<0.28' smolagents: uv pip install --reinstall {toxinidir}/instrumentation/openinference-instrumentation-smolagents[test] - autogen: uv pip install --reinstall {toxinidir}/instrumentation/openinference-instrumentation-autogen[test] + ag2: uv pip install --reinstall {toxinidir}/instrumentation/openinference-instrumentation-ag2[test] commands = ruff: ruff format {posargs:.} ruff: ruff check --fix {posargs:.}