Documentation
¶
Overview ¶
Package model composes a typed coding configuration and credential store into an existing provider-neutral language model.
Index ¶
Constants ¶
const RetryWindow = 20 * time.Minute
RetryWindow bounds the wall clock one model request may spend replaying, and through the Coding recovery option it bounds one turn's re-issue episode too. It is two of the transport's stream idle windows (ten minutes by default), matching the reference implementation's max(600s, 2×idle): without it a provider that has gone silent can spend a full idle window on every attempt, so the attempt budget alone would let one request hold a turn for nearly two hours before failing. A provider whose idle bound is raised needs this raised with it.
Variables ¶
var ErrInvalid = errors.New("coding model: invalid configuration")
ErrInvalid means the resolved model or credential store is invalid.
Functions ¶
func New ¶
func New( ctx context.Context, resolved modelcatalog.ResolvedModel, store credential.Store, ) (ai.LanguageModel, error)
New constructs a native or compatible provider adapter from one complete immutable resolved snapshot.
Types ¶
This section is empty.