Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 586d4b2

Browse files
authored
docs: mention 'name' is required in Agent constructor . fix: mention 'name' as required in Agent init doc (openai#1033)
## What Updated the docs under `docs/agents.md` to clarify that the `name` argument is required when initializing an `Agent`. ## Why Without this clarification, users get a confusing error: `TypeError: Agent.__init__() missing 1 required positional argument: 'name'` This matches the actual constructor in the source code and helps future devs avoid frustration. ## Reference - Source: [`agent.py`](https://github.com/openai/openai-agents-python/blob/main/src/agents/agent.py)
1 parent 18cb55e commit 586d4b2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/agents.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Agents are the core building block in your apps. An agent is a large language mo
66

77
The most common properties of an agent you'll configure are:
88

9+
- `name`: A required string that identifies your agent.
910
- `instructions`: also known as a developer message or system prompt.
1011
- `model`: which LLM to use, and optional `model_settings` to configure model tuning parameters like temperature, top_p, etc.
1112
- `tools`: Tools that the agent can use to achieve its tasks.

0 commit comments

Comments
 (0)