Skip to content

Releases: cognesy/instructor-php

0.0.7

07 Mar 23:10
Compare
Choose a tag to compare
0.0.7 Pre-release
Pre-release

Bug fix

0.0.6

07 Mar 22:03
Compare
Choose a tag to compare
0.0.6 Pre-release
Pre-release
  • Events allow better observability, will help with streaming support (still work in progress)
  • Hook points on Instructor class: onEvent(), wiretap()
  • onError() if defined allows to make final attempt to recover from error
  • More transparent component wiring via Configuration class
  • New examples (see: examples/Wiretap/run.php on how to observe execution steps)

0.0.5

04 Mar 22:34
Compare
Choose a tag to compare
0.0.5 Pre-release
Pre-release
  • Improved processing - processed classes and properties are cached.
  • Changes in the model processing engine to allow more flexible inputs.
  • Fixes in examples.
  • Bug fixes.
  • Code cleanup.

0.0.4

04 Mar 00:28
Compare
Choose a tag to compare
0.0.4 Pre-release
Pre-release
  • Easy way to get scalar value responses.
  • Better JSONSchema support - can render references (turned off by default).
  • New, more flexible processing architecture:
    • Custom validators for data models implementing CanSelfValidate contract.
    • Return custom JSONSchema by implementing CanProvideSchema contract.
    • Take full control over deserialization by implementing CanDeserializeJson contract.
    • Return custom values by implementing CanTransformResponse contract.

Documentation, examples and ValidationMixin

29 Feb 16:33
Compare
Choose a tag to compare
  • Documentation (mkdocs)
  • Example code (see /examples) - can by run from CLI
  • ValidationMixin - makes it easy to add custom validation to data models

0.0.2

27 Feb 14:36
Compare
Choose a tag to compare
0.0.2 Pre-release
Pre-release
  • Fixes in README
  • Renamed Instructor::extract() to respond()

0.0.1

27 Feb 13:46
f73fe7c
Compare
Choose a tag to compare
0.0.1 Pre-release
Pre-release
  • LLM response deserialization to predefined data model as PHP object (via OpenAI function calling)
  • Validation of responses using Symfony Validator
  • Optional automatic retries in case of validation errors