Compare commits

..

No commits in common. "75f1d75caefb59e3762846d81746cec93bfd07c4" and "ce7cd03cb3f920ab63009d10e85e4eb07b614efa" have entirely different histories.

4 changed files with 14 additions and 28 deletions

View File

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

View File

@ -1,28 +1,16 @@
import { BailianProvider } from '@kevisual/ai'; import { SiliconFlowProvider } from '@kevisual/ai';
import { config } from '../modules/config.ts'; import { config } from '../modules/config.ts';
// export const ai = new SiliconFlowProvider({ export const ai = new SiliconFlowProvider({
// model: 'Qwen/Qwen3-32B', model: 'Qwen/Qwen3-32B',
// // model: 'Pro/deepseek-ai/DeepSeek-R1',// 只有充值能用 // model: 'Pro/deepseek-ai/DeepSeek-R1',// 只有充值能用
// apiKey: config.SILICONFLOW_API_KEY, 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);
// });
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 = { ai.getUsageInfo()
turbo: 'qwen-turbo-2025-04-28', .then((usage) => {
plus: 'qwen-plus-2025-04-28', console.log('AI usage info:', usage);
a22b235: 'qwen3-235b-a22b', })
}; .catch((res) => {
console.error('Error fetching AI usage info:', res.status);
});

View File

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

View File

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