TsgcHTTP_API_OpenAIMethods › RetrieveAssistant

RetrieveAssistant Method

Retrieves the full definition of an Assistant by its identifier

Syntax

function RetrieveAssistant(const aAssistantId: string) : TsgcOpenAIClass_Assistant;

Parameters

NameTypeDescription
aAssistantIdconst stringThe identifier of the Assistant to retrieve (e.g. asst_abc123).

Return Value

The Assistant object with its current model, tools, instructions and metadata (TsgcOpenAIClass_Assistant)

Remarks

Calls GET /v1/assistants/{assistant_id} and returns the current state of the Assistant. Useful to inspect the model, instructions, tools and tool resources that a previously-created Assistant is using.

Example

var oAssistant: TsgcOpenAIClass_Assistant;
begin
  oAssistant := oAPI.RetrieveAssistant('asst_abc123');
  ShowMessage(oAssistant.Name + ' / ' + oAssistant.Model);
end;

Back to Methods