mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-14 00:01:03 +00:00
aa84d71302
MailReadService sends one mail as one document: its subject, body and up to three attachments inside data tags the prompt calls untrusted, with the person's trips under references made up for the call. Answers keep only offered trip references and known field names. BookingImportService reads a mail's machine-readable parts and maps an AI reading to booking items.
35 lines
1.8 KiB
TypeScript
35 lines
1.8 KiB
TypeScript
import { Addons } from '../../db/entities/Addons.entity';
|
|
import { AddonsModule } from '../addons/addons.module';
|
|
import { AppConfigModule } from '../app-config/app-config.module';
|
|
import { SettingsModule } from '../settings/settings.module';
|
|
import { LlmCapabilitiesController } from './llm-capabilities.controller';
|
|
import { LlmConfigResolver } from './llm-config.resolver';
|
|
import { LlmLocalController } from './llm-local.controller';
|
|
import { LlmLocalService } from './llm-local.service';
|
|
import { LlmParseService } from './llm-parse.service';
|
|
import { MailReadService } from './mail-read.service';
|
|
import { MikroOrmModule } from '@mikro-orm/nestjs';
|
|
import { Module } from '@nestjs/common';
|
|
|
|
/**
|
|
* Provides the LLM booking-import fallback; imported by BookingImportModule.
|
|
* Exports MailReadService for the booking mail import (MailIngestModule).
|
|
* Exports LlmConfigResolver for the plugin host surface (HostSurfaceRpc), and
|
|
* LlmLocalService for the AI assistant, which lists a custom server's models
|
|
* the same way the admin screen does.
|
|
*
|
|
* MikroOrmModule.forFeature([Addons]): Plan 4 Task 1 —
|
|
* `LlmConfigResolver.readInstanceConfig`'s own `AddonsRepository`
|
|
* `@InjectRepository` param. `AddonsModule` already registers `Addons` for
|
|
* its own `AddonsService`, but does not export `MikroOrmModule` from its own
|
|
* `exports` list, so this module needs its own `forFeature` registration —
|
|
* the same leaf-module pattern `public-api.module.ts` documents.
|
|
*/
|
|
@Module({
|
|
imports: [AppConfigModule, SettingsModule, AddonsModule, MikroOrmModule.forFeature([Addons])],
|
|
controllers: [LlmLocalController, LlmCapabilitiesController],
|
|
providers: [LlmParseService, LlmLocalService, LlmConfigResolver, MailReadService],
|
|
exports: [LlmParseService, LlmConfigResolver, LlmLocalService, MailReadService],
|
|
})
|
|
export class LlmParseModule {}
|