This commit is contained in:
2025-12-03 16:40:46 +08:00
parent 31bc2a5576
commit 98f68fe300
6 changed files with 62 additions and 42 deletions

View File

@@ -5,6 +5,8 @@ import * as sequelizeLib from './modules/sequelize.ts';
import { useContextKey } from '@kevisual/context';
import { SimpleRouter } from '@kevisual/router/simple';
import { OssBase } from '@kevisual/oss/services';
import { BailianProvider } from '@kevisual/ai';
export const router = useContextKey('router', () => new SimpleRouter());
export const runtime = useContextKey('runtime', () => {
return {
@@ -41,3 +43,10 @@ const init = () => {
});
};
export const app = useContextKey('app', init);
export const ai = useContextKey('ai', () => {
return new BailianProvider({
apiKey: process.env.BAILIAN_API_KEY || '',
model: 'qwen-turbo',
});
});