From 5a33e9b1688c0fb49cb08778ef47f345e5df4327 Mon Sep 17 00:00:00 2001 From: hironow Date: Wed, 12 Mar 2025 02:46:36 +0900 Subject: [PATCH] chore: fix type in doc and comment --- docs/config.md | 2 +- docs/guardrails.md | 4 ++-- docs/tracing.md | 2 +- src/agents/_run_impl.py | 2 +- tests/docs/config.md | 2 +- tests/docs/guardrails.md | 4 ++-- tests/docs/tracing.md | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/config.md b/docs/config.md index 198d7b7e..c09f8a8f 100644 --- a/docs/config.md +++ b/docs/config.md @@ -10,7 +10,7 @@ from agents import set_default_openai_key set_default_openai_key("sk-...") ``` -Alternatively, you can also configure an OpenAI client to be used. By default, the SDK creates an `AsyncOpenAI` instance, using the API key from the environment variable or the default key set above. You can chnage this by using the [set_default_openai_client()][agents.set_default_openai_client] function. +Alternatively, you can also configure an OpenAI client to be used. By default, the SDK creates an `AsyncOpenAI` instance, using the API key from the environment variable or the default key set above. You can change this by using the [set_default_openai_client()][agents.set_default_openai_client] function. ```python from openai import AsyncOpenAI diff --git a/docs/guardrails.md b/docs/guardrails.md index 2b7369c3..caf32775 100644 --- a/docs/guardrails.md +++ b/docs/guardrails.md @@ -21,7 +21,7 @@ Input guardrails run in 3 steps: ## Output guardrails -Output guardrailas run in 3 steps: +Output guardrails run in 3 steps: 1. First, the guardrail receives the same input passed to the agent. 2. Next, the guardrail function runs to produce a [`GuardrailFunctionOutput`][agents.guardrail.GuardrailFunctionOutput], which is then wrapped in an [`OutputGuardrailResult`][agents.guardrail.OutputGuardrailResult] @@ -33,7 +33,7 @@ Output guardrailas run in 3 steps: ## Tripwires -If the input or output fails the guardrail, the Guardrail can signal this with a tripwire. As soon as we see a guardail that has triggered the tripwires, we immediately raise a `{Input,Output}GuardrailTripwireTriggered` exception and halt the Agent execution. +If the input or output fails the guardrail, the Guardrail can signal this with a tripwire. As soon as we see a guardrail that has triggered the tripwires, we immediately raise a `{Input,Output}GuardrailTripwireTriggered` exception and halt the Agent execution. ## Implementing a guardrail diff --git a/docs/tracing.md b/docs/tracing.md index fbf2ae41..da0d536f 100644 --- a/docs/tracing.md +++ b/docs/tracing.md @@ -16,7 +16,7 @@ The Agents SDK includes built-in tracing, collecting a comprehensive record of e - `trace_id`: A unique ID for the trace. Automatically generated if you don't pass one. Must have the format `trace_<32_alphanumeric>`. - `group_id`: Optional group ID, to link multiple traces from the same conversation. For example, you might use a chat thread ID. - `disabled`: If True, the trace will not be recorded. - - `metadata`: Optiona metadata for the trace. + - `metadata`: Optional metadata for the trace. - **Spans** represent operations that have a start and end time. Spans have: - `started_at` and `ended_at` timestamps. - `trace_id`, to represent the trace they belong to diff --git a/src/agents/_run_impl.py b/src/agents/_run_impl.py index 112819c8..6c8922bc 100644 --- a/src/agents/_run_impl.py +++ b/src/agents/_run_impl.py @@ -167,7 +167,7 @@ async def execute_tools_and_side_effects( agent: Agent[TContext], # The original input to the Runner original_input: str | list[TResponseInputItem], - # Eveything generated by Runner since the original input, but before the current step + # Everything generated by Runner since the original input, but before the current step pre_step_items: list[RunItem], new_response: ModelResponse, processed_response: ProcessedResponse, diff --git a/tests/docs/config.md b/tests/docs/config.md index 198d7b7e..c09f8a8f 100644 --- a/tests/docs/config.md +++ b/tests/docs/config.md @@ -10,7 +10,7 @@ from agents import set_default_openai_key set_default_openai_key("sk-...") ``` -Alternatively, you can also configure an OpenAI client to be used. By default, the SDK creates an `AsyncOpenAI` instance, using the API key from the environment variable or the default key set above. You can chnage this by using the [set_default_openai_client()][agents.set_default_openai_client] function. +Alternatively, you can also configure an OpenAI client to be used. By default, the SDK creates an `AsyncOpenAI` instance, using the API key from the environment variable or the default key set above. You can change this by using the [set_default_openai_client()][agents.set_default_openai_client] function. ```python from openai import AsyncOpenAI diff --git a/tests/docs/guardrails.md b/tests/docs/guardrails.md index 2b7369c3..caf32775 100644 --- a/tests/docs/guardrails.md +++ b/tests/docs/guardrails.md @@ -21,7 +21,7 @@ Input guardrails run in 3 steps: ## Output guardrails -Output guardrailas run in 3 steps: +Output guardrails run in 3 steps: 1. First, the guardrail receives the same input passed to the agent. 2. Next, the guardrail function runs to produce a [`GuardrailFunctionOutput`][agents.guardrail.GuardrailFunctionOutput], which is then wrapped in an [`OutputGuardrailResult`][agents.guardrail.OutputGuardrailResult] @@ -33,7 +33,7 @@ Output guardrailas run in 3 steps: ## Tripwires -If the input or output fails the guardrail, the Guardrail can signal this with a tripwire. As soon as we see a guardail that has triggered the tripwires, we immediately raise a `{Input,Output}GuardrailTripwireTriggered` exception and halt the Agent execution. +If the input or output fails the guardrail, the Guardrail can signal this with a tripwire. As soon as we see a guardrail that has triggered the tripwires, we immediately raise a `{Input,Output}GuardrailTripwireTriggered` exception and halt the Agent execution. ## Implementing a guardrail diff --git a/tests/docs/tracing.md b/tests/docs/tracing.md index fbf2ae41..da0d536f 100644 --- a/tests/docs/tracing.md +++ b/tests/docs/tracing.md @@ -16,7 +16,7 @@ The Agents SDK includes built-in tracing, collecting a comprehensive record of e - `trace_id`: A unique ID for the trace. Automatically generated if you don't pass one. Must have the format `trace_<32_alphanumeric>`. - `group_id`: Optional group ID, to link multiple traces from the same conversation. For example, you might use a chat thread ID. - `disabled`: If True, the trace will not be recorded. - - `metadata`: Optiona metadata for the trace. + - `metadata`: Optional metadata for the trace. - **Spans** represent operations that have a start and end time. Spans have: - `started_at` and `ended_at` timestamps. - `trace_id`, to represent the trace they belong to