12 Commits

Author SHA1 Message Date
Kazuhiro Sera f5d20e5e2f docs: improve translation source clarity (#4306) 2026-08-08 22:44:19 +09:00
Kazuhiro Sera ac1206294c docs: updates for 0.19.0 (#3872) 2026-07-28 07:51:20 +09:00
Kazuhiro Sera 2fa463571e docs: fix runnable Python examples (#3885) 2026-07-20 08:48:24 +09:00
HuxleyHu98 bd871cddb2 docs: clarify ToolContext availability in function-tool lifecycle hooks (#2687) 2026-04-16 02:55:53 +09:00
Kazuhiro Sera 1215783363 docs: add tool search coverage across Python guides (#2622) 2026-03-09 13:39:30 +09:00
Kazuhiro Sera d6f950d086 docs: clarify agent runtime, handoff, HITL, and results flows (#2596) 2026-03-04 18:11:23 +09:00
Kazuhiro Sera 5959177950 docs: fix #2335 context page error 2026-01-20 11:20:07 +09:00
Muhammad Saqib 1f705d5efd docs: add ToolContext section for advanced tool metadata (#1868) 2025-10-14 11:31:36 +09:00
Abbas Asad 653abc5f59 Fix #892 by adding proper tool description in context.md (#937)
### Summary

This pull request fixes [issue
#892](https://github.com/openai/openai-agents-python/issues/892) by
adding a missing docstring to the `fetch_user_age` tool function in
`docs/context.md`.

### Problem

Many non-OpenAI LLMs (such as Claude, Gemini, Mistral, etc.) are unable
to use the `fetch_user_age` function because it lacks a docstring. As a
result, they return responses like:

> "I cannot determine the user's age because the available tools lack
the ability to fetch user-specific information."

### Changes Made

- Added a one-line docstring to the `fetch_user_age` function
- Improved return statement to match expected tool output

```python
@function_tool
async def fetch_user_age(wrapper: RunContextWrapper[UserInfo]) -> str:
    """Fetch the age of the user. Call this function to get user's age information."""
    return f"The user {wrapper.context.name} is 47 years old"
2025-06-26 08:40:22 +09:00
Han Hwang Lim d56047be51 fix annotation numbering in context management
Fix inconsistent numbering between code and explanatory annotations in
the context management documentation.
2025-03-21 21:10:30 +00:00
jhills20 a373162bb0 use @function_tool decorator in docs 2025-03-12 11:15:42 -07:00
Rohan Mehta aaec57a426 Initial commit 2025-03-11 09:42:28 -07:00