Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refreshed Template! #438

Open
jeremyphilemon opened this issue Oct 11, 2024 · 11 comments
Open

Refreshed Template! #438

jeremyphilemon opened this issue Oct 11, 2024 · 11 comments

Comments

@jeremyphilemon
Copy link
Collaborator

jeremyphilemon commented Oct 11, 2024

Hey everyone!

We've made significant changes to the Next.js Chatbot template. By building v0 over the past year, we spent a lot of time pushing the limits of delivering the best chat experience for the web. The AI SDK abstracts some of these best practices and commonly used patterns like middleware, multi-step tool calls, attachments, telemetry, provider registry, etc. into a toolkit that you can use to quickly and reliably integrate AI into your applications.

This refresh materializes our learnings into a production-ready template that developers can get started with. In addition, we've resolved many common issues reported in the tracker by fixing bugs that were impacting functionality and usage.

Your feedback has been invaluable in shaping this refresh, and we look forward to your continued input as we evolve the template further!

@jeremyphilemon jeremyphilemon changed the title Refreshed Chatbot! Refreshed Template! Oct 11, 2024
@jeremyphilemon jeremyphilemon pinned this issue Oct 11, 2024
@athrael-soju
Copy link

I'll be damned. You guys finally did it and it's the best one yet! Simple, no fluff, react 19, next 15 + blob/pg. I'd have loved to see some tanstack/react-query in there, but I know I'm getting greedy now. I'll add that myself ;)

Kudos @jeremyphilemon

@chuckstock
Copy link

was there reasons to move away from actions to api fetch calls?

@nilsmassing
Copy link

The file upload does not seem to work or am i missing something?

@zzh8829
Copy link

zzh8829 commented Oct 14, 2024

It seems like i cannot login anymore
Application error: a client-side exception has occurred (see the browser console for more information).
POST https://chat.vercel.ai/login 429 (Too Many Requests)

something wrong with rate limiter?

@athrael-soju
Copy link

The file upload does not seem to work or am i missing something?

It will only work for images

@jeremyphilemon
Copy link
Collaborator Author

jeremyphilemon commented Oct 15, 2024

@chuckstock there are server actions still present in the template (see auth functions); but you're observation is right, some of them have been converted to route handlers so they can be used with swr.

@zzh8829 looks like the rate limiter is working as intended, but the error could've been a toast instead of throwing a client-side exception – will have a fix in!

@nilsmassing can you share more information about what you tried so I can debug? would like to know if you have the postgres and blob setup, whether you're seeing this during local dev or prod, etc.

@nilsmassing
Copy link

@jeremyphilemon I tried using pdf files. Didn't know it only works with images, but that's cool with me.

FYI: I used this template to make a feedback bot that answers questions for students regarding corporate controlling courses and I wanted the bot to be able to read the course script and answer accordingly. I got it to work by coding a getAssistant tool instead of getWeather to make a call to the OpenAI Assistants AI in case of questions regarding the pdf file.

I'm really thankful and impressed by the work you put into this. The app looks and feels flawless! Big Thank you 😊

@jeremyphilemon
Copy link
Collaborator Author

@nilsmassing you can try the gemini chatbot if you'd like to use files other than images – it should support pdfs!

also glad to hear that the template makes it easy to build on top of, like you've mentioned with your use case :)

@hieutrluu
Copy link

@chuckstock there are server actions still present in the template (see auth functions); but you're observation is right, some of them have been converted to route handlers so they can be used with swr.

@zzh8829 looks like the rate limiter is working as intended, but the error could've been a toast instead of throwing a client-side exception – will have a fix in!

@nilsmassing can you share more information about what you tried so I can debug? would like to know if you have the postgres and blob setup, whether you're seeing this during local dev or prod, etc.

Hi @jeremyphilemon, thank you and the team for the great work. I am stilled curious about the migration from AI RSC to route handling considering that the nextjs and vercel team is pushing so much for the server action. Is there any specific benefit that we have from having using AI use client fetching library like SWR ?

@hieutrluu
Copy link

oh, I have found the explanation here: #438 (comment)
thank you and the team again

@f13end
Copy link

f13end commented Oct 20, 2024

@jeremyphilemon Making additions and changes to the new template has caused some errors. In the previous application, I was sending the user's question to Perplexity and then forwarding the response to OpenAI. However, when I try to route it through the router here, the request doesn’t seem to reflect in the response. Thank you in advance for your response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants