fix: fix litellmchatmodel.generate to also handle messages of type str
What does this merge request do and why?
Sometimes the messages
param is of type str
despite the typing hint specifying it as messages: list[Message]
. This MR handles these cases.
Fix gitlab-org/modelops/ai-model-validation-and-research/ai-evaluation/prompt-library#330 (closed). Follow-up issue to investigate the root cause #518.
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