-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwrangler.toml
More file actions
66 lines (57 loc) · 1.82 KB
/
wrangler.toml
File metadata and controls
66 lines (57 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# MindSpring — Cloudflare Workers Configuration
#
# Setup steps:
# 1. Create KV namespace:
# wrangler kv namespace create MINDSPRING_KV
# wrangler kv namespace create MINDSPRING_KV --preview
#
# 2. Create R2 bucket:
# wrangler r2 bucket create mindspring-uploads
#
# 3. Create Vectorize index:
# wrangler vectorize create mindspring-conversations --dimensions=1024 --metric=cosine
#
# 4. Create Queues:
# wrangler queues create mindspring-ingestion
# wrangler queues create mindspring-ingestion-dlq
#
# 5. Deploy:
# wrangler deploy
name = "mindspring"
main = "src/index.ts"
compatibility_date = "2025-03-01"
compatibility_flags = ["nodejs_compat"]
# --- Static frontend assets ---
[assets]
directory = "./frontend"
binding = "ASSETS"
# --- R2: raw conversation JSON uploads ---
[[r2_buckets]]
binding = "UPLOADS_BUCKET"
bucket_name = "mindspring-uploads"
# --- Vectorize: vector search index ---
[[vectorize]]
binding = "VECTORIZE"
index_name = "mindspring-conversations"
# --- Queue: async ingestion pipeline ---
[[queues.producers]]
binding = "INGESTION_QUEUE"
queue = "mindspring-ingestion"
[[queues.consumers]]
queue = "mindspring-ingestion"
max_batch_size = 1
max_retries = 3
dead_letter_queue = "mindspring-ingestion-dlq"
# --- KV: auth keys, upload progress, conversation text, processed IDs, telemetry ---
[[kv_namespaces]]
binding = "KV"
id = "YOUR_KV_NAMESPACE_ID" # Create with: npx wrangler kv namespace create KV
preview_id = "YOUR_KV_PREVIEW_ID" # Create with: npx wrangler kv namespace create KV --preview
# --- Workers AI: embedding generation ---
[ai]
binding = "AI"
# --- Environment variables ---
[vars]
EMBEDDING_MODEL = "@cf/baai/bge-large-en-v1.5"
EMBEDDING_DIMENSION = "1024"
BATCH_SIZE = "100"