Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in event names and comments across multiple files #155

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion examples/research_bot/agents/search_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
INSTRUCTIONS = (
"You are a research assistant. Given a search term, you search the web for that term and"
"produce a concise summary of the results. The summary must 2-3 paragraphs and less than 300"
"words. Capture the main points. Write succintly, no need to have complete sentences or good"
"words. Capture the main points. Write succinctly, no need to have complete sentences or good"
"grammar. This will be consumed by someone synthesizing a report, so its vital you capture the"
"essence and ignore any fluff. Do not include any additional commentary other than the summary"
"itself."
Expand Down
2 changes: 1 addition & 1 deletion src/agents/_run_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ def stream_step_result_to_queue(
elif isinstance(item, HandoffCallItem):
event = RunItemStreamEvent(item=item, name="handoff_requested")
elif isinstance(item, HandoffOutputItem):
event = RunItemStreamEvent(item=item, name="handoff_occured")
event = RunItemStreamEvent(item=item, name="handoff_occurred")
elif isinstance(item, ToolCallItem):
event = RunItemStreamEvent(item=item, name="tool_called")
elif isinstance(item, ToolCallOutputItem):
Expand Down
2 changes: 1 addition & 1 deletion src/agents/function_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def _detect_docstring_style(doc: str) -> DocstringStyle:

@contextlib.contextmanager
def _suppress_griffe_logging():
# Supresses warnings about missing annotations for params
# Suppresses warnings about missing annotations for params
logger = logging.getLogger("griffe")
previous_level = logger.getEffectiveLevel()
logger.setLevel(logging.ERROR)
Expand Down
2 changes: 1 addition & 1 deletion src/agents/models/openai_chatcompletions.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ def extract_all_content(
elif isinstance(c, dict) and c.get("type") == "input_file":
raise UserError(f"File uploads are not supported for chat completions {c}")
else:
raise UserError(f"Unknonw content: {c}")
raise UserError(f"Unknown content: {c}")
return out

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion src/agents/stream_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class RunItemStreamEvent:
name: Literal[
"message_output_created",
"handoff_requested",
"handoff_occured",
"handoff_occurred",
Copy link
Collaborator

Choose a reason for hiding this comment

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

unfortunately this would be a breaking change, since people may have written code that discriminates on the name. Maybe revert this and add a comment saying it's misspelled but we can't change it?

"tool_called",
"tool_output",
"reasoning_item_created",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_agent_runner_streamed.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ async def test_streaming_events():
total_expected_item_count = sum(expected_item_type_map.values())

assert event_counts["run_item_stream_event"] == total_expected_item_count, (
f"Expectd {total_expected_item_count} events, got {event_counts['run_item_stream_event']}"
f"Expected {total_expected_item_count} events, got {event_counts['run_item_stream_event']}"
f"Expected events were: {expected_item_type_map}, got {event_counts}"
)

Expand Down