We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b090e22 commit d301a67Copy full SHA for d301a67
1 file changed
sdks/python/apache_beam/ml/inference/agent_development_kit.py
@@ -57,6 +57,7 @@
57
from collections.abc import Sequence
58
from typing import Any
59
from typing import Optional
60
+from typing import Union
61
62
from apache_beam.ml.inference.base import ModelHandler
63
from apache_beam.ml.inference.base import PredictionResult
@@ -74,12 +75,11 @@
74
75
ADK_AVAILABLE = False
76
genai_Content = Any # type: ignore[assignment, misc]
77
genai_Part = Any # type: ignore[assignment, misc]
- Agent = None
78
79
LOGGER = logging.getLogger("ADKAgentModelHandler")
80
81
# Type alias for an agent or factory that produces one
82
-_AgentOrFactory = Agent | Callable[[], Agent]
+_AgentOrFactory = Union["Agent", Callable[[], "Agent"]]
83
84
85
class ADKAgentModelHandler(ModelHandler[str | genai_Content,
0 commit comments