-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.ts
More file actions
73 lines (72 loc) · 1.96 KB
/
config.ts
File metadata and controls
73 lines (72 loc) · 1.96 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
67
68
69
70
71
72
73
// config.ts - 用户配置文件
import { defineConfig } from "@intellipick/config";
import { sources } from "./config.sources";
export default defineConfig({
ai: {
providers: {
deepseek: {
baseUrl: "https://api.deepseek.com/v1",
},
anthropic: {
baseUrl: "https://open.bigmodel.cn/api/anthropic/v1",
},
},
tasks: {
filter: {
provider: "deepseek",
model: "deepseek-chat",
},
extractAndClassify: {
provider: "deepseek",
model: "deepseek-chat",
},
chat: {
provider: "deepseek",
model: "deepseek-chat",
},
},
},
scheduler: {
timezone: "Asia/Shanghai",
lockTimeout: 5 * 60 * 1000, // 5分钟,单位毫秒
},
queue: {
name: "intellipick-pipeline", // 队列名称
concurrency: 5, // 同时处理
rateLimit: {
max: 10, // 每个时间窗口的最大任务数
duration: 1000 * 10, // 时间窗口,单位毫秒
},
retry: {
attempts: 0, // 失败重试
backoff: {
type: "exponential", // 指数退避
delay: 2000, // 首次延迟
},
},
},
api: {
corsOrigin: "*", // CORS 允许的源,"*" 表示允许所有,或使用数组 ["http://localhost:3000", "https://example.com"]
rateLimit: 100, // API 速率限制(每分钟请求数)
graphql: {
playground: false, // 是否启用 GraphQL Playground
introspection: true, // 是否启用 GraphQL 内省
},
},
sources,
filter: {
hardRules: {
enabled: true, // 启用硬规则过滤
blacklistDomains: ["bit.ly/spam"], // 黑名单域名
spamKeywords: ["微信群", "返利", "优惠码", "开户", "代投", "包赚"], // 垃圾内容关键词
},
thresholds: {
passMinValueScore: 60, // 及格分数线
rejectMaxValueScore: 40, // 拒绝分数线
quarantineOnSafety: true, // 安全性低于阈值时隔离
rejectToQuarantineMinScore: 30, // 拒绝但保留观察的最低分数
},
promptVersion: "v1.0", // 使用的提示词版本
quarantineTTLDays: 30, // 隔离内容保存天数
},
});