mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 19:26:42 +02:00
- NestJS-based Telegram bot with nestjs-telegraf - Ollama service for API communication with Gemma 3 4B - Commands: /start, /help, /models, /model, /mode, /clear, /status - Multiple modes: default, classify, summarize, translate, code - Chat history with context (last 10 messages) - User access control via TELEGRAM_ALLOWED_USERS - Health endpoint for monitoring - Updated MAC_MINI_SERVER.md with Ollama documentation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
19 lines
650 B
TypeScript
19 lines
650 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { Logger } from '@nestjs/common';
|
|
import { ConfigService } from '@nestjs/config';
|
|
import { AppModule } from './app.module';
|
|
|
|
async function bootstrap() {
|
|
const logger = new Logger('Bootstrap');
|
|
const app = await NestFactory.create(AppModule);
|
|
|
|
const configService = app.get(ConfigService);
|
|
const port = configService.get<number>('port') || 3301;
|
|
|
|
await app.listen(port);
|
|
logger.log(`Telegram Ollama Bot running on port ${port}`);
|
|
logger.log(`Ollama URL: ${configService.get<string>('ollama.url')}`);
|
|
logger.log(`Default model: ${configService.get<string>('ollama.model')}`);
|
|
}
|
|
|
|
bootstrap();
|