54 *RestClient::RestClient
rest;
112 hash<auto>
doRestCommand(
string method,
string path,
auto body, *hash<auto> hdr, *reference<hash<auto>> info);
118 bool retry(hash<ExceptionInfo> ex, reference<int> retries);
The OpenAi data provider common base class.
Definition OpenAiDataProviderCommon.qc.dox.h:28
const AssistantApiHdr
Headers required for the OpenAI assistant API.
Definition OpenAiDataProviderCommon.qc.dox.h:49
static bool init
first time initialization
Definition OpenAiDataProviderCommon.qc.dox.h:57
*RestClient::RestClient rest
The REST client object for API calls.
Definition OpenAiDataProviderCommon.qc.dox.h:54
const RetrySet
IO errors for REST retries.
Definition OpenAiDataProviderCommon.qc.dox.h:42
hash< auto > doRestCommand(string method, string path, auto body, *hash< auto > hdr, *reference< hash< auto > > info)
Makes a REST call and returns the response; handles rate limit responses.
const MaxIoRetries
Max retries.
Definition OpenAiDataProviderCommon.qc.dox.h:46
constructor(*hash< auto > options)
Creates the object from constructor options.
const DefaultOpenAiUrl
The default OpenAi URL.
Definition OpenAiDataProviderCommon.qc.dox.h:32
constructor(RestClient::RestClient rest)
Creates the object.
*list< hash< AllowedValueInfo > > getReferenceModels()
Returns available models.
*list< hash< AllowedValueInfo > > getReferenceDataImpl(string type, *hash< auto > action_opts)
Returns reference data of the given kind if available.
setLogger(*LoggerInterface logger)
Accepts a LoggerInterface object for logging (or clears it)
const DefaultOpenAiApiVersion
The default OpenAi API version.
Definition OpenAiDataProviderCommon.qc.dox.h:35
const ConstructorOptions
Constructor options.
Definition OpenAiDataProviderCommon.qc.dox.h:38
*hash< string, bool > getSupportedReferenceData()
Returns information on supported reference data.
*list< hash< AllowedValueInfo > > getReferenceAssistants()
Returns available assistants.
bool retry(hash< ExceptionInfo > ex, reference< int > retries)
Returns True if the error indicates that the operation should be retried.
static Mutex m()
lock for first time initialization
Qore OpenAiDataProvider module definition.
Definition OpenAiAssistantCreateDataProvider.qc.dox.h:26