You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In looking at various solutions to create an AI chatbot utilizing a vector search, I came across this great tutorial which uses Upstasth: https://github.com/upstash/degree-guru/tree/master. As Orama already provides a vector search and hybrid search and allows you retrieve everything in the client, it would seem that Orama is better to use than Upstash. The code just seems simpler. However, I'm confused as to how to get this to work in Next.js with Orama. You have an example here: https://docs.oramasearch.com/cloud/orama-ai/orama-secure-proxy#performing-chat-completion-requests with async iterators, but how would you stream these responses back to the client in Next.js? Next.js has a useChat https://sdk.vercel.ai/docs/api-reference/use-chat, but this requires an API endpoint. With Orama, you don't use an API endpoint, or if you do, the async iterators won't make sense, as far as I can tell or won't even be usable. So how would this work. Any chance you can create your own example based on the degree-guru above? I think the actual lines of code is 1/10 with Orama because the vectors are created automatically. It's just a few lines of client side code from what I can tell.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In looking at various solutions to create an AI chatbot utilizing a vector search, I came across this great tutorial which uses Upstasth: https://github.com/upstash/degree-guru/tree/master. As Orama already provides a vector search and hybrid search and allows you retrieve everything in the client, it would seem that Orama is better to use than Upstash. The code just seems simpler. However, I'm confused as to how to get this to work in Next.js with Orama. You have an example here: https://docs.oramasearch.com/cloud/orama-ai/orama-secure-proxy#performing-chat-completion-requests with async iterators, but how would you stream these responses back to the client in Next.js? Next.js has a useChat https://sdk.vercel.ai/docs/api-reference/use-chat, but this requires an API endpoint. With Orama, you don't use an API endpoint, or if you do, the async iterators won't make sense, as far as I can tell or won't even be usable. So how would this work. Any chance you can create your own example based on the degree-guru above? I think the actual lines of code is 1/10 with Orama because the vectors are created automatically. It's just a few lines of client side code from what I can tell.
Beta Was this translation helpful? Give feedback.
All reactions