Skip to content
New issue

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

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

Already on GitHub? # to your account

Vercel ai sdk impl #382

Merged
merged 34 commits into from
Jan 8, 2025
Merged

Vercel ai sdk impl #382

merged 34 commits into from
Jan 8, 2025

Conversation

sameelarif
Copy link
Collaborator

@sameelarif sameelarif commented Jan 7, 2025

#385 is a pre-requisite to this PR

why

We want to provide an example of supporting Vercel's AI SDK so that people can use a larger variety of LLMs

what changed

Added example usage of the AI SDK

test plan

Add an eval for using the AI SDK client

Copy link

changeset-bot bot commented Jan 7, 2025

🦋 Changeset detected

Latest commit: 0d383a0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@browserbasehq/stagehand Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sameelarif sameelarif assigned sameelarif and unassigned sameelarif Jan 7, 2025
@sameelarif sameelarif added enhancement New feature or request combination These changes affect multiple Stagehand functions labels Jan 7, 2025
Copy link
Contributor

@kamath kamath left a comment

Choose a reason for hiding this comment

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

suggested changes mainly around removing logger since #367 should cover that. don't take these suggested changes at face value though, make sure they run appropriately.

also might need to pull from main to include changes from #383

examples/ai_sdk_example.ts Outdated Show resolved Hide resolved
examples/external_clients/aisdk.ts Outdated Show resolved Hide resolved
examples/external_clients/aisdk.ts Outdated Show resolved Hide resolved
@kamath kamath mentioned this pull request Jan 7, 2025
@sameelarif sameelarif requested a review from kamath January 8, 2025 07:07
};

async function example() {
const stagehand = new Stagehand(StagehandConfig);
Copy link
Contributor

Choose a reason for hiding this comment

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

can we instead import StagehandConfig and do:

{...StagehandConfig, llmClient: AISdkClient()}

@sameelarif sameelarif merged commit a41271b into main Jan 8, 2025
10 checks passed
@github-actions github-actions bot mentioned this pull request Jan 8, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
combination These changes affect multiple Stagehand functions enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants