Skip to content

Commit

Permalink
rename to ag2
Browse files Browse the repository at this point in the history
  • Loading branch information
cjunkin committed Jan 17, 2025
1 parent e0904cc commit ba18a35
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# OpenInference AG2 Instrumentation

WIP
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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:.}
Expand Down

0 comments on commit ba18a35

Please sign in to comment.