Skip to content

refactor: create a new basemodel class to use with chat and text

Bruno Cardoso requested to merge bc/refactor-base-model into main

What does this merge request do and why?

Although the diff looks big, the changes were conceptually small:

  • create a new ModelBase class to unify duplicated definitions from TextGenBaseModel and ChatModelBase. ModelBase is named as such to not conflict with pydantic.BaseModel
  • rename TextGenBaseModel to TextGenModelBase to follow the convention of ChatModelBase and the newly added ModelBase.
  • organize base.py by moving text specific classes into base_text.py
base.py
base_text.py
base_chat.py

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request checklist

  • Tests added for new functionality. If not, please raise an issue to follow up.
  • Documentation added/updated, if needed.
Edited by Bruno Cardoso

Merge request reports