Qore OpenAiDataProvider Module Reference 1.3
Loading...
Searching...
No Matches
OpenAiDataProvider::OpenAiModelsDataProvider Class Reference

The OpenAi data provider class. More...

#include <OpenAiModelsDataProvider.qc.dox.h>

Inheritance diagram for OpenAiDataProvider::OpenAiModelsDataProvider:
[legend]

Public Member Functions

 constructor (*RestClient rest)
 Creates the object from the arguments.
 
 constructor (hash< auto > options)
 Creates the object from constructor options.
 
*list< hash< DataProviderSummaryInfo > > getChildProviderSummaryInfo ()
 Return data provider summary info.
 
string getName ()
 Returns the data provider name.
 
- Public Member Functions inherited from OpenAiDataProvider::OpenAiDataProviderCommon
 constructor (*hash< auto > options)
 Creates the object from constructor options.
 
 constructor (RestClient::RestClient rest)
 Creates the object.
 
*hash< string, bool > getSupportedReferenceData ()
 Returns information on supported reference data.
 
 setLogger (*LoggerInterface logger)
 Accepts a LoggerInterface object for logging (or clears it)
 

Public Attributes

const ProviderInfo = ...
 Provider info.
 
const ProviderSummaryInfo = ...
 Provider summary info.
 
- Public Attributes inherited from OpenAiDataProvider::OpenAiDataProviderCommon
const AssistantApiHdr = ...
 Headers required for the OpenAI assistant API.
 
const ConstructorOptions = ...
 Constructor options.
 
const DefaultOpenAiApiVersion = "v1"
 The default OpenAi API version.
 
const DefaultOpenAiUrl = "https://api.openai.com/"
 The default OpenAi URL.
 
const MaxIoRetries = 5
 Max retries.
 
const RetrySet = ...
 IO errors for REST retries.
 

Protected Member Functions

*AbstractDataProvider getChildProviderImpl (string name)
 Returns the given child provider or nothing if the given child is unknown.
 
*list< string > getChildProviderNamesImpl ()
 Returns a list of child data provider names, if any.
 
*list< hash< auto > > getModels ()
 Returns supported models.
 
hash< DataProviderInfo > getStaticInfoImpl ()
 Returns data provider static info.
 
- Protected Member Functions inherited from OpenAiDataProvider::OpenAiDataProviderCommon
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.
 
*list< hash< AllowedValueInfo > > getReferenceAssistants ()
 Returns available assistants.
 
*list< hash< AllowedValueInfo > > getReferenceDataImpl (string type, *hash< auto > action_opts)
 Returns reference data of the given kind if available.
 
*list< hash< AllowedValueInfo > > getReferenceModels ()
 Returns available models.
 
bool retry (hash< ExceptionInfo > ex, reference< int > retries)
 Returns True if the error indicates that the operation should be retried.
 

Additional Inherited Members

- Static Protected Member Functions inherited from OpenAiDataProvider::OpenAiDataProviderCommon
static Mutex m ()
 lock for first time initialization
 
- Protected Attributes inherited from OpenAiDataProvider::OpenAiDataProviderCommon
*RestClient::RestClient rest
 The REST client object for API calls.
 
- Static Protected Attributes inherited from OpenAiDataProvider::OpenAiDataProviderCommon
static bool init
 first time initialization
 

Detailed Description

The OpenAi data provider class.

Member Function Documentation

◆ getChildProviderImpl()

*AbstractDataProvider OpenAiDataProvider::OpenAiModelsDataProvider::getChildProviderImpl ( string name)
protected

Returns the given child provider or nothing if the given child is unknown.

Returns
the given child provider or nothing if the given child is unknown
See also
getChildProviderEx()

◆ getChildProviderNamesImpl()

*list< string > OpenAiDataProvider::OpenAiModelsDataProvider::getChildProviderNamesImpl ( )
protected

Returns a list of child data provider names, if any.

Returns
a list of child data provider names, if any