-
Notifications
You must be signed in to change notification settings - Fork 406
Expand file tree
/
Copy pathtrendpublish.config.docker.example.ts
More file actions
114 lines (108 loc) · 2.72 KB
/
trendpublish.config.docker.example.ts
File metadata and controls
114 lines (108 loc) · 2.72 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// 这个示例可以放在项目根目录,也可以复制到 config/trendpublish.config.ts。
import { defineConfig } from "@src/utils/config/define-config.ts";
function splitList(value: string): string[] {
return value
.split(",")
.map((item) => item.trim())
.filter(Boolean);
}
export default defineConfig((runtime) => ({
server: {
apiKey: runtime.required("SERVER_API_KEY"),
port: 8000,
},
providers: {
ai: {
baseUrl: runtime.value("AI_BASE_URL", "https://api.deepseek.com/v1"),
apiKey: runtime.required("AI_API_KEY"),
model: runtime.value("AI_MODEL", "deepseek-chat"),
},
fetch: {
firecrawl: {
apiKey: runtime.secret("FIRECRAWL_API_KEY"),
},
jina: {
apiKey: runtime.secret("JINA_API_KEY"),
},
twitter: {
bearerToken: runtime.secret("TWITTER_BEARER_TOKEN"),
xquikApiKey: runtime.secret("XQUIK_API_KEY"),
},
rss: {
baseUrl: runtime.value("RSSHUB_BASE_URL", "https://rsshub.app"),
},
},
image: {
dashscope: {
apiKey: runtime.secret("DASHSCOPE_API_KEY"),
},
},
publish: {
weixin: {
appId: runtime.secret("WEIXIN_APP_ID"),
appSecret: runtime.secret("WEIXIN_APP_SECRET"),
author: runtime.value("WEIXIN_AUTHOR", "AI Trend Publish"),
},
weixinRelay: {
url: runtime.secret("WEIXIN_RELAY_URL"),
token: runtime.secret("WEIXIN_RELAY_TOKEN"),
},
},
},
fetchGroups: {
default: ["auto"],
web: ["firecrawl", "jina"],
social: ["twitter"],
},
features: {
article: {
sources: splitList(
runtime.value("ARTICLE_SOURCES", "https://news.ycombinator.com/"),
),
publisher: {
provider: runtime.value("WEIXIN_PUBLISH_PROVIDER", "weixin") as
| "weixin"
| "weixin-relay",
},
renderer: {
template: "dynamic",
promptProfile: "technology",
},
count: Number(runtime.value("ARTICLE_COUNT", "10")),
dryRun: true,
notifications: {
channels: [],
},
cover: {
enabled: false,
provider: "dashscope",
model: "wanx-poster-generation-v1",
},
bodyImages: {
mode: "off",
provider: "dashscope",
count: 1,
size: "1024*1024",
},
deduplication: {
enabled: false,
embeddingProvider: "dashscope",
vectorStore: "sqlite",
},
},
},
storage: {
artifacts: {
provider: "local",
outputDir: "src/temp",
},
runState: {
provider: "local-json",
outputDir: "src/temp",
},
vector: {
provider: "sqlite",
sqlitePath: "src/temp/trendpublish.sqlite3",
},
},
}));