Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import asyncio
from collections.abc import Sequence

from agents import RunConfig, Runner, RunResult, custom_span, trace
from agents import RunConfig, Runner, RunResult, RunResultStreaming, custom_span, trace
from temporalio import workflow

from openai_agents.financial_research_agent.agents.financials_agent import (
Expand All @@ -26,7 +26,7 @@
)


async def _summary_extractor(run_result: RunResult) -> str:
async def _summary_extractor(run_result: RunResult | RunResultStreaming) -> str:
"""Custom output extractor for sub-agents that return an AnalysisSummary."""
# The financial/risk analyst agents emit an AnalysisSummary with a `summary` field.
# We want the tool call to return just that summary text so the writer can drop it inline.
Expand Down
3 changes: 2 additions & 1 deletion openai_agents/tools/workflows/image_generator_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Optional

from agents import Agent, ImageGenerationTool, Runner
from openai.types.responses.response_output_item import ImageGenerationCall
from temporalio import workflow


Expand Down Expand Up @@ -34,7 +35,7 @@ async def run(self, prompt: str) -> ImageGenerationResult:
for item in result.new_items:
if (
item.type == "tool_call_item"
and item.raw_item.type == "image_generation_call"
and isinstance(item.raw_item, ImageGenerationCall)
and (img_result := item.raw_item.result)
):
image_data = img_result
Expand Down
16 changes: 8 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [{ name = "Temporal Technologies Inc", email = "sdk@temporal.io" }]
requires-python = ">=3.10"
readme = "README.md"
license = "MIT"
dependencies = ["temporalio>=1.23.0,<2"]
dependencies = ["temporalio>=1.26.0,<2"]

[project.urls]
Homepage = "https://github.com/temporalio/samples-python"
Expand All @@ -31,22 +31,22 @@ dsl = ["pyyaml>=6.0.1,<7", "types-pyyaml>=6.0.12,<7", "dacite>=1.8.1,<2"]
encryption = ["cryptography>=38.0.1,<39", "aiohttp>=3.8.1,<4"]
gevent = ["gevent>=25.4.2 ; python_version >= '3.8'"]
langchain = [
"langchain>=0.1.7,<0.2 ; python_version >= '3.8.1' and python_version < '4.0'",
"langchain-openai>=0.0.6,<0.0.7 ; python_version >= '3.8.1' and python_version < '4.0'",
"langsmith>=0.1.22,<0.2 ; python_version >= '3.8.1' and python_version < '4.0'",
"openai>=1.4.0,<2",
"langchain>=1.2.15,<2 ; python_version >= '3.8.1' and python_version < '4.0'",
"langchain-openai>=1.1.13,<2 ; python_version >= '3.8.1' and python_version < '4.0'",
"langsmith>=0.3.45,<0.4 ; python_version >= '3.8.1' and python_version < '4.0'",
"openai>=2.0.0,<3",
"fastapi>=0.115.12",
"tqdm>=4.62.0,<5",
"uvicorn[standard]>=0.24.0.post1,<0.25",
"uvicorn[standard]>=0.31.0,<0.32.0",
]
nexus = ["nexus-rpc>=1.1.0,<2"]
open-telemetry = [
"temporalio[opentelemetry]",
"opentelemetry-exporter-otlp-proto-grpc",
]
openai-agents = [
"openai-agents[litellm] == 0.3.2",
"temporalio[openai-agents] >= 1.18.0",
"openai-agents[litellm] >= 0.14.1",
"temporalio[openai-agents,opentelemetry] >= 1.26.0",
"requests>=2.32.0,<3",
]
pydantic-converter = ["pydantic>=2.10.6,<3"]
Expand Down
Loading
Loading