feat(ingestion): analyse ingested files with the language model of the tenant #64
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/38-ingestion-analysis"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #38 (step 4b, second part: the analysis)
Model of a tenant (
src/instance/tenant-model.ts, per-tenant resource)own: provider and model of the tenant, key read from the sealed secretai.keyinside its scope on each call, address checked against local and private networks before each call. Gemini through@quatrain/ai-gemini, the others through the OpenAI-compatible adapter.instance: the model of the instance configuration, for a tenant an instance administrator granted it; each call is traced in the log until the usage log of step 5.none: no analysis.Analysis (
src/instance/document-analysis.ts)pdf-parse), text, Markdown, HTML; DOCX, ODT, EPUB are not read yet (bare record).extracts/sha256/<hash>.txt, in the private storage.Record written (
TenantIngestion.process)creators,publisher,year,isbn,doion the source, besidefile_name.unknown).Analysed-by: <provider>/<model>. A failing model leaves the bare record, logged.Docs: section 10 of
docs/MULTI-TENANCY.md(EN, FR). Dialog note updated.Checks:
yarn test255/255 (10 new: record from the analysis, extract stored, body free of the text, failing model, answer checking, prompt, models own/instance/none).yarn buildpasses.tsc --noEmit: the same 11 errors as ondevelop. Not tried against a real model.🤖 Generated with Claude Code