vercel / ai-chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
https://chat.vercel.ai
Other
5.53k stars 1.63k forks source link

Since ai/rsc can't work with google Vertex AI #279

Open Godrules500 opened 3 months ago

Godrules500 commented 3 months ago

I was given some news after merging the ai/rsc changes y'all made (which are awesome) that I have to use google vertex ai. Since I can't use render, how much of a pain is it to convert submitChanges to working with the google provider? Or do I need to convert it all the way back to useChat and etc?

Godrules500 commented 2 months ago

Wanted to ask again if there is an example for using VertexAI as a custom provider?

athrael-soju commented 1 month ago

Wanted to ask again if there is an example for using VertexAI as a custom provider? https://github.com/vercel-labs/gemini-chatbot

Godrules500 commented 1 month ago

Unfortunately that looks to still be using @google/generative-ai instead of @google-cloud/vertexai.

athrael-soju commented 1 month ago

Unfortunately that looks to still be using @google/generative-ai instead of @google-cloud/vertexai.

I was able to repurpose it to use openAI with only a few lines of code, so it shouldn't be that bad converting it. Unless I'm missing something.

Godrules500 commented 1 month ago

The part I'm struggling with is it doesn't make the normal API call like it does with google or open ai. The vertex sdk handles that behind the scenes so there seems to be a good bit I have to change.