TsgcHTTP_API_OpenAI › Methods › RetrieveRunSteps
Retrieves a single Run step by its identifier
function RetrieveRunSteps(const aThreadId, aRunId, aStepId: string) : TsgcOpenAIClass_RunSteps;
| Name | Type | Description |
|---|---|---|
aThreadId | const string | The identifier of the Thread that owns the Run. |
aRunId | const string | The identifier of the Run that contains the step. |
aStepId | const string | The identifier of the Run step to retrieve (e.g. step_abc123). |
The Run step object describing the action (message creation or tool call) that took place (TsgcOpenAIClass_RunSteps)
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.
var oStep: TsgcOpenAIClass_RunSteps;
begin
oStep := oAPI.RetrieveRunSteps('thread_abc123', 'run_abc123', 'step_abc123');
ShowMessage(oStep.StepType + ' / ' + oStep.Status);
end;