Compare commits

..

2 Commits

Author SHA1 Message Date
75f1d75cae add server 2025-06-21 16:48:10 +08:00
0b6b2fe730 fix: update 2025-06-21 16:47:33 +08:00
4 changed files with 29 additions and 15 deletions

View File

@ -15,6 +15,7 @@
"scripts": {
"dev": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 bun --watch src/dev.ts ",
"worker": "bun --watch src/task/worker.ts",
"worker:server": "bun src/task/worker.ts",
"build": "rimraf dist && bun run bun.config.mjs",
"test": "tsx test/**/*.ts",
"clean": "rm -rf dist",

View File

@ -1,16 +1,28 @@
import { SiliconFlowProvider } from '@kevisual/ai';
import { BailianProvider } from '@kevisual/ai';
import { config } from '../modules/config.ts';
export const ai = new SiliconFlowProvider({
model: 'Qwen/Qwen3-32B',
// model: 'Pro/deepseek-ai/DeepSeek-R1',// 只有充值能用
apiKey: config.SILICONFLOW_API_KEY,
});
// export const ai = new SiliconFlowProvider({
// model: 'Qwen/Qwen3-32B',
// // model: 'Pro/deepseek-ai/DeepSeek-R1',// 只有充值能用
// apiKey: config.SILICONFLOW_API_KEY,
// });
// ai.getUsageInfo()
// .then((usage) => {
// console.log('AI usage info:', usage);
// })
// .catch((res) => {
// console.error('Error fetching AI usage info:', res.status);
// });
ai.getUsageInfo()
.then((usage) => {
console.log('AI usage info:', usage);
})
.catch((res) => {
console.error('Error fetching AI usage info:', res.status);
export const ai = new BailianProvider({
baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
model: 'qwen3-235b-a22b',
apiKey: config.BAILIAN_API_KEY,
});
console.log('Bailian AI initialized with model:', config.BAILIAN_API_KEY);
export const bailianModel = {
turbo: 'qwen-turbo-2025-04-28',
plus: 'qwen-plus-2025-04-28',
a22b235: 'qwen3-235b-a22b',
};

View File

@ -24,7 +24,7 @@ agent
content: `
500markdown模式HTML标签或其他格式化内容
1.
<content></content>
@ -55,6 +55,7 @@ ${text}
});
console.log('end', Date.now() - now, 'ms');
console.log('AI response:', res);
const ans = res.choices[0]?.message?.content || '';
if (!ans) {
logger.error('Empty response from AI:', res);

View File

@ -10,7 +10,7 @@ const main = async () => {
path: 'fix',
key: 'xhs',
payload: {
text: text4,
text: text,
},
});
console.log('fix xhs res', res.code, 'content', res.body);