We get validation errors when trying to set AISettings in a request to core-api.
All responses use the chat prompts so we never use documents.
Changes proposed in this pull request
Drop all use of the pydantic v1 classes (models/chain.py) so we're just using pydantic v2 and all is well
Added a switch in the chat_prompt template creation runnable to check what the route is and choose the prompts accordingly. This is pretty ugly and will be improved I'm sure but it fixes the bug for now
Things to check
[ ] I have added any new ENV vars in all deployed environments
Context
We get validation errors when trying to set AISettings in a request to core-api. All responses use the chat prompts so we never use documents.
Changes proposed in this pull request
Drop all use of the pydantic v1 classes (models/chain.py) so we're just using pydantic v2 and all is well Added a switch in the chat_prompt template creation runnable to check what the route is and choose the prompts accordingly. This is pretty ugly and will be improved I'm sure but it fixes the bug for now
Things to check