generated from tailored/router-template
Compare commits
No commits in common. "75f1d75caefb59e3762846d81746cec93bfd07c4" and "ce7cd03cb3f920ab63009d10e85e4eb07b614efa" have entirely different histories.
75f1d75cae
...
ce7cd03cb3
@ -15,7 +15,6 @@
|
||||
"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",
|
||||
|
@ -1,28 +1,16 @@
|
||||
import { BailianProvider } from '@kevisual/ai';
|
||||
import { SiliconFlowProvider } 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,
|
||||
// });
|
||||
// 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,
|
||||
export const ai = new SiliconFlowProvider({
|
||||
model: 'Qwen/Qwen3-32B',
|
||||
// model: 'Pro/deepseek-ai/DeepSeek-R1',// 只有充值能用
|
||||
apiKey: config.SILICONFLOW_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',
|
||||
};
|
||||
ai.getUsageInfo()
|
||||
.then((usage) => {
|
||||
console.log('AI usage info:', usage);
|
||||
})
|
||||
.catch((res) => {
|
||||
console.error('Error fetching AI usage info:', res.status);
|
||||
});
|
||||
|
@ -24,7 +24,7 @@ agent
|
||||
content: `
|
||||
你是一个提示词优化的专家,请根据用户提供的提示词进行修正和优化,其中用户的提示词返回的要求如果没有或者不明确,请你都修正为要求返回的文本在500字以内,且内容是纯文本格式,不能是markdown模式,也不包含任何HTML标签或其他格式化内容。
|
||||
|
||||
只对提示词进行优化,并且不需要对内容进行分析或总结。并返回修改后的总的提示词内容。
|
||||
只对提示词进行优化,并且不需要对内容进行分析或总结。
|
||||
|
||||
示例1. 用户提示词
|
||||
<content>总结笔记</content>
|
||||
@ -55,7 +55,6 @@ ${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);
|
||||
|
@ -10,7 +10,7 @@ const main = async () => {
|
||||
path: 'fix',
|
||||
key: 'xhs',
|
||||
payload: {
|
||||
text: text,
|
||||
text: text4,
|
||||
},
|
||||
});
|
||||
console.log('fix xhs res', res.code, 'content', res.body);
|
||||
|
Loading…
x
Reference in New Issue
Block a user