AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

fix(agent, forge): Silence Pydantic v2 protected namespace `model_` warning

Open kcze opened this issue 7 months ago • 3 comments

Background

After updating to Pydantic v2 Pydantic complains about model fields with model_ prefix as it's a Pydantic protected namespace:

UserWarning: Field "model_info" has conflict with protected namespace "model_".

To silence this warning fields need to be renamed or namespace need to be removed from protected_namespaces.

Changes 🏗️

This PR renames model_* fields to llm_* in affected models.

PR Quality Scorecard ✨

  • [x] Have you used the PR description template?   +2 pts
  • [x] Is your pull request atomic, focusing on a single change?   +5 pts
  • [ ] Have you linked the GitHub issue(s) that this PR addresses?   +5 pts
  • [ ] Have you documented your changes clearly and comprehensively?   +5 pts
  • [ ] Have you changed or added a feature?   -4 pts
    • [ ] Have you added/updated corresponding documentation?   +4 pts
    • [ ] Have you added/updated corresponding integration tests?   +5 pts
  • [ ] Have you changed the behavior of AutoGPT?   -5 pts
    • [ ] Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

kcze avatar Jul 07 '24 10:07 kcze