Skip to content

Update vercel ai sdk to v4 #65

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

deepu105
Copy link

Updated to latest Vercel AI SDK and also updated LangChain versions

Copy link

vercel bot commented Feb 20, 2025

@deepu105 is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple nits, need to try out locally but from a first glance, lgtm!

} else if (message.getType() === "tool") {
return {
content: message.content,
role: "system",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be role: tool?

Suggested change
role: "system",
role: "tool",

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vercel Message has bound the type to role: 'system' | 'user' | 'assistant' | 'data'; so I thought system was the closest to tool

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm weird. id need to read the docs then but i dont think system would be the right role for this

@latifs
Copy link

latifs commented Apr 2, 2025

Hey Guys,
@deepu105, @bracesproul any updates on that?
Thanks

Copy link
Member

@bracesproul bracesproul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it out locally, and when compared to the deployed version I'm seeing some differences. Specifically around rendering tool calls. See the screenshots below. The screenshot which shows the tool call dropdown is from the deployed version, and the one without is your branch.
image

image

.env

.vscode
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we dont want to gitignore this

Suggested change
.vscode

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

Successfully merging this pull request may close these issues.

3 participants