-
Notifications
You must be signed in to change notification settings - Fork 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
Add ai rag provider #1129
base: master
Are you sure you want to change the base?
Add ai rag provider #1129
Conversation
Use default prompt if prompt.custom is not provided, but messages are.
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.
A few initial comments
| ContentBlockStop | ||
| MessageDelta | ||
| MessageStop; | ||
const _edgedbRagChunkSchema = z.discriminatedUnion("type", [ |
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.
packages/ai/src/core.ts
Outdated
@@ -68,11 +63,17 @@ export class EdgeDBAI { | |||
}); | |||
} | |||
|
|||
private async fetchRag(request: Omit<RAGRequest, "model" | "prompt">) { | |||
private async fetchRag(request: any) { |
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.
Is there something more useful than any
we can use here? Like maybe unknown
?
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.
tnx, I updated this
export async function createEdgeDB(client: Client): Promise<EdgeDBProvider> { | ||
const connectConfig: ResolvedConnectConfig = ( | ||
await (client as any).pool._getNormalizedConnectConfig() | ||
).connectionParams; |
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 think we have a new API for getting these on the Client object. Like getConnectionParams
or something?
No description provided.