Skip to content

Commit 002e14b

Browse files
committed
Fix: Use Restate Context in Service
1 parent 0b7bd05 commit 002e14b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

google-adk/example/app/durable_agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from google.adk.sessions import InMemorySessionService
66
from google.genai.types import Content, Part
77
from google.adk.agents.llm_agent import Agent
8-
from restate.ext.adk import RestatePlugin, restate_object_context
8+
from restate.ext.adk import RestatePlugin, restate_context
99

1010
from app.utils.models import WeatherResponse, WeatherPrompt
1111
from app.utils.utils import call_weather_api
@@ -16,7 +16,7 @@
1616
async def get_weather(city: str) -> WeatherResponse:
1717
"""Get the current weather for a given city."""
1818
# Do one or more durable steps using the Restate context
19-
return await restate_object_context().run_typed(
19+
return await restate_context().run_typed(
2020
f"Get weather {city}", call_weather_api, city=city
2121
)
2222

0 commit comments

Comments
 (0)