@anyul/koishi-plugin-rss 5.0.5 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/config.js +53 -0
- package/lib/core/ai.js +47 -2
- package/lib/core/search.d.ts +101 -0
- package/lib/core/search.js +508 -0
- package/lib/index.js +113 -33
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types.d.ts +37 -0
- package/package.json +1 -1
package/lib/types.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export interface Config {
|
|
|
37
37
|
net?: NetConfig;
|
|
38
38
|
msg?: MsgConfig;
|
|
39
39
|
ai?: AiConfig;
|
|
40
|
+
search?: SearchConfig;
|
|
40
41
|
cache?: CacheConfig;
|
|
41
42
|
debug?: "disable" | "error" | "info" | "details";
|
|
42
43
|
logging?: LoggingConfig;
|
|
@@ -153,3 +154,39 @@ export interface LoggingConfig {
|
|
|
153
154
|
includeContext?: boolean;
|
|
154
155
|
contextFields?: string[];
|
|
155
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* 联网搜索配置
|
|
159
|
+
*/
|
|
160
|
+
export interface SearchConfig {
|
|
161
|
+
enabled?: boolean;
|
|
162
|
+
engine?: 'tavily' | 'searxng' | 'volcengine' | 'auto';
|
|
163
|
+
maxResults?: number;
|
|
164
|
+
enginePriority?: Array<'tavily' | 'searxng' | 'volcengine'>;
|
|
165
|
+
tavily?: TavilyConfig;
|
|
166
|
+
searxng?: SearxngConfig;
|
|
167
|
+
volcengine?: VolcengineConfig;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Tavily 搜索配置
|
|
171
|
+
*/
|
|
172
|
+
export interface TavilyConfig {
|
|
173
|
+
apiKey?: string;
|
|
174
|
+
searchDepth?: 'basic' | 'advanced';
|
|
175
|
+
includeAnswer?: boolean;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* SearXNG 搜索配置
|
|
179
|
+
*/
|
|
180
|
+
export interface SearxngConfig {
|
|
181
|
+
instanceUrl?: string;
|
|
182
|
+
language?: string;
|
|
183
|
+
categories?: Array<'general' | 'news' | 'images' | 'videos'>;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* 火山引擎搜索配置
|
|
187
|
+
*/
|
|
188
|
+
export interface VolcengineConfig {
|
|
189
|
+
apiKey?: string;
|
|
190
|
+
models?: string[];
|
|
191
|
+
useAiModel?: boolean;
|
|
192
|
+
}
|
package/package.json
CHANGED