vercel / modelfusion

The TypeScript library for building AI applications.
https://modelfusion.dev
MIT License
1.01k stars 76 forks source link

feat: add gpt4o model #342

Open lcsvcn opened 1 month ago

clharman commented 1 month ago

Thanks for creating this PR. Please merge this 🙏 or we are gonna have to use something else :(

lgrammel commented 1 month ago

@clharman i recommend using the ai sdk instead https://sdk.vercel.ai/docs/introduction which supports gpt4o. have you given it a try?

clharman commented 1 month ago

@lgrammel I will check it out! Still hoping to get 4o in modelfusion until we make the switch. Is modelfusion planned for deprecation in favor of ai sdk?

lcsvcn commented 1 month ago

@clharman just a tip if you are so eager to use it before migrating (as we were too), you can run my modelfusion repository by cloning our custom repository.

We are doing that at the moment and we are able to run on production gpt4o successfully, without any issues.

Basically what we did so far is very similar how it is done on the modelfusion examples folder, but you need to do that on your package.json folder and clone the modelfusion repository into your project.

https://github.com/vercel/modelfusion/blob/c53afa504cf5927223b8f5bb86639c96710088ae/examples/chatbot-next-js/package.json#L24

don't forget the pnpm-workspace file: https://github.com/vercel/modelfusion/blob/c53afa504cf5927223b8f5bb86639c96710088ae/pnpm-workspace.yaml#L1-L6

here is how it looks like on our github repository:

Screenshot 2024-06-03 at 09 38 43

the downside is that you need to clone the project and build before you can run your project, that adds time when we run our CI/CD.

Hexodus commented 1 week ago

@clharman i recommend using the ai sdk instead https://sdk.vercel.ai/docs/introduction which supports gpt4o. have you given it a try?

Is there a migration guide? Would be nice to know what has to be changed. Just the imports or are there more in depth changes needed?