Skip to content

refactor: switch from JsonSerializable to normalizer #301

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from

Conversation

chr-hertel
Copy link
Member

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

`8.`888b                 ,8'  8 8888 8 888888888o   
 `8.`888b               ,8'   8 8888 8 8888    `88. 
  `8.`888b             ,8'    8 8888 8 8888     `88 
   `8.`888b     .b    ,8'     8 8888 8 8888     ,88 
    `8.`888b    88b  ,8'      8 8888 8 8888.   ,88' 
     `8.`888b .`888b,8'       8 8888 8 888888888P'  
      `8.`888b8.`8888'        8 8888 8 8888         
       `8.`888`8.`88'         8 8888 8 8888         
        `8.`8' `8,`'          8 8888 8 8888         
         `8.`   `8'           8 8888 8 8888         

Trying to address pain of #291 and #297

  • fix bedrock examples ...

@chr-hertel chr-hertel force-pushed the refactor-contract-handling branch from 591474f to c6ba1ce Compare May 4, 2025 22:27
@chr-hertel chr-hertel force-pushed the refactor-contract-handling branch from c6ba1ce to 4406c4f Compare May 18, 2025 14:43
@chr-hertel chr-hertel mentioned this pull request May 18, 2025
5 tasks
@chr-hertel chr-hertel force-pushed the refactor-contract-handling branch from 4406c4f to d090593 Compare May 18, 2025 15:46
@chr-hertel chr-hertel changed the base branch from main to refactor-capabilities May 18, 2025 15:47
@chr-hertel chr-hertel added BC BREAK Backwards compatibility break refactor labels May 18, 2025
@chr-hertel chr-hertel force-pushed the refactor-contract-handling branch from d090593 to 2b5477b Compare May 18, 2025 21:30
@chr-hertel chr-hertel changed the title refactor: add extension point to payload contract handling refactor: switch from JsonSerializable to normalizer May 18, 2025
@OskarStark OskarStark changed the title refactor: switch from JsonSerializable to normalizer refactor: switch from JsonSerializable to normalizer May 19, 2025
@chr-hertel chr-hertel force-pushed the refactor-capabilities branch 4 times, most recently from 4c2fa37 to 964e4a8 Compare May 26, 2025 21:33
@chr-hertel chr-hertel force-pushed the refactor-contract-handling branch from 2b5477b to 10ec3ff Compare May 26, 2025 21:40
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be ToolCallNormalizer?

@chr-hertel chr-hertel force-pushed the refactor-contract-handling branch from 10ec3ff to 1541b6b Compare May 26, 2025 21:44
@chr-hertel chr-hertel force-pushed the refactor-capabilities branch from 964e4a8 to e7a5702 Compare May 29, 2025 13:43
@chr-hertel chr-hertel force-pushed the refactor-contract-handling branch from 1541b6b to 2b557f8 Compare May 29, 2025 13:44
@chr-hertel
Copy link
Member Author

closed in favor of #326

@chr-hertel chr-hertel closed this May 29, 2025
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 

# 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 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
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
BC BREAK Backwards compatibility break refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants