Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ export const POST = withNamespaceApiHandler(
await parseRequestBody(req),
);

const isPinecone =
const isKeywordUnsupported =
namespace.vectorStoreConfig?.provider === "MANAGED_PINECONE" ||
namespace.vectorStoreConfig?.provider === "MANAGED_PINECONE_OLD" ||
namespace.vectorStoreConfig?.provider === "PINECONE";

if (body.mode === "keyword" && isPinecone) {
if (body.mode === "keyword" && isKeywordUnsupported) {
throw new AgentsetApiError({
code: "bad_request",
message: "Keyword search is not enabled for this namespace",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/create-namespace/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
GoogleEmbeddingConfigSchema,
OpenAIEmbeddingConfigSchema,
PineconeVectorStoreConfigSchema,
QdrantVectorStoreConfigSchema,
TurbopufferVectorStoreConfigSchema,
VoyageEmbeddingConfigSchema,
} from "@agentset/validation";
Expand Down Expand Up @@ -65,8 +66,7 @@ export const vectorStores: {
comingSoon: true,
},
{
value: "qdrant",
value: QdrantVectorStoreConfigSchema.shape.provider.value,
icon: QdrantIcon,
comingSoon: true,
},
];
23 changes: 20 additions & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
"@ai-sdk/openai": "^2.0.30",
"@llamaindex/core": "^0.5.8",
"@pinecone-database/pinecone": "5.1.1",
"@qdrant/js-client-rest": "^1.17.0",
"@t3-oss/env-nextjs": "catalog:",
"@turbopuffer/turbopuffer": "^1.10.0",
"cohere-ai": "^7.19.0",
"uuid": "^13.0.0",
"voyage-ai-provider": "^2.0.0",
"zeroentropy": "0.1.0-alpha.6",
"zod": "catalog:"
Expand All @@ -38,10 +40,11 @@
"@agentset/eslint-config": "workspace:*",
"@agentset/prettier-config": "workspace:*",
"@agentset/tsconfig": "workspace:*",
"@types/uuid": "^11.0.0",
"eslint": "catalog:",
"prettier": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
},
"prettier": "@agentset/prettier-config"
}
}
4 changes: 2 additions & 2 deletions packages/engine/src/vector-store/common/vector-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import type {
RelatedNodeType,
} from "@llamaindex/core/schema";

import { PartitionBatch } from "../../partition";
import { VectorFilter } from "./filter";
import type { PartitionBatch } from "../../partition";
import type { VectorFilter } from "./filter";

export type VectorStoreMetadata = Record<
string,
Expand Down
12 changes: 11 additions & 1 deletion packages/engine/src/vector-store/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Namespace } from "@agentset/db";

import { env } from "../env";
import { VectorStore } from "./common/vector-store";
import type { VectorStore } from "./common/vector-store";

export const getNamespaceVectorStore = async (
namespace: Pick<Namespace, "vectorStoreConfig" | "id">,
Expand Down Expand Up @@ -65,6 +65,16 @@ export const getNamespaceVectorStore = async (
});
}

case "QDRANT": {
const { Qdrant } = await import("./qdrant/index");

return new Qdrant({
url: config.url,
apiKey: config.apiKey,
...commonConfig,
}) as VectorStore;
}

default: {
// This exhaustive check ensures TypeScript will error if a new provider
// is added without handling it in the switch statement
Expand Down
Loading