Skip to content

refactor: Major Library Refactoring #326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2025
Merged

Conversation

chr-hertel
Copy link
Member

@chr-hertel chr-hertel commented May 29, 2025

  • Introducing global model class to be more agnostic with explicit Capability class
  • Introducing Contract with Normalizers to solve Base Contract (OpenAI) vs. Model/Platform specific differences
  • Reshape into three major components Chain, Platform and Store
  • Adoption of Symfony-style for CS Fixer and Interface & Exception suffix

Replaces #301 and #305

Breaking Changes

  • Sorting into three main sub compontents Platform, Chain and Store
    • High level implementation also went into those components, see ChainInterface as example
    • Model namespace went into Platform
    • Bridges got sorted into Platform or Store
    • Tool metadata moved from Chain to Platform\Contract
  • Implementation of JsonSerializable was dropped in favor of Symfony's serializer/normalizer
  • Removal of LanguageModel and EmbeddingsModel interface in favor of base Model and Capabilities
  • Renaming of StructuredResponse to ObjectResponse
  • Slimming down the supports() method of ModelClient and ResponseConverter
  • Changing signature of ModelClient to already accepting the normalized request payload
  • Renaming interfaces to always contain the Interface suffix
  • Renaming exceptions to always contain the Exception suffix

@chr-hertel chr-hertel force-pushed the refactoring-restructure branch 8 times, most recently from 07f90c6 to aeaf22b Compare June 1, 2025 12:53
@chr-hertel chr-hertel force-pushed the refactoring-restructure branch from aeaf22b to 78f5894 Compare June 1, 2025 12:54
@chr-hertel chr-hertel marked this pull request as ready for review June 1, 2025 12:56
@chr-hertel chr-hertel merged commit 5a64eaa into main Jun 1, 2025
7 checks passed
@chr-hertel chr-hertel deleted the refactoring-restructure branch June 1, 2025 12:57
chr-hertel added a commit that referenced this pull request Jun 1, 2025
- [x] Introducing global model class to be more agnostic with explicit
`Capability` class
- [x] Introducing Contract with Normalizers to solve Base Contract
(OpenAI) vs. Model/Platform specific differences
- [x] Reshape into three major components `Chain`, `Platform` and
`Store`
- [x] Adoption of Symfony-style for CS Fixer and `Interface` &
`Exception` suffix

Replaces #301 and #305

* Sorting into three main sub compontents `Platform`, `Chain` and
`Store`
* High level implementation also went into those components, see
`ChainInterface` as example
  * `Model` namespace went into `Platform`
  * Bridges got sorted into `Platform` or `Store`
  * Tool metadata moved from `Chain` to `Platform\Contract`
* Implementation of `JsonSerializable` was dropped in favor of Symfony's
serializer/normalizer
* Removal of `LanguageModel` and `EmbeddingsModel` interface in favor of
base `Model` and `Capabilities`
* Renaming of `StructuredResponse` to `ObjectResponse`
* Slimming down the `supports()` method of `ModelClient` and
`ResponseConverter`
* Changing signature of `ModelClient` to already accepting the
normalized request payload
* Renaming interfaces to always contain the `Interface` suffix
* Renaming exceptions to always contain the `Exception` suffix
@chr-hertel chr-hertel added the BC BREAK Backwards compatibility break label Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC BREAK Backwards compatibility break refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants