TsgcHTTP_API_OpenAI › Methods › RetrieveAssistant
Retrieves the full definition of an Assistant by its identifier
function RetrieveAssistant(const aAssistantId: string) : TsgcOpenAIClass_Assistant;
| Name | Type | Description |
|---|---|---|
aAssistantId | const string | The identifier of the Assistant to retrieve (e.g. asst_abc123). |
The Assistant object with its current model, tools, instructions and metadata (TsgcOpenAIClass_Assistant)
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.
var oAssistant: TsgcOpenAIClass_Assistant;
begin
oAssistant := oAPI.RetrieveAssistant('asst_abc123');
ShowMessage(oAssistant.Name + ' / ' + oAssistant.Model);
end;