Skip to content

update to new sdk - #9

Open
miwialex wants to merge 1 commit into
mainfrom
rm/sdk-update
Open

update to new sdk#9
miwialex wants to merge 1 commit into
mainfrom
rm/sdk-update

Conversation

@miwialex

Copy link
Copy Markdown

update to the new version of the SDK

@cal-smith cal-smith left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of s/stepping/calling/

Comment thread etl-job/README.md
validated = await ctx.step(validate_record, record)
```
This demonstrates **calling subtasks in a loop** for batch processing.
This demonstrates **stepping subtasks in a loop** for batch processing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This right here is one of my complaints with step as a name

Suggested change
This demonstrates **stepping subtasks in a loop** for batch processing.
This demonstrates **calling subtasks in a loop** for batch processing.

Comment thread file-processing/main.py

# Process all files in parallel
# SUBTASK PATTERN: Call multiple subtasks concurrently using asyncio.gather()
# SUBTASK PATTERN: Step multiple subtasks concurrently using asyncio.gather()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# SUBTASK PATTERN: Step multiple subtasks concurrently using asyncio.gather()
# SUBTASK PATTERN: Call multiple subtasks concurrently using asyncio.gather()

Comment thread openai-agent/main.py
Comment on lines +255 to +256
This demonstrates dynamic subtask execution via ctx.step, based on
agent decisions.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This demonstrates dynamic subtask execution via ctx.step, based on
agent decisions.
This demonstrates dynamic subtask execution based on agent decisions.

Comment thread openai-agent/main.py
Comment on lines +276 to +277
# SUBTASK CALL: ctx.step runs the tool task on its own compute.
# Each tool takes different arguments.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# SUBTASK CALL: ctx.step runs the tool task on its own compute.
# Each tool takes different arguments.
# Different tools have different signatures

Comment thread openai-agent/README.md
return result
async def execute_tool(ctx: TaskContext, tool_name: str, arguments: dict) -> dict:
# SUBTASK CALL: ctx.step runs the chosen tool on its own compute.
# Each tool takes different arguments.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Each tool takes different arguments.

Comment thread openai-agent/README.md
3. `await ctx.step(call_llm_with_tools, ...)` again with tool results to generate final response

This demonstrates **nested subtask calling**: `agent_turn` → `execute_tool` → `get_order_status` (3 levels deep!).
This demonstrates **nested subtask stepping**: `agent_turn` → `execute_tool` → `get_order_status` (3 levels deep!).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This demonstrates **nested subtask stepping**: `agent_turn``execute_tool``get_order_status` (3 levels deep!).
This demonstrates **nested subtask calling**: `agent_turn``execute_tool``get_order_status` (3 levels deep!).

Comment thread openai-agent/README.md
conversation_history = turn_result["conversation_history"]
```
This demonstrates **calling subtasks in a loop** to maintain conversation state.
This demonstrates **stepping subtasks in a loop** to maintain conversation state.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This demonstrates **stepping subtasks in a loop** to maintain conversation state.
This demonstrates **calling subtasks in a loop** to maintain conversation state.

Comment thread README.md
| Example | Use Case | Key Patterns | Extra Dependencies |
|---------|----------|--------------|-------------------|
| [**Hello World**](./hello-world/) | Learn workflow basics with simple number processing | Task definition, subtask calling with `await`, basic orchestration | None |
| [**Hello World**](./hello-world/) | Learn workflow basics with simple number processing | Task definition, subtask stepping with `ctx.step`, basic orchestration | None |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| [**Hello World**](./hello-world/) | Learn workflow basics with simple number processing | Task definition, subtask stepping with `ctx.step`, basic orchestration | None |
| [**Hello World**](./hello-world/) | Learn workflow basics with simple number processing | Task definition, subtask calling with `ctx.step`, basic orchestration | None |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants