TsgcHTTP_API_OpenAIMethods › RetrieveRunSteps

RetrieveRunSteps Method

Retrieves a single Run step by its identifier

Syntax

function RetrieveRunSteps(const aThreadId, aRunId, aStepId: string) : TsgcOpenAIClass_RunSteps;

Parameters

NameTypeDescription
aThreadIdconst stringThe identifier of the Thread that owns the Run.
aRunIdconst stringThe identifier of the Run that contains the step.
aStepIdconst stringThe identifier of the Run step to retrieve (e.g. step_abc123).

Return Value

The Run step object describing the action (message creation or tool call) that took place (TsgcOpenAIClass_RunSteps)

Remarks

Calls GET /v1/threads/{thread_id}/runs/{run_id}/steps/{step_id} and returns the detailed StepDetails for a single step. Combine it with ListRunSteps when you need extended information about a specific action.

Example

var oStep: TsgcOpenAIClass_RunSteps;
begin
  oStep := oAPI.RetrieveRunSteps('thread_abc123', 'run_abc123', 'step_abc123');
  ShowMessage(oStep.StepType + ' / ' + oStep.Status);
end;

Back to Methods