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

Add ai rag provider #1129

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Add ai rag provider #1129

wants to merge 12 commits into from

Conversation

diksipav
Copy link
Contributor

@diksipav diksipav commented Nov 6, 2024

No description provided.

Copy link
Collaborator

@scotttrinh scotttrinh left a 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", [
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@@ -68,11 +63,17 @@ export class EdgeDBAI {
});
}

private async fetchRag(request: Omit<RAGRequest, "model" | "prompt">) {
private async fetchRag(request: any) {
Copy link
Collaborator

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?

Copy link
Contributor Author

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;
Copy link
Collaborator

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?

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.

2 participants