Skip to main content

Module dynamic

Module dynamic 

Source
Expand description

Object-safe adapters (Dyn* traits) and reference types.

Every model trait uses impl Future return types and is therefore not object safe. For each trait this module provides a Dyn* counterpart that boxes the futures, a blanket implementation so that every concrete model is also a Dyn*, and a cloneable reference type (*Ref) wrapping Arc<dyn Dyn*>.

Only import a Dyn* trait where you hold a trait object; importing both LanguageModel and DynLanguageModel makes method calls on a concrete model ambiguous.

Structs§

ModelRef
A reference to a model: either a resolved instance or a provider:model id that the application layer resolves through its registry.
ServiceRef
A reference to a provider service (files, skills, batch, realtime factory): always resolved.

Traits§

DynBatch
Object-safe counterpart of Batch.
DynEmbeddingModel
Object-safe counterpart of EmbeddingModel.
DynFiles
Object-safe counterpart of Files.
DynImageModel
Object-safe counterpart of ImageModel.
DynLanguageModel
Object-safe counterpart of LanguageModel.
DynRealtimeFactory
Object-safe counterpart of RealtimeFactory.
DynRealtimeModel
Object-safe counterpart of RealtimeModel.
DynRerankingModel
Object-safe counterpart of RerankingModel.
DynSkills
Object-safe counterpart of Skills.
DynSpeechModel
Object-safe counterpart of SpeechModel.
DynSpeechTranslationModel
Object-safe counterpart of SpeechTranslationModel.
DynTranscriptionModel
Object-safe counterpart of TranscriptionModel.
DynVideoModel
Object-safe counterpart of VideoModel.

Type Aliases§

BatchRef
Shared reference to a batch service.
BoxFuture
A boxed, Send future.
BoxStream
A boxed, Send stream.
EmbeddingModelRef
Shared reference to an embedding model (or an unresolved model id).
FilesRef
Shared reference to a files service.
ImageModelRef
Shared reference to an image model (or an unresolved model id).
LanguageModelRef
Shared reference to a language model (or an unresolved model id).
RealtimeFactoryRef
Shared reference to a realtime factory.
RealtimeModelRef
Shared reference to a realtime model (or an unresolved model id).
RerankingModelRef
Shared reference to a reranking model (or an unresolved model id).
SkillsRef
Shared reference to a skills service.
SpeechModelRef
Shared reference to a speech model (or an unresolved model id).
SpeechTranslationModelRef
Shared reference to a speech translation model (or an unresolved model id).
TranscriptionModelRef
Shared reference to a transcription model (or an unresolved model id).
VideoModelRef
Shared reference to a video model (or an unresolved model id).