import { AbstractAiIntegrationConfiguration } from "./AbstractAiIntegrationConfiguration.js"; import { GenAiTransformation } from "./GenAiTransformation.js"; import { AiAgentToolQuery } from "./Agents/AiAgentToolQuery.js"; import { DocumentConventions } from "../../Conventions/DocumentConventions.js"; import { EtlType } from "../Etl/ConnectionString.js"; /** * Configuration for a GenAI ETL task. * GenAI ETL monitors a collection, applies transformations, sends context to AI models, * and updates documents based on AI responses. */ export declare class GenAiConfiguration extends AbstractAiIntegrationConfiguration { /** * Unique normalized identifier for this GenAI task. * Must be lowercase, alphanumeric with hyphens only. */ identifier: string; /** * The collection to monitor for changes. */ collection: string; /** * The transformation script that extracts context from documents. */ genAiTransformation: GenAiTransformation; /** * The prompt template to send to the AI model. * Can include placeholders for context data. */ prompt: string; /** * JSON schema defining the expected structure of AI responses. * Either this or sampleObject must be provided. */ jsonSchema?: string; /** * Sample JSON object showing the expected structure of AI responses. * Either this or jsonSchema must be provided. */ sampleObject?: string; /** * JavaScript function to update documents based on AI responses. * Should have signature: function update(doc, result) { ... return doc; } */ updateScript: string; /** * Maximum number of documents to process concurrently. * @default 4 */ maxConcurrency: number; /** * Array of tool queries that the AI agent can use to query the database. */ queries: AiAgentToolQuery[]; /** * Enable detailed tracing of AI interactions. */ enableTracing: boolean; /** * Time in seconds after which generated context expires. */ expirationInSec?: number; /** * Gets the ETL type for this configuration. */ get etlType(): EtlType; /** * Gets the destination identifier for this ETL task. */ getDestination(): string; /** * Gets the default task name (same as identifier). */ getDefaultTaskName(): string; /** * Generates a normalized identifier from the configuration name. * @returns A normalized identifier string */ generateIdentifier(): string; /** * Validates the GenAI configuration. * @param options.validateName Whether to validate the name field (default: true) * @param options.validateConnection Whether to validate the connection string (default: true) * @param options.validateIdentifier Whether to validate the identifier (default: true) * @returns Array of validation error messages (empty if valid) */ validate(options?: { validateName?: boolean; validateConnection?: boolean; validateIdentifier?: boolean; }): string[]; serialize(conventions: DocumentConventions): object; /** * Checks if this configuration uses encrypted communication. * @returns true if the connection uses encryption, false otherwise */ usingEncryptedCommunicationChannel(): boolean; private _serializeQuery; private _serializeGenAiTransformation; } //# sourceMappingURL=GenAiConfiguration.d.ts.map