// @bun
// src/components/docs/integrations/IntegrationsQdrantPage.tsx
import Link from "@contractspec/lib.ui-link";
import { ChevronRight } from "lucide-react";
import { jsx, jsxs } from "react/jsx-runtime";
function IntegrationsQdrantPage() {
  return /* @__PURE__ */ jsxs("div", {
    className: "space-y-8",
    children: [
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h1", {
            className: "text-4xl font-bold",
            children: "Qdrant"
          }),
          /* @__PURE__ */ jsx("p", {
            className: "text-muted-foreground",
            children: "Qdrant is a high-performance vector database for semantic search, recommendations, and RAG (Retrieval-Augmented Generation) applications."
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Setup"
          }),
          /* @__PURE__ */ jsx("div", {
            className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
            children: /* @__PURE__ */ jsx("pre", {
              children: `# .env
QDRANT_URL=https://...
QDRANT_API_KEY=...
QDRANT_COLLECTION=documents`
            })
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Storing vectors"
          }),
          /* @__PURE__ */ jsx("div", {
            className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
            children: /* @__PURE__ */ jsx("pre", {
              children: `capabilityId: qdrant-upsert
provider:
  type: qdrant
  operation: upsert

inputs:
  collection:
    type: string
  points:
    type: array
    items:
      type: object
      properties:
        id: string
        vector: array
        payload: object

outputs:
  status:
    type: string`
            })
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "Semantic search"
          }),
          /* @__PURE__ */ jsx("div", {
            className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
            children: /* @__PURE__ */ jsx("pre", {
              children: `capabilityId: qdrant-search
provider:
  type: qdrant
  operation: search

inputs:
  collection:
    type: string
  vector:
    type: array
    items:
      type: number
  limit:
    type: number
    default: 10

outputs:
  results:
    type: array
    items:
      type: object
      properties:
        id: string
        score: number
        payload: object`
            })
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "space-y-4",
        children: [
          /* @__PURE__ */ jsx("h2", {
            className: "text-2xl font-bold",
            children: "RAG workflow example"
          }),
          /* @__PURE__ */ jsx("div", {
            className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
            children: /* @__PURE__ */ jsx("pre", {
              children: `workflowId: rag-query
version: '1.0.0'.0.0

steps:
  - id: generate-embedding
    capability: openai-embeddings
    inputs:
      text: \${input.query}

  - id: search-documents
    capability: qdrant-search
    inputs:
      collection: "documents"
      vector: \${steps.generate-embedding.output.embedding}
      limit: 5

  - id: generate-answer
    capability: openai-chat
    inputs:
      messages:
        - role: "system"
          content: "Answer based on the context provided"
        - role: "user"
          content: |
            Context: \${steps.search-documents.output.results}
            Question: \${input.query}`
            })
          })
        ]
      }),
      /* @__PURE__ */ jsxs("div", {
        className: "flex items-center gap-4 pt-4",
        children: [
          /* @__PURE__ */ jsx(Link, {
            href: "/docs/integrations/elevenlabs",
            className: "btn-ghost",
            children: "Previous: ElevenLabs"
          }),
          /* @__PURE__ */ jsxs(Link, {
            href: "/docs/integrations/s3",
            className: "btn-primary",
            children: [
              "Next: S3 Storage ",
              /* @__PURE__ */ jsx(ChevronRight, {
                size: 16
              })
            ]
          })
        ]
      })
    ]
  });
}
export {
  IntegrationsQdrantPage
};
