Skip to content

Commit b72dd77

Browse files
cleanup
1 parent 3f0908d commit b72dd77

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

tests/contrib/openai_agents/test_openai.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
Sequence,
1414
Union,
1515
cast,
16-
no_type_check,
1716
)
1817

1918
import nexusrpc
@@ -552,14 +551,13 @@ async def test_nexus_tool_workflow(
552551
)
553552

554553

555-
@no_type_check
556554
def research_mock_model():
557555
responses = [
558556
ResponseBuilders.output_message(
559557
'{"searches":[{"query":"best Caribbean surfing spots April","reason":"Identify locations with optimal surfing conditions in the Caribbean during April."},{"query":"top Caribbean islands for hiking April","reason":"Find Caribbean islands with excellent hiking opportunities that are ideal in April."},{"query":"Caribbean water sports destinations April","reason":"Locate Caribbean destinations offering a variety of water sports activities in April."},{"query":"surfing conditions Caribbean April","reason":"Understand the surfing conditions and which islands are suitable for surfing in April."},{"query":"Caribbean adventure travel hiking surfing","reason":"Explore adventure travel options that combine hiking and surfing in the Caribbean."},{"query":"best beaches for surfing Caribbean April","reason":"Identify which Caribbean beaches are renowned for surfing in April."},{"query":"Caribbean islands with national parks hiking","reason":"Find islands with national parks or reserves that offer hiking trails."},{"query":"Caribbean weather April surfing conditions","reason":"Research the weather conditions in April affecting surfing in the Caribbean."},{"query":"Caribbean water sports rentals April","reason":"Look for places where water sports equipment can be rented in the Caribbean during April."},{"query":"Caribbean multi-activity vacation packages","reason":"Look for vacation packages that offer a combination of surfing, hiking, and water sports."}]}'
560558
)
561559
]
562-
for i in range(10):
560+
for _ in range(10):
563561
responses.append(
564562
ModelResponse(
565563
output=[

tests/contrib/openai_agents/test_openai_tracing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from temporalio.contrib.openai_agents.testing import (
1111
TestModelProvider,
1212
)
13-
from tests.contrib.openai_agents.test_openai import ResearchWorkflow, TestResearchModel
13+
from tests.contrib.openai_agents.test_openai import ResearchWorkflow, research_mock_model
1414
from tests.helpers import new_worker
1515

1616

@@ -42,7 +42,7 @@ async def test_tracing(client: Client):
4242
new_config = client.config()
4343
new_config["plugins"] = [
4444
openai_agents.OpenAIAgentsPlugin(
45-
model_provider=TestModelProvider(TestResearchModel())
45+
model_provider=TestModelProvider(research_mock_model())
4646
)
4747
]
4848
client = Client(**new_config)

0 commit comments

Comments
 (0)