UNPKG

@convex-dev/agent

Version:

A agent component for Convex.

61 lines 3.85 kB
import type { Id } from "../_generated/dataModel.js"; import { type ActionCtx, type MutationCtx } from "../_generated/server.js"; import { type EmbeddingsWithoutDenormalizedFields, type VectorDimension } from "./tables.js"; export declare const paginate: import("convex/server").RegisteredQuery<"public", { table?: string | undefined; cursor?: string | undefined; limit: number; vectorDimension: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096; targetModel: string; }, Promise<{ ids: (import("convex/values").GenericId<"embeddings_128"> | import("convex/values").GenericId<"embeddings_256"> | import("convex/values").GenericId<"embeddings_512"> | import("convex/values").GenericId<"embeddings_768"> | import("convex/values").GenericId<"embeddings_1024"> | import("convex/values").GenericId<"embeddings_1408"> | import("convex/values").GenericId<"embeddings_1536"> | import("convex/values").GenericId<"embeddings_2048"> | import("convex/values").GenericId<"embeddings_3072"> | import("convex/values").GenericId<"embeddings_4096">)[]; isDone: boolean; continueCursor: string; }>>; export declare const deleteBatchForThread: import("convex/server").RegisteredMutation<"public", { cursor?: string | undefined; threadId: string; model: string; limit: number; vectorDimension: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096; }, Promise<{ isDone: boolean; continueCursor: string; }>>; export declare const insertBatch: import("convex/server").RegisteredMutation<"public", { vectors: { userId?: string | undefined; threadId?: string | undefined; messageId?: import("convex/values").GenericId<"messages"> | undefined; model: string; table: string; vector: number[]; }[]; vectorDimension: 128 | 256 | 512 | 768 | 1024 | 1408 | 1536 | 2048 | 3072 | 4096; }, Promise<(string & { __tableName: "embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096"; })[]>>; export declare function insertVector(ctx: MutationCtx, dimension: VectorDimension, v: EmbeddingsWithoutDenormalizedFields): Promise<import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096">>; export declare function searchVectors(ctx: ActionCtx, vector: number[], args: { dimension: VectorDimension; model: string; table: string; userId?: string; threadId?: Id<"threads">; searchAllMessagesForUserId?: string; limit?: number; }): Promise<{ _id: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096">; _score: number; }[]>; export declare const updateBatch: import("convex/server").RegisteredMutation<"public", { vectors: { id: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096">; model: string; vector: number[]; }[]; }, Promise<void>>; export declare const deleteBatch: import("convex/server").RegisteredMutation<"public", { ids: import("convex/values").GenericId<"embeddings_128" | "embeddings_256" | "embeddings_512" | "embeddings_768" | "embeddings_1024" | "embeddings_1408" | "embeddings_1536" | "embeddings_2048" | "embeddings_3072" | "embeddings_4096">[]; }, Promise<void>>; //# sourceMappingURL=index.d.ts.map