Skip to content

Commit 74589a1

Browse files
xuanyang15copybara-github
authored andcommitted
chore: make LlmRequest.LiveConnectConfig field default to a factory to avoid sharing a mutable instance
PiperOrigin-RevId: 790854215
1 parent e41dbcc commit 74589a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/google/adk/models/llm_request.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ class LlmRequest(BaseModel):
4848
config: types.GenerateContentConfig = Field(
4949
default_factory=types.GenerateContentConfig
5050
)
51-
live_connect_config: types.LiveConnectConfig = types.LiveConnectConfig()
51+
live_connect_config: types.LiveConnectConfig = Field(
52+
default_factory=types.LiveConnectConfig
53+
)
5254
"""Additional config for the generate content request.
5355
5456
tools in generate_content_config should not be set.

0 commit comments

Comments
 (0)