Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions google/genai/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from ._interactions.resources import AsyncInteractionsResource as AsyncNextGenInteractionsResource, InteractionsResource as NextGenInteractionsResource
from ._interactions.resources import WebhooksResource, AsyncWebhooksResource
_interactions_experimental_warned = False
_webhooks_preview_warned = False

class AsyncGeminiNextGenAPIClientAdapter(_interactions.AsyncGeminiNextGenAPIClientAdapter):
"""Adapter for the Gemini NextGen API Client."""
Expand Down Expand Up @@ -202,6 +203,14 @@ def interactions(self) -> AsyncNextGenInteractionsResource:

@property
def webhooks(self) -> AsyncWebhooksResource:
global _webhooks_preview_warned
if not _webhooks_preview_warned:
_webhooks_preview_warned = True
warnings.warn(
'Webhooks usage is preview and may change in future versions.',
category=UserWarning,
stacklevel=1,
)
return self._nextgen_client.webhooks

@property
Expand Down Expand Up @@ -553,6 +562,14 @@ def interactions(self) -> NextGenInteractionsResource:

@property
def webhooks(self) -> WebhooksResource:
global _webhooks_preview_warned
if not _webhooks_preview_warned:
_webhooks_preview_warned = True
warnings.warn(
'Webhooks usage is preview and may change in future versions.',
category=UserWarning,
stacklevel=1,
)
return self._nextgen_client.webhooks

@property
Expand Down
Loading