ResourceBase class abstract
Base class for all API resources.
Provides shared infrastructure (config, HTTP client, interceptors, request builder) to all resource implementations. Resources delegate actual HTTP execution to the interceptor chain to maintain consistent auth, retry, logging, and error handling behavior.
- Implementers
- AssistantsResource
- AudioResource
- BatchesResource
- BetaResource
- ChatCompletionsResource
- ChatkitResource
- ChatkitSessionsResource
- ChatkitThreadItemsResource
- ChatkitThreadsResource
- ChatResource
- CompletionsResource
- ContainerFilesResource
- ContainersResource
- ConversationItemsResource
- ConversationsResource
- EmbeddingsResource
- EvalOutputItemsResource
- EvalRunsResource
- EvalsResource
- FilesResource
- FineTuningJobsResource
- FineTuningResource
- ImagesResource
- InputTokensResource
- MessagesResource
- ModelsResource
- ModerationsResource
- RealtimeCallsResource
- RealtimeResource
- RealtimeSessionsResource
- RealtimeTranslationsResource
- ResponseInputItemsResource
- ResponsesResource
- RunsResource
- SkillsResource
- SkillVersionsResource
- SpeechResource
- StreamingResource
- ThreadsResource
- TranscriptionsResource
- TranslationsResource
- UploadsResource
- VectorStoreFilesResource
- VectorStoresResource
- VideosResource
Constructors
- ResourceBase({required OpenAIConfig config, required Client httpClient, required InterceptorChain interceptorChain, required RequestBuilder requestBuilder, void ensureNotClosed()?, Client streamClientFactory()?})
- Creates a ResourceBase.
Properties
- config → OpenAIConfig
-
Client configuration.
final
- ensureNotClosed → void Function()?
-
Callback to check if the client has been closed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClient → Client
-
HTTP client for making requests.
final
- interceptorChain → InterceptorChain
-
Interceptor chain for request/response processing.
final
- requestBuilder → RequestBuilder
-
Request builder for constructing HTTP requests.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- streamClientFactory → Client Function()?
-
Factory for creating dedicated HTTP clients for streaming requests.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited