Loading...
Searching...
No Matches
OpenAiDataProvider::OpenAiThreadGetDataProvider Class Reference

The OpenAi data provider class. More...

`#include <OpenAiThreadGetDataProvider.qc.dox.h>`

Inheritance diagram for OpenAiDataProvider::OpenAiThreadGetDataProvider:
[legend]

## Public Member Functions

| constructor (*RestClient rest)
| Creates the object from the arguments.
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.
const | RequestType = OpenAiThreadIdRequestType
| Request type.
const | ResponseType = OpenAiThreadDataType
| Response type.
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

auto | doRequestImpl (auto req, *hash< auto > request_options)
| Makes a request and returns the response.
*DataProvider::AbstractDataProviderType | getRequestTypeImpl ()
| Returns the description of a successful request message, if any.
*DataProvider::AbstractDataProviderType | getResponseTypeImpl ()
| Returns the description of a response message, if this object represents a response message.
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

## doRequestImpl()

auto OpenAiDataProvider::OpenAiThreadGetDataProvider::doRequestImpl | ( | auto | req,
|  | *hash< auto > | request_options )

protected

Makes a request and returns the response.

Parameters

  req | the request to serialize and make according to the request type
  request_options | the request options; will be processed by validateRequestOptions()

Returns
  the response to the request

## getRequestTypeImpl()

*DataProvider::AbstractDataProviderType OpenAiDataProvider::OpenAiThreadGetDataProvider::getRequestTypeImpl | ( |  | ) |

protected

Returns the description of a successful request message, if any.

Returns
  the request type for this provider

## getResponseTypeImpl()

*DataProvider::AbstractDataProviderType OpenAiDataProvider::OpenAiThreadGetDataProvider::getResponseTypeImpl | ( |  | ) |

protected

Returns the description of a response message, if this object represents a response message.

Returns
  the response type for this response message