If you're using TypeScript I highly recommend modelfusion https://modelfusion.dev/guide/
It is far more robust, integrates with any LLM local or hosted, supports multi-modal, retries, structure parsing using zod and more.
It is far more robust, integrates with any LLM local or hosted, supports multi-modal, retries, structure parsing using zod and more.