Documentation Index
Fetch the complete documentation index at: https://docs.instructorphp.com/llms.txt
Use this file to discover all available pages before exploring further.
1.9.0 Summary
- Unified execution model across Instructor and Polyglot
- Streaming and usage accounting made consistent and test‑covered
- Cleaner APIs and collections, clearer events
Instructor
- Execution/Attempts:
StructuredOutputExecution+StructuredOutputAttempttrack full lifecycle (final + partials, errors). - Streaming: sequence updates yield immutable snapshots; final event payload standardized to
value(+cached). - Usage: execution = finalized attempts + current partial tokens (until finalization). Attempt list usage counts only finalized.
- API cleanup: removed unused
$messagesfromwithCurrentAttempt/withFailedAttempt/withSuccessfulAttempt(retries come from execution history). - Collections:
StructuredOutputAttemptList::ofvariadic fix;fromArraysupports wrapped and flat input.
Polyglot
- Execution/Attempts:
InferenceExecution+InferenceAttemptwith immutable transitions and full state. - Usage: attempt usage = finalized response + partial tokens; AttemptList = only finalized; Execution = finalized + current partials.
- Collections: variadic fixes (
InferenceAttemptList,InferenceResponseList);fromArrayusesArrayList::fromArray. - Correctness:
InferenceAttempt::hasErrors/isFailedsafety.
Embeddings
- Facade: declared resolver property; removed unused field; avoid duplicate “requested” event (driver emits once).
- Shortcuts:
first()returns?Vector. Cosine similarity guarded for zero vectors.
Breaking Changes
- Instructor
StructuredOutputExecution: removed$messagesparams from attempt helpers. - Instructor
RequestHandler:responseFor→executionResultFor;streamResponseFor→streamUpdatesFor. - Usage semantics tightened to avoid double counting (see above).
- Polyglot driver/collection variadic behavior corrected.