mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:01:08 +02:00
feat(apps): add GPU server fallback to all LLM-using apps
Configure all apps with gpu-llm.mana.how as fallback when MANA_LLM_URL is not set. This ensures apps can use the GPU server's local LLM models (Ollama gemma3, qwen2.5-coder) instead of cloud providers. Apps updated: - Chat: LLM fallback to GPU server - Context: LLM fallback (replaces Azure OpenAI dependency) - NutriPhi: LLM + Vision fallback (replaces Google Gemini for food analysis) - Planta: LLM + Vision fallback (replaces Google Gemini for plant analysis) - ManaDeck: LLM + Vision fallback for card generation - Traces: LLM fallback for AI city guides Vision model default: ollama/gemma3:12b (multimodal, runs on RTX 3090) Added VISION_MODEL to .env.development Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c07987138e
commit
fa16f1fe38
7 changed files with 13 additions and 7 deletions
|
|
@ -24,7 +24,7 @@ PUBLIC_GLITCHTIP_DSN=
|
||||||
# Mana Core Auth Service
|
# Mana Core Auth Service
|
||||||
MANA_CORE_AUTH_URL=http://localhost:3001
|
MANA_CORE_AUTH_URL=http://localhost:3001
|
||||||
# Mana Credits Service
|
# Mana Credits Service
|
||||||
MANA_CREDITS_URL=http://localhost:3060
|
MANA_CREDITS_URL=http://localhost:3061
|
||||||
# Service key for service-to-service communication
|
# Service key for service-to-service communication
|
||||||
MANA_CORE_SERVICE_KEY=dev-service-key-for-bot-sso-2024
|
MANA_CORE_SERVICE_KEY=dev-service-key-for-bot-sso-2024
|
||||||
|
|
||||||
|
|
@ -424,3 +424,6 @@ CITYCORNERS_WEB_PORT=5196
|
||||||
GPU_API_KEY=sk-gpu-cf483ede1e05e28fba5e56c94cd3c24e7c245e57816d3e86
|
GPU_API_KEY=sk-gpu-cf483ede1e05e28fba5e56c94cd3c24e7c245e57816d3e86
|
||||||
GPU_SERVER_URL=https://gpu.mana.how
|
GPU_SERVER_URL=https://gpu.mana.how
|
||||||
GPU_SERVER_LAN_URL=http://192.168.178.11
|
GPU_SERVER_LAN_URL=http://192.168.178.11
|
||||||
|
|
||||||
|
# Vision Model for NutriPhi + Planta (local, replaces Google Gemini)
|
||||||
|
VISION_MODEL=ollama/gemma3:12b
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import { HealthModule } from '@manacore/shared-nestjs-health';
|
||||||
LlmModule.forRootAsync({
|
LlmModule.forRootAsync({
|
||||||
imports: [ConfigModule],
|
imports: [ConfigModule],
|
||||||
useFactory: (configService: ConfigService) => ({
|
useFactory: (configService: ConfigService) => ({
|
||||||
manaLlmUrl: configService.get('MANA_LLM_URL'),
|
manaLlmUrl: configService.get('MANA_LLM_URL') || 'https://gpu-llm.mana.how',
|
||||||
timeout: configService.get<number>('LLM_TIMEOUT', 120000),
|
timeout: configService.get<number>('LLM_TIMEOUT', 120000),
|
||||||
debug: configService.get('NODE_ENV') === 'development',
|
debug: configService.get('NODE_ENV') === 'development',
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ import { HttpExceptionFilter } from './common/http-exception.filter';
|
||||||
LlmModule.forRootAsync({
|
LlmModule.forRootAsync({
|
||||||
imports: [ConfigModule],
|
imports: [ConfigModule],
|
||||||
useFactory: (config: ConfigService) => ({
|
useFactory: (config: ConfigService) => ({
|
||||||
manaLlmUrl: config.get('MANA_LLM_URL'),
|
manaLlmUrl: config.get('MANA_LLM_URL') || 'https://gpu-llm.mana.how',
|
||||||
debug: config.get('NODE_ENV') === 'development',
|
debug: config.get('NODE_ENV') === 'development',
|
||||||
}),
|
}),
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,8 @@ import {
|
||||||
LlmModule.forRootAsync({
|
LlmModule.forRootAsync({
|
||||||
imports: [ConfigModule],
|
imports: [ConfigModule],
|
||||||
useFactory: (config: ConfigService) => ({
|
useFactory: (config: ConfigService) => ({
|
||||||
manaLlmUrl: config.get('MANA_LLM_URL'),
|
manaLlmUrl: config.get('MANA_LLM_URL') || 'https://gpu-llm.mana.how',
|
||||||
|
defaultVisionModel: config.get('VISION_MODEL') || 'ollama/gemma3:12b',
|
||||||
debug: config.get('NODE_ENV') === 'development',
|
debug: config.get('NODE_ENV') === 'development',
|
||||||
}),
|
}),
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,8 @@ import { RecommendationsModule } from './recommendations/recommendations.module'
|
||||||
LlmModule.forRootAsync({
|
LlmModule.forRootAsync({
|
||||||
imports: [ConfigModule],
|
imports: [ConfigModule],
|
||||||
useFactory: (config: ConfigService) => ({
|
useFactory: (config: ConfigService) => ({
|
||||||
manaLlmUrl: config.get('MANA_LLM_URL'),
|
manaLlmUrl: config.get('MANA_LLM_URL') || 'https://gpu-llm.mana.how',
|
||||||
|
defaultVisionModel: config.get('VISION_MODEL') || 'ollama/gemma3:12b',
|
||||||
debug: config.get('NODE_ENV') === 'development',
|
debug: config.get('NODE_ENV') === 'development',
|
||||||
}),
|
}),
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@ import { WateringModule } from './watering/watering.module';
|
||||||
LlmModule.forRootAsync({
|
LlmModule.forRootAsync({
|
||||||
imports: [ConfigModule],
|
imports: [ConfigModule],
|
||||||
useFactory: (config: ConfigService) => ({
|
useFactory: (config: ConfigService) => ({
|
||||||
manaLlmUrl: config.get('MANA_LLM_URL'),
|
manaLlmUrl: config.get('MANA_LLM_URL') || 'https://gpu-llm.mana.how',
|
||||||
|
defaultVisionModel: config.get('VISION_MODEL') || 'ollama/gemma3:12b',
|
||||||
debug: config.get('NODE_ENV') === 'development',
|
debug: config.get('NODE_ENV') === 'development',
|
||||||
}),
|
}),
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ import { GuideModule } from './guide/guide.module';
|
||||||
LlmModule.forRootAsync({
|
LlmModule.forRootAsync({
|
||||||
imports: [ConfigModule],
|
imports: [ConfigModule],
|
||||||
useFactory: (config: ConfigService) => ({
|
useFactory: (config: ConfigService) => ({
|
||||||
manaLlmUrl: config.get('MANA_LLM_URL'),
|
manaLlmUrl: config.get('MANA_LLM_URL') || 'https://gpu-llm.mana.how',
|
||||||
debug: config.get('NODE_ENV') === 'development',
|
debug: config.get('NODE_ENV') === 'development',
|
||||||
}),
|
}),
|
||||||
inject: [ConfigService],
|
inject: [ConfigService],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue