Skip to content

Commit c583dfc

Browse files
authored
docs: add docstring for parameter session in run, run_sync and run_streamed functions (#1739)
1 parent efa88f7 commit c583dfc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/agents/run.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ async def run(
272272
We recommend only using this if you are exclusively using OpenAI models;
273273
other model providers don't write to the Conversation object,
274274
so you'll end up having partial conversations stored.
275+
session: A session for automatic conversation history management.
275276
Returns:
276277
A run result containing all the inputs, guardrail results and the output of the last
277278
agent. Agents may perform handoffs, so we don't know the specific type of the output.
@@ -329,6 +330,7 @@ def run_sync(
329330
previous_response_id: The ID of the previous response, if using OpenAI models via the
330331
Responses API, this allows you to skip passing in input from the previous turn.
331332
conversation_id: The ID of the stored conversation, if any.
333+
session: A session for automatic conversation history management.
332334
Returns:
333335
A run result containing all the inputs, guardrail results and the output of the last
334336
agent. Agents may perform handoffs, so we don't know the specific type of the output.
@@ -383,6 +385,7 @@ def run_streamed(
383385
previous_response_id: The ID of the previous response, if using OpenAI models via the
384386
Responses API, this allows you to skip passing in input from the previous turn.
385387
conversation_id: The ID of the stored conversation, if any.
388+
session: A session for automatic conversation history management.
386389
Returns:
387390
A result object that contains data about the run, as well as a method to stream events.
388391
"""

0 commit comments

Comments
 (0)