Skip to content

Commit cf2bbf1

Browse files
committed
upgrade restate sdk
1 parent b7966e7 commit cf2bbf1

File tree

8 files changed

+1345
-66
lines changed

8 files changed

+1345
-66
lines changed

openai-agents/examples/pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@ requires-python = ">=3.11"
77
dependencies = [
88
"hypercorn>=0.17.3",
99
"pydantic>=2.10.6",
10-
"restate-sdk[serde]>=0.13.1",
10+
"restate-sdk[serde]>=0.13.2",
1111
"openai-agents>=0.6.2",
1212
]
1313

1414
[tool.hatch.build.targets.wheel]
1515
packages = ["app"]
1616

17-
[tool.uv.sources]
18-
restate-sdk = { path = "../../../sdk-python/dist/restate_sdk-0.13.1-cp313-cp313-linux_x86_64.whl" }
19-
2017
[build-system]
2118
requires = ["hatchling"]
2219
build-backend = "hatchling.build"

openai-agents/examples/uv.lock

Lines changed: 1264 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openai-agents/template/agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from utils.utils import (
77
fetch_weather,
88
WeatherRequest,
9-
WeatherResponse,
9+
WeatherResponse, WeatherPrompt,
1010
)
1111

1212

@@ -28,7 +28,7 @@ async def get_weather(req: WeatherRequest) -> WeatherResponse:
2828

2929

3030
@agent_service.handler()
31-
async def run(_ctx: restate.Context, message: str) -> str:
31+
async def run(_ctx: restate.Context, req: WeatherPrompt) -> str:
3232
# Runner that persists the agent execution for recoverability
33-
result = await DurableRunner.run(weather_agent, message)
33+
result = await DurableRunner.run(weather_agent, req.message)
3434
return result.final_output

openai-agents/template/pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ requires-python = ">=3.12"
77
dependencies = [
88
"httpx",
99
"hypercorn",
10-
"restate-sdk[serde]>=0.13.1",
10+
"restate-sdk[serde]>=0.13.2",
1111
"pydantic>=2.11.9",
1212
"openai-agents==0.3.1",
1313
]
@@ -16,6 +16,3 @@ dependencies = [
1616
dev = [
1717
"mypy>=1.18.2",
1818
]
19-
20-
[tool.uv.sources]
21-
restate-sdk = { path = "../../../sdk-python/dist/restate_sdk-0.13.1-cp313-cp313-linux_x86_64.whl" }

openai-agents/template/utils/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
from pydantic import BaseModel
88

99

10+
class WeatherPrompt(BaseModel):
11+
"""Request to get the weather for a city."""
12+
13+
message: str = "What is the weather in Detroit?"
14+
15+
1016
class WeatherRequest(BaseModel):
1117
"""Request to get the weather for a city."""
1218

openai-agents/template/uv.lock

Lines changed: 31 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openai-agents/tour-of-agents/pyproject.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@ requires-python = ">=3.11"
77
dependencies = [
88
"httpx",
99
"hypercorn",
10-
"restate-sdk[serde]>=0.13.1",
10+
"restate-sdk[serde]>=0.13.2",
1111
"pydantic>=2.11.9",
1212
"openai-agents>=0.6.2",
1313
]
1414

1515
[tool.hatch.build.targets.wheel]
1616
packages = ["app"]
1717

18-
[tool.uv.sources]
19-
restate-sdk = { path = "../../../sdk-python/dist/restate_sdk-0.13.1-cp313-cp313-linux_x86_64.whl" }
20-
2118
[build-system]
2219
requires = ["hatchling"]
2320
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)