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

Cd/eng 1804/prompt reconciliation for vercel ai sdk #62

Merged
merged 3 commits into from
Aug 28, 2024

Conversation

constantinidan
Copy link
Contributor

image Fix Vercel AI SDK. On the picture, you can now see the correct prompt matching.

@constantinidan constantinidan marked this pull request as ready for review August 24, 2024 18:26
Copy link
Contributor

@Dam-Buty Dam-Buty left a comment

Choose a reason for hiding this comment

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

this one had me scratching my head, i had no idea this feature existed 😅 LGTM other than a small coding style comment

Comment on lines +104 to +106
if (typeof (message as any).literalMetadata === 'function') {
return (message as any).literalMetadata();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

slightly cleaner style IMO

Suggested change
if (typeof (message as any).literalMetadata === 'function') {
return (message as any).literalMetadata();
}
const metadata = (message as any).literalMetadata();
if (typeof metadata === 'function') {
return metadata();
}

Copy link
Contributor Author

@constantinidan constantinidan Aug 26, 2024

Choose a reason for hiding this comment

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

the suggestion does not work if the messages are not linked to a prompt. .literalMetadata() does not exist.
image

@desaxce desaxce self-requested a review August 28, 2024 13:24
@desaxce desaxce merged commit 5155627 into main Aug 28, 2024
2 checks passed
@desaxce desaxce deleted the cd/ENG-1804/prompt-reconciliation-for-vercel-ai-sdk branch August 28, 2024 13:25
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