File tree Expand file tree Collapse file tree 4 files changed +13
-12
lines changed
examples/pydantic_ai_examples/temporal_streaming Expand file tree Collapse file tree 4 files changed +13
-12
lines changed Original file line number Diff line number Diff line change 99from temporalio .common import RetryPolicy
1010from temporalio .workflow import ActivityConfig
1111
12- from datamodels import AgentDependencies
1312from pydantic_ai import Agent , FilteredToolset , ModelSettings
1413from pydantic_ai .durable_exec .temporal import TemporalAgent
1514from pydantic_ai .mcp import MCPServerStdio
1615from pydantic_ai .models .anthropic import AnthropicModel
1716from pydantic_ai .providers .anthropic import AnthropicProvider
1817
18+ from .datamodels import AgentDependencies
19+
1920
2021async def get_mcp_toolsets () -> dict [str , FilteredToolset ]:
2122 """
Original file line number Diff line number Diff line change 88import os
99import uuid
1010
11+ from pydantic_ai .durable_exec .temporal import AgentPlugin , PydanticAIPlugin
1112from temporalio .client import Client
1213from temporalio .worker import Worker
1314
14- from agents import build_agent
15- from datamodels import EventKind , EventStream
16- from pydantic_ai .durable_exec .temporal import AgentPlugin , PydanticAIPlugin
17- from streaming_handler import streaming_handler
18- from utils import read_config_yml
19- from workflow import YahooFinanceSearchWorkflow
15+ from .agents import build_agent
16+ from .datamodels import EventKind , EventStream
17+ from .streaming_handler import streaming_handler
18+ from .utils import read_config_yml
19+ from .workflow import YahooFinanceSearchWorkflow
2020
2121
2222async def poll_events (workflow_handle ):
Original file line number Diff line number Diff line change 1919)
2020from temporalio import activity
2121
22- from datamodels import AgentDependencies , EventKind , EventStream
22+ from . datamodels import AgentDependencies , EventKind , EventStream
2323
2424
2525async def streaming_handler (
Original file line number Diff line number Diff line change 1313from pydantic_ai import UsageLimits
1414from temporalio import activity , workflow
1515
16- from agents import build_agent
17- from streaming_handler import streaming_handler
18- from datamodels import AgentDependencies , EventKind , EventStream
19- from utils import read_config_yml
16+ from . agents import build_agent
17+ from . datamodels import AgentDependencies , EventKind , EventStream
18+ from . streaming_handler import streaming_handler
19+ from . utils import read_config_yml
2020
2121
2222@workflow .defn
You can’t perform that action at this time.
0 commit comments