Skip to content

steps

Classes:

Name Description
AsyncSteps
AsyncStepsWithRawResponse
AsyncStepsWithStreamingResponse
Steps
StepsWithRawResponse
StepsWithStreamingResponse

AsyncSteps

AsyncSteps(client: AsyncOpenAI)

Methods:

Name Description
list

Returns a list of run steps belonging to a run.

retrieve

Retrieves a run step.

with_raw_response
with_streaming_response

list

list(
    run_id: str,
    *,
    thread_id: str,
    after: str | NotGiven = NOT_GIVEN,
    before: str | NotGiven = NOT_GIVEN,
    limit: int | NotGiven = NOT_GIVEN,
    order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
    extra_headers: Headers | None = None,
    extra_query: Query | None = None,
    extra_body: Body | None = None,
    timeout: float | Timeout | None | NotGiven = NOT_GIVEN
) -> AsyncPaginator[RunStep, AsyncCursorPage[RunStep]]

Returns a list of run steps belonging to a run.

Parameters:

Name Type Description Default
after str | NotGiven

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

NOT_GIVEN
before str | NotGiven

A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

NOT_GIVEN
limit int | NotGiven

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

NOT_GIVEN
order Literal['asc', 'desc'] | NotGiven

Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

NOT_GIVEN
extra_headers Headers | None

Send extra headers

None
extra_query Query | None

Add additional query parameters to the request

None
extra_body Body | None

Add additional JSON properties to the request

None
timeout float | Timeout | None | NotGiven

Override the client-level default timeout for this request, in seconds

NOT_GIVEN

retrieve async

retrieve(
    step_id: str,
    *,
    thread_id: str,
    run_id: str,
    extra_headers: Headers | None = None,
    extra_query: Query | None = None,
    extra_body: Body | None = None,
    timeout: float | Timeout | None | NotGiven = NOT_GIVEN
) -> RunStep

Retrieves a run step.

Parameters:

Name Type Description Default
extra_headers Headers | None

Send extra headers

None
extra_query Query | None

Add additional query parameters to the request

None
extra_body Body | None

Add additional JSON properties to the request

None
timeout float | Timeout | None | NotGiven

Override the client-level default timeout for this request, in seconds

NOT_GIVEN

with_raw_response

with_raw_response() -> AsyncStepsWithRawResponse

with_streaming_response

with_streaming_response() -> (
    AsyncStepsWithStreamingResponse
)

AsyncStepsWithRawResponse

AsyncStepsWithRawResponse(steps: AsyncSteps)

Attributes:

Name Type Description
list
retrieve

list instance-attribute

list = async_to_raw_response_wrapper(list)

retrieve instance-attribute

retrieve = async_to_raw_response_wrapper(retrieve)

AsyncStepsWithStreamingResponse

AsyncStepsWithStreamingResponse(steps: AsyncSteps)

Attributes:

Name Type Description
list
retrieve

list instance-attribute

list = async_to_streamed_response_wrapper(list)

retrieve instance-attribute

retrieve = async_to_streamed_response_wrapper(retrieve)

Steps

Steps(client: OpenAI)

Methods:

Name Description
list

Returns a list of run steps belonging to a run.

retrieve

Retrieves a run step.

with_raw_response
with_streaming_response

list

list(
    run_id: str,
    *,
    thread_id: str,
    after: str | NotGiven = NOT_GIVEN,
    before: str | NotGiven = NOT_GIVEN,
    limit: int | NotGiven = NOT_GIVEN,
    order: Literal["asc", "desc"] | NotGiven = NOT_GIVEN,
    extra_headers: Headers | None = None,
    extra_query: Query | None = None,
    extra_body: Body | None = None,
    timeout: float | Timeout | None | NotGiven = NOT_GIVEN
) -> SyncCursorPage[RunStep]

Returns a list of run steps belonging to a run.

Parameters:

Name Type Description Default
after str | NotGiven

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

NOT_GIVEN
before str | NotGiven

A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

NOT_GIVEN
limit int | NotGiven

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

NOT_GIVEN
order Literal['asc', 'desc'] | NotGiven

Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

NOT_GIVEN
extra_headers Headers | None

Send extra headers

None
extra_query Query | None

Add additional query parameters to the request

None
extra_body Body | None

Add additional JSON properties to the request

None
timeout float | Timeout | None | NotGiven

Override the client-level default timeout for this request, in seconds

NOT_GIVEN

retrieve

retrieve(
    step_id: str,
    *,
    thread_id: str,
    run_id: str,
    extra_headers: Headers | None = None,
    extra_query: Query | None = None,
    extra_body: Body | None = None,
    timeout: float | Timeout | None | NotGiven = NOT_GIVEN
) -> RunStep

Retrieves a run step.

Parameters:

Name Type Description Default
extra_headers Headers | None

Send extra headers

None
extra_query Query | None

Add additional query parameters to the request

None
extra_body Body | None

Add additional JSON properties to the request

None
timeout float | Timeout | None | NotGiven

Override the client-level default timeout for this request, in seconds

NOT_GIVEN

with_raw_response

with_raw_response() -> StepsWithRawResponse

with_streaming_response

with_streaming_response() -> StepsWithStreamingResponse

StepsWithRawResponse

StepsWithRawResponse(steps: Steps)

Attributes:

Name Type Description
list
retrieve

list instance-attribute

list = to_raw_response_wrapper(list)

retrieve instance-attribute

retrieve = to_raw_response_wrapper(retrieve)

StepsWithStreamingResponse

StepsWithStreamingResponse(steps: Steps)

Attributes:

Name Type Description
list
retrieve

list instance-attribute

list = to_streamed_response_wrapper(list)

retrieve instance-attribute

retrieve = to_streamed_response_wrapper(retrieve)