mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-24 03:16:44 +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>
21 lines
532 B
TypeScript
21 lines
532 B
TypeScript
import { Controller, Get } from '@nestjs/common';
|
|
import { OllamaService } from './ollama/ollama.service';
|
|
|
|
@Controller()
|
|
export class HealthController {
|
|
constructor(private readonly ollamaService: OllamaService) {}
|
|
|
|
@Get('health')
|
|
async health() {
|
|
const ollamaConnected = await this.ollamaService.checkConnection();
|
|
|
|
return {
|
|
status: ollamaConnected ? 'ok' : 'degraded',
|
|
timestamp: new Date().toISOString(),
|
|
ollama: {
|
|
connected: ollamaConnected,
|
|
model: this.ollamaService.getDefaultModel(),
|
|
},
|
|
};
|
|
}
|
|
}
|