Skip to content

Commit 0549c1c

Browse files
amirhcopybara-github
authored andcommitted
feat!: Rename SSE events to interaction.created and interaction.completed
PiperOrigin-RevId: 911764494
1 parent 99393c2 commit 0549c1c

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

google/genai/_interactions/types/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393
from .generation_config_param import GenerationConfigParam as GenerationConfigParam
9494
from .google_maps_result_step import GoogleMapsResultStep as GoogleMapsResultStep
9595
from .google_search_call_step import GoogleSearchCallStep as GoogleSearchCallStep
96-
from .interaction_start_event import InteractionStartEvent as InteractionStartEvent
9796
from .model_output_step_param import ModelOutputStepParam as ModelOutputStepParam
9897
from .url_context_result_step import URLContextResultStep as URLContextResultStep
9998
from .webhook_delete_response import WebhookDeleteResponse as WebhookDeleteResponse
@@ -102,18 +101,19 @@
102101
from .tool_choice_config_param import ToolChoiceConfigParam as ToolChoiceConfigParam
103102
from .google_search_result_step import GoogleSearchResultStep as GoogleSearchResultStep
104103
from .interaction_create_params import InteractionCreateParams as InteractionCreateParams
104+
from .interaction_created_event import InteractionCreatedEvent as InteractionCreatedEvent
105105
from .interaction_status_update import InteractionStatusUpdate as InteractionStatusUpdate
106106
from .mcp_server_tool_call_step import MCPServerToolCallStep as MCPServerToolCallStep
107107
from .code_execution_result_step import CodeExecutionResultStep as CodeExecutionResultStep
108108
from .deep_research_agent_config import DeepResearchAgentConfig as DeepResearchAgentConfig
109109
from .dynamic_agent_config_param import DynamicAgentConfigParam as DynamicAgentConfigParam
110110
from .function_result_step_param import FunctionResultStepParam as FunctionResultStepParam
111-
from .interaction_complete_event import InteractionCompleteEvent as InteractionCompleteEvent
112111
from .text_response_format_param import TextResponseFormatParam as TextResponseFormatParam
113112
from .audio_response_format_param import AudioResponseFormatParam as AudioResponseFormatParam
114113
from .file_search_call_step_param import FileSearchCallStepParam as FileSearchCallStepParam
115114
from .google_maps_call_step_param import GoogleMapsCallStepParam as GoogleMapsCallStepParam
116115
from .image_response_format_param import ImageResponseFormatParam as ImageResponseFormatParam
116+
from .interaction_completed_event import InteractionCompletedEvent as InteractionCompletedEvent
117117
from .mcp_server_tool_result_step import MCPServerToolResultStep as MCPServerToolResultStep
118118
from .url_context_call_step_param import URLContextCallStepParam as URLContextCallStepParam
119119
from .video_response_format_param import VideoResponseFormatParam as VideoResponseFormatParam

google/genai/_interactions/types/interaction_complete_event.py renamed to google/genai/_interactions/types/interaction_completed_event.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
from .._models import BaseModel
2222
from .interaction import Interaction
2323

24-
__all__ = ["InteractionCompleteEvent"]
24+
__all__ = ["InteractionCompletedEvent"]
2525

2626

27-
class InteractionCompleteEvent(BaseModel):
28-
event_type: Literal["interaction.complete"]
27+
class InteractionCompletedEvent(BaseModel):
28+
event_type: Literal["interaction.completed"]
2929

3030
interaction: Interaction
3131
"""Required.

google/genai/_interactions/types/interaction_start_event.py renamed to google/genai/_interactions/types/interaction_created_event.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
from .._models import BaseModel
2222
from .interaction import Interaction
2323

24-
__all__ = ["InteractionStartEvent"]
24+
__all__ = ["InteractionCreatedEvent"]
2525

2626

27-
class InteractionStartEvent(BaseModel):
28-
event_type: Literal["interaction.start"]
27+
class InteractionCreatedEvent(BaseModel):
28+
event_type: Literal["interaction.created"]
2929

3030
interaction: Interaction
3131
"""The Interaction resource."""

google/genai/_interactions/types/interaction_sse_event.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
from .step_delta import StepDelta
2424
from .step_start import StepStart
2525
from .error_event import ErrorEvent
26-
from .interaction_start_event import InteractionStartEvent
26+
from .interaction_created_event import InteractionCreatedEvent
2727
from .interaction_status_update import InteractionStatusUpdate
28-
from .interaction_complete_event import InteractionCompleteEvent
28+
from .interaction_completed_event import InteractionCompletedEvent
2929

3030
__all__ = ["InteractionSSEEvent"]
3131

3232
InteractionSSEEvent: TypeAlias = Annotated[
3333
Union[
34-
InteractionStartEvent,
35-
InteractionCompleteEvent,
34+
InteractionCreatedEvent,
35+
InteractionCompletedEvent,
3636
InteractionStatusUpdate,
3737
ErrorEvent,
3838
StepStart,

0 commit comments

Comments
 (0)