Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add ai rag provider #1129
Add ai rag provider #1129
Changes from 7 commits
1e94601
cc676af
660a5c2
9dcf152
45b7293
a230f1e
b51476b
08df0b9
4941fe5
f65bf4e
37d5373
43b26d4
c34c0cd
1c228f3
a52447a
bb190df
ed08833
cc88937
4447820
3421567
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are not exporting this Zod schema or using it in this file: why are we using a Zod schema instead of writing this as a TypeScript interface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used this in the vercel provider so it was easier to copy paste it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we export it then maybe? Not a blocker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can export it, I just dont understand/see when would someone need it?
we export:
export type StreamingMessage = z.infer<typeof _edgedbRagChunkSchema>;
which will user most probably use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I thought you mean that you are using a copy-pasted version of this schema in the Vercel provider, no? I'm saying export it here and import it in the Vercel provider instead of copy-pasting it. Or export it from the Vercel provider and import the type here. Whichever makes sense.
This is not a blocker for merging, it just feels a little strange here to have an essentially "private" Zod schema that isn't used for anything, but has to be kept in sync across two packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm okay I can do this, even tho it makes sense and is better to have one source of truth it feels a bit weird to me to install the whole lib just because one type, but maybe that's usually the way to go in this kind of situations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I hadn't noticed: Does the Vercel AI SDK Provider not use the
@edgedb/ai
package for anything already?