Skip to content

Normalize system role

Marcus Johansson requested to merge normalize-system-role into 1.0.x

This merge request will:

  1. Add normalization of the system role, using setChatSystemRole instead of doing it as a message since it might be frail. This however does not remove that possibility, so third party modules will still work. Its also in the provider base class, so no breaking changes, even though its good for providers to implement the system role.
  2. I have added so the reflection proxy only triggers logging, events etc. on the method name that is the same as the interface name - so if the operation type interface is called ChatInterface, only the method chat will be invoked, any other method like setChatSystemRole will not behave like an AI call.
  3. I have added modelSupportsCapabilities, so you can test one specific operation type and model combination against an array of capabilities.
  4. I have added a model capability called ChatSystemRole that a model can define if it allows system roles.
  5. I have fixed all the providers to the new structure.
  6. I have fixed the Chat API Explorer to follow these new rules.

Merge request reports