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

Documentation Update: Incorrect Package Name for Chatbot Example #1923

Closed
onurhan1337 opened this issue Jun 12, 2024 · 4 comments
Closed

Documentation Update: Incorrect Package Name for Chatbot Example #1923

onurhan1337 opened this issue Jun 12, 2024 · 4 comments

Comments

@onurhan1337
Copy link

Description

The current documentation on the chatbot page for useChat contains an outdated package name, @ai-sdk/react, which leads to errors because this package does not exist or has been deprecated. The correct package to use is ai/react.

Code example

image

Additional context

No response

@lgrammel
Copy link
Collaborator

@ai-sdk/react is the new package. what issues are you seeing?

@onurhan1337
Copy link
Author

@lgrammel Sorry, I thought this was old since I see ai/react in most examples.

Actually https://github.com/supabase-community/chatgpt-your-files/ I'm trying to recode this project, but I'm getting some errors because most libraries get frequent updates.

In the given example the Chat field works fine, but it doesn't work for me even though it's the same code. When I look at the preview area of the request in Chrome devtools > network, I see that the result is coming, but the output generated by the AI in the chat area is not rendered. I can't find the cause of this problem.

Do you have a chance to take a look at the chat file below? Thank you in advance.

https://github.com/supabase-community/chatgpt-your-files/blob/main/app/chat/page.tsx

@lgrammel
Copy link
Collaborator

The example uses an old AI SDK version: "ai": "^2.2.14"

https://github.com/supabase-community/chatgpt-your-files/blob/main/package.json#L16

There have been numerous changes since then - the docs are for the current version of the AI SDK.

@onurhan1337
Copy link
Author

Thanks 🙏

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

2 participants