|
32 | 32 | import warnings |
33 | 33 |
|
34 | 34 | if TYPE_CHECKING: |
35 | | - try: |
36 | | - from google.adk.events.event import Event |
| 35 | + try: |
| 36 | + from google.adk.events.event import Event |
37 | 37 |
|
38 | | - Event = Event |
39 | | - except (ImportError, AttributeError): |
40 | | - Event = Any |
| 38 | + Event = Event |
| 39 | + except (ImportError, AttributeError): |
| 40 | + Event = Any |
41 | 41 |
|
42 | | - try: |
43 | | - from google.adk.apps import App |
| 42 | + try: |
| 43 | + from google.adk.apps import App |
44 | 44 |
|
45 | | - App = App |
46 | | - except (ImportError, AttributeError): |
47 | | - App = Any |
| 45 | + App = App |
| 46 | + except (ImportError, AttributeError): |
| 47 | + App = Any |
48 | 48 |
|
49 | | - try: |
50 | | - from google.adk.agents import BaseAgent |
| 49 | + try: |
| 50 | + from google.adk.agents import BaseAgent |
51 | 51 |
|
52 | | - BaseAgent = BaseAgent |
53 | | - except (ImportError, AttributeError): |
54 | | - BaseAgent = Any |
| 52 | + BaseAgent = BaseAgent |
| 53 | + except (ImportError, AttributeError): |
| 54 | + BaseAgent = Any |
55 | 55 |
|
56 | | - try: |
57 | | - from google.adk.plugins.base_plugin import BasePlugin |
| 56 | + try: |
| 57 | + from google.adk.plugins.base_plugin import BasePlugin |
58 | 58 |
|
59 | | - BasePlugin = BasePlugin |
60 | | - except (ImportError, AttributeError): |
61 | | - BasePlugin = Any |
| 59 | + BasePlugin = BasePlugin |
| 60 | + except (ImportError, AttributeError): |
| 61 | + BasePlugin = Any |
62 | 62 |
|
63 | | - try: |
64 | | - from google.adk.sessions import BaseSessionService |
| 63 | + try: |
| 64 | + from google.adk.sessions import BaseSessionService |
65 | 65 |
|
66 | | - BaseSessionService = BaseSessionService |
67 | | - except (ImportError, AttributeError): |
68 | | - BaseSessionService = Any |
| 66 | + BaseSessionService = BaseSessionService |
| 67 | + except (ImportError, AttributeError): |
| 68 | + BaseSessionService = Any |
69 | 69 |
|
70 | | - try: |
71 | | - from google.adk.artifacts import BaseArtifactService |
| 70 | + try: |
| 71 | + from google.adk.artifacts import BaseArtifactService |
72 | 72 |
|
73 | | - BaseArtifactService = BaseArtifactService |
74 | | - except (ImportError, AttributeError): |
75 | | - BaseArtifactService = Any |
| 73 | + BaseArtifactService = BaseArtifactService |
| 74 | + except (ImportError, AttributeError): |
| 75 | + BaseArtifactService = Any |
76 | 76 |
|
77 | | - try: |
78 | | - from google.adk.memory import BaseMemoryService |
| 77 | + try: |
| 78 | + from google.adk.memory import BaseMemoryService |
79 | 79 |
|
80 | | - BaseMemoryService = BaseMemoryService |
81 | | - except (ImportError, AttributeError): |
82 | | - BaseMemoryService = Any |
| 80 | + BaseMemoryService = BaseMemoryService |
| 81 | + except (ImportError, AttributeError): |
| 82 | + BaseMemoryService = Any |
83 | 83 |
|
84 | | - try: |
85 | | - from opentelemetry.sdk import trace |
| 84 | + try: |
| 85 | + from opentelemetry.sdk import trace |
86 | 86 |
|
87 | | - TracerProvider = trace.TracerProvider |
88 | | - SpanProcessor = trace.SpanProcessor |
89 | | - SynchronousMultiSpanProcessor = trace.SynchronousMultiSpanProcessor |
90 | | - except (ImportError, AttributeError): |
91 | | - TracerProvider = Any |
92 | | - SpanProcessor = Any |
93 | | - SynchronousMultiSpanProcessor = Any |
| 87 | + TracerProvider = trace.TracerProvider |
| 88 | + SpanProcessor = trace.SpanProcessor |
| 89 | + SynchronousMultiSpanProcessor = trace.SynchronousMultiSpanProcessor |
| 90 | + except (ImportError, AttributeError): |
| 91 | + TracerProvider = Any |
| 92 | + SpanProcessor = Any |
| 93 | + SynchronousMultiSpanProcessor = Any |
94 | 94 |
|
95 | 95 |
|
96 | | -_DEFAULT_APP_NAME = "default-app-name" |
| 96 | +_DEFAULT_APP_NAME = "default_app_name" |
97 | 97 | _DEFAULT_USER_ID = "default-user-id" |
98 | 98 | _TELEMETRY_API_DISABLED_WARNING = ( |
99 | 99 | "Tracing integration for Agent Engine has migrated to a new API.\n" |
|
0 commit comments