Package-level declarations

Types

Link copied to clipboard
class HashEmbeddingProvider(val dimensions: Int = 256) : EmbeddingProvider
Link copied to clipboard
data class ProviderEndpointResponse(val provider: String, val requestCount: Long, val successCount: Long, val failureCount: Long, val retryCount: Long, val circuitOpenCount: Long, val avgLatencyMillis: Double, val p95LatencyMillis: Double, val circuitOpen: Boolean, val lastError: String?)
Link copied to clipboard
data class ProviderScopeResponse(val scope: String, val requestCount: Long, val successCount: Long, val failureCount: Long, val retryCount: Long, val circuitOpenCount: Long, val avgLatencyMillis: Double, val p95LatencyMillis: Double)
Link copied to clipboard
data class ProviderTelemetryResponse(val requestCount: Long, val successCount: Long, val failureCount: Long, val retryCount: Long, val circuitOpenCount: Long, val avgLatencyMillis: Double, val p95LatencyMillis: Double, val endpoints: List<ProviderEndpointResponse>, val tenantScopes: List<ProviderScopeResponse>, val commandScopes: List<ProviderScopeResponse>)
Link copied to clipboard
data class RagAdminAccessAuditEntry(val id: String, val timestampEpochMillis: Long, val path: String, val method: String, val role: String?, val granted: Boolean, val message: String?)
Link copied to clipboard
data class RagAdminAccessContext(val enabled: Boolean, val tokenPresent: Boolean, val role: String?, val allowedFeatures: Set<String>)
Link copied to clipboard
data class RagAdminAccessSecurityResponse(val securityEnabled: Boolean, val currentRole: String?, val tokenHeaderName: String, val tokenQueryParameter: String, val featureRoles: Map<String, List<String>>, val recentAccessAudits: List<RagAdminAccessAuditEntry>)
Link copied to clipboard
@RestController
@RequestMapping(value = ["${rag.admin.api-base-path:/api/rag/admin}"])
class RagAdminApiController(engine: RagEngine, properties: RagProperties, ragConfig: RagConfig, embeddingProvider: EmbeddingProvider, adminService: RagAdminService, securityService: RagAdminSecurityService)
Link copied to clipboard
data class RagAdminApiErrorResponse(val code: String, val message: String)
Link copied to clipboard
@AutoConfiguration(after = [RagAutoConfiguration::class])
@ConditionalOnClass(name = ["org.springframework.web.servlet.DispatcherServlet"])
@ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET)
@ConditionalOnBean(value = [RagEngine::class])
@ConditionalOnProperty(prefix = "rag.admin", name = ["enabled"], havingValue = "true", matchIfMissing = true)
@EnableConfigurationProperties(value = [RagAdminProperties::class])
class RagAdminAutoConfiguration
Link copied to clipboard
data class RagAdminBulkDeleteRequest(val tenantId: String, val docIds: List<String>)
Link copied to clipboard
data class RagAdminBulkItemResult(val docId: String, val success: Boolean, val message: String)
Link copied to clipboard
data class RagAdminBulkMetadataPatchRequest(val tenantId: String, val docIds: List<String>, val metadata: Map<String, String>)
Link copied to clipboard
data class RagAdminBulkOperationResponse(val operation: String, val successCount: Int, val failureCount: Int, val results: List<RagAdminBulkItemResult>)
Link copied to clipboard
data class RagAdminBulkTextDocument(val docId: String, val text: String, val acl: List<String>, val metadata: Map<String, String> = emptyMap(), val sourceUri: String? = null, val page: Int? = null, val pageMarkers: List<RagAdminPageMarkerRequest>? = null)
Link copied to clipboard
data class RagAdminBulkTextIngestRequest(val tenantId: String, val documents: List<RagAdminBulkTextDocument>)
Link copied to clipboard
data class RagAdminConfigInspectorResponse(val rag: Map<String, Any?>, val admin: Map<String, Any?>)
Link copied to clipboard
data class RagAdminDocumentChunk(val chunkId: String, val contentKind: String, val page: Int?, val sourceUri: String?, val offsetStart: Int?, val offsetEnd: Int?, val text: String?, val metadata: Map<String, String>)
Link copied to clipboard
data class RagAdminDocumentDetail(val tenantId: String, val docId: String, val metadata: Map<String, String>, val acl: List<String>, val sourceUris: List<String>, val chunkCount: Int, val lastUpdatedEpochMillis: Long, val lastUpdatedIso: String?, val chunks: List<RagAdminDocumentChunk>)
Link copied to clipboard
data class RagAdminDocumentListResponse(val totalCount: Int, val items: List<RagAdminDocumentSummary>)
Link copied to clipboard
data class RagAdminDocumentReindexRequest(val text: String? = null, val sourceUri: String? = null, val metadata: Map<String, String>? = null, val acl: List<String>? = null, val charset: String = "UTF-8")
Link copied to clipboard
data class RagAdminDocumentSummary(val tenantId: String, val docId: String, val chunkCount: Int, val metadata: Map<String, String>, val acl: List<String>, val sourceUris: List<String>, val contentKinds: List<String>, val pages: List<Int>, val previewText: String?, val lastUpdatedEpochMillis: Long, val lastUpdatedIso: String?)
Link copied to clipboard
@RestControllerAdvice(assignableTypes = [RagAdminApiController::class])
class RagAdminExceptionHandler
Link copied to clipboard
data class RagAdminIngestRequest(val tenantId: String, val docId: String, val text: String, val acl: List<String>, val metadata: Map<String, String> = emptyMap(), val sourceUri: String? = null, val page: Int? = null, val pageMarkers: List<RagAdminPageMarkerRequest>? = null)
Link copied to clipboard
data class RagAdminIngestResponse(val status: String, val tenantId: String, val docId: String)
Link copied to clipboard
data class RagAdminJobHistoryEntry(val id: String, val timestampEpochMillis: Long, val jobType: String, val tenantId: String?, val role: String?, val status: String, val description: String, val payload: Map<String, Any?>, val retryKind: String? = null, val retrySupported: Boolean = false, val message: String? = null, val completedAtEpochMillis: Long? = null)
Link copied to clipboard
data class RagAdminOperationResponse(val operation: String, val success: Boolean, val message: String, val affectedCount: Int = 0, val tenantId: String? = null, val snapshots: List<RagAdminSnapshotSummary> = emptyList())
Link copied to clipboard
data class RagAdminPageMarkerRequest(val page: Int, val offsetStart: Int, val offsetEnd: Int)
Link copied to clipboard
@ConfigurationProperties(prefix = "rag.admin")
data class RagAdminProperties(val enabled: Boolean = true, val basePath: String = "/rag-admin", val apiBasePath: String = "/api/rag/admin", val defaultRecentProviderWindowMillis: Long, val historyMaxEntries: Int = 200, val providerHistoryMaxEntries: Int = 240, val providerHistorySampleIntervalMillis: Long = 0, val security: RagAdminSecurityProperties = RagAdminSecurityProperties())
Link copied to clipboard
data class RagAdminProviderFallbackAuditEntry(val timestampEpochMillis: Long, val tenantId: String, val query: String, val role: String?, val providerFallbackReason: String?, val providersUsed: List<String>)
Link copied to clipboard
data class RagAdminProviderHealthResponse(val providerTelemetry: ProviderTelemetryResponse, val recentProviderWindowMillis: Long? = null, val recentProviderTelemetry: ProviderTelemetryResponse? = null)
Link copied to clipboard
data class RagAdminProviderHistoryEntry(val timestampEpochMillis: Long, val source: String, val telemetry: ProviderTelemetryResponse)
Link copied to clipboard
data class RagAdminSearchAuditEntry(val id: String, val timestampEpochMillis: Long, val auditType: String, val tenantId: String, val principals: List<String>, val query: String, val topK: Int, val filter: Map<String, String>, val resultCount: Int, val role: String?, val executedQuery: String, val queryRewriteApplied: Boolean, val correctiveRetryApplied: Boolean, val providerFallbackApplied: Boolean, val providerFallbackReason: String?, val providersUsed: List<String>, val notes: List<String>)
Link copied to clipboard
data class RagAdminSearchDiagnosticsResponse(val tenantId: String, val query: String, val tenantDocs: Int, val lexicalMatchesWithoutAcl: Int, val vectorMatchesWithoutAcl: Int, val lexicalMatchesWithAcl: Int, val vectorMatchesWithAcl: Int, val lexicalSampleDocIdsWithoutAcl: List<String>, val vectorSampleDocIdsWithoutAcl: List<String>, val lexicalSampleDocIdsWithAcl: List<String>, val vectorSampleDocIdsWithAcl: List<String>, val telemetry: RagAdminSearchTelemetryResponse, val providerTelemetry: ProviderTelemetryResponse, val recentProviderWindowMillis: Long? = null, val recentProviderTelemetry: ProviderTelemetryResponse? = null)
Link copied to clipboard
data class RagAdminSearchHitResponse(val docId: String, val chunkId: String, val score: Double, val text: String?, val contentKind: String, val page: Int?, val sourceUri: String?, val offsetStart: Int?, val offsetEnd: Int?, val metadata: Map<String, String>)
Link copied to clipboard
data class RagAdminSearchRequest(val tenantId: String, val principals: List<String>, val query: String, val topK: Int = 8, val filter: Map<String, String> = emptyMap(), val providerHealthDetail: Boolean = true, val recentProviderWindowMillis: Long? = null, val diagnosticScoreThreshold: Double = Double.NEGATIVE_INFINITY, val diagnosticMaxSamples: Int = 5)
Link copied to clipboard
data class RagAdminSearchResponse(val tenantId: String, val query: String, val hits: List<RagAdminSearchHitResponse>, val telemetry: RagAdminSearchTelemetryResponse, val providerTelemetry: ProviderTelemetryResponse, val recentProviderWindowMillis: Long? = null, val recentProviderTelemetry: ProviderTelemetryResponse? = null)
Link copied to clipboard
data class RagAdminSearchTelemetryResponse(val executedQuery: String, val originalQuery: String, val queryRewriterType: String?, val queryRewriteApplied: Boolean, val correctiveRetryApplied: Boolean, val initialConfidence: Double?, val finalConfidence: Double?, val rerankerType: String?, val summaryCandidatesUsed: Boolean, val providerFallbackApplied: Boolean, val providerFallbackReason: String?, val providersUsed: List<String>, val notes: List<String>)
Link copied to clipboard
class RagAdminSecurityInterceptor(properties: RagAdminProperties, securityService: RagAdminSecurityService, adminService: RagAdminService) : HandlerInterceptor
Link copied to clipboard
data class RagAdminSecurityProperties(val enabled: Boolean = false, val tokenHeaderName: String = "X-Rag-Admin-Token", val tokenQueryParameter: String = "access_token", val tokens: Map<String, String> = emptyMap(), val featureRoles: Map<String, List<String>> = defaultFeatureRoles())
Link copied to clipboard
Link copied to clipboard
class RagAdminService(engine: RagEngine, properties: RagProperties, adminProperties: RagAdminProperties, ragConfig: RagConfig, embeddingProvider: EmbeddingProvider)
Link copied to clipboard
data class RagAdminSnapshotSummary(val tag: String, val updatedAtEpochMillis: Long, val updatedAtIso: String)
Link copied to clipboard
data class RagAdminSourcePreviewResponse(val tenantId: String, val docId: String, val chunkId: String, val sourceUri: String?, val offsetStart: Int?, val offsetEnd: Int?, val preview: String)
Link copied to clipboard
data class RagAdminStatsResponse(val tenantId: String?, val docs: Long, val chunks: Long, val snapshotCount: Int, val indexSizeBytes: Long, val lastCommitEpochMillis: Long?, val lastCommitIso: String?, val statsCacheEntries: Int, val statsCacheHitCount: Long, val statsCacheMissCount: Long, val statsCacheEvictionCount: Long, val statsCacheExpiredCount: Long, val statsCacheHitRatePct: Double, val statsCacheTtlMillis: Long, val statsCacheMaxEntries: Int, val statsCacheMaxEntriesPerTenant: Int, val statsCachePersistenceMode: String, val providerTelemetry: ProviderTelemetryResponse, val recentProviderWindowMillis: Long? = null, val recentProviderTelemetry: ProviderTelemetryResponse? = null)
Link copied to clipboard
data class RagAdminTenantDetail(val tenantId: String, val docs: Long, val chunks: Long, val lastCommitEpochMillis: Long?, val lastCommitIso: String?, val snapshots: List<RagAdminSnapshotSummary>, val documents: List<RagAdminDocumentSummary>)
Link copied to clipboard
Link copied to clipboard
data class RagAdminTenantSummary(val tenantId: String, val docs: Long, val chunks: Long, val lastUpdatedEpochMillis: Long, val lastUpdatedIso: String?)
Link copied to clipboard
@Controller
class RagAdminUiController(properties: RagAdminProperties, securityService: RagAdminSecurityService)
Link copied to clipboard
class RagAdminWebMvcConfiguration(properties: RagAdminProperties, interceptor: RagAdminSecurityInterceptor) : WebMvcConfigurer
Link copied to clipboard
@AutoConfiguration
@EnableConfigurationProperties(value = [RagProperties::class])
class RagAutoConfiguration
Link copied to clipboard
@ConfigurationProperties(prefix = "rag")
data class RagProperties(val indexPath: String = "./rag-index", val storeChunkText: Boolean = true, val uploadMaxBytes: Long = 10 * 1024 * 1024, val uploadAllowedContentTypes: List<String> = listOf( "text/plain", "application/pdf", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.presentationml.presentation" ), val sourceLoadTimeoutMillis: Long, val sourceLoadAllowHosts: List<String> = emptyList(), val sourceLoadAuthHeaders: Map<String, String> = emptyMap(), val sourceLoadInsecureSkipTlsVerify: Boolean = false, val sourceLoadCustomCaCertPath: String? = null, val sourceLoadDefaultProfile: String? = null, val sourceLoadProfiles: Map<String, SourceLoadProfile> = emptyMap(), val statsCacheTtlMillis: Long, val statsCacheMaxEntries: Int = 32, val statsCacheMaxEntriesPerTenant: Int = 4, val contextualRetrievalEnabled: Boolean = true, val contextualIncludeDocId: Boolean = true, val contextualIncludeMetadataContext: Boolean = true, val contextualMaxDocumentSummaryChars: Int = 240, val rerankerEnabled: Boolean = true, val rerankerType: String = "heuristic", val rerankerTopN: Int = 24, val rerankerAlpha: Double = 0.65, val rerankerApiBaseUrl: String = "https://api.cohere.com", val rerankerApiKey: String? = null, val rerankerModel: String = "rerank-v3.5", val rerankerRequestTimeoutMillis: Long, val rerankerOnnxQueryInputName: String? = null, val rerankerOnnxDocumentInputName: String? = null, val rerankerOnnxOutputName: String? = null, val rerankerOnnxExpectedDimensions: Int = 0, val rerankerOnnxExpectedInputSchema: String? = null, val rerankerOnnxExpectedTokenizer: String? = null, val rerankerOnnxExpectedScoreSemantics: String? = null, val rerankerOnnxExpectedTokenizerVocabChecksum: String? = null, val rerankerOnnxTokenizerSchemaChecksum: String? = null, val rerankerOnnxModelContractChecksum: String? = null, val correctiveRetrievalEnabled: Boolean = true, val correctiveMinConfidence: Double = 0.08, val correctiveMinResultsBeforeSkip: Int = 3, val correctiveExpandedCandidateMultiplier: Int = 2, val queryRewriteEnabled: Boolean = true, val queryRewriterType: String = "heuristic", val queryRewriteApiBaseUrl: String = "https://api.openai.com/v1", val queryRewriteApiKey: String? = null, val queryRewriteModel: String = "gpt-4o-mini", val queryRewriteRequestTimeoutMillis: Long, val hierarchicalSummariesEnabled: Boolean = true, val hierarchicalMaxSectionSummaries: Int = 4, val hierarchicalMaxSummaryChars: Int = 280, val hierarchicalTargetChunksPerSection: Int = 3, val summarizerType: String = "rule-based", val summarizerApiBaseUrl: String = "https://api.openai.com/v1", val summarizerApiKey: String? = null, val summarizerModel: String = "gpt-4o-mini", val summarizerRequestTimeoutMillis: Long, val statsCacheStoreType: String = "memory", val statsCacheFilePath: String? = null, val statsCacheFileMaxBytes: Long = 0, val statsCacheFileRotateCount: Int = 2, val statsCacheFileCleanupOnStart: Boolean = false, val providerHealthAutoExportPath: String? = null, val providerHealthAutoExportIntervalMillis: Long = 0, val providerHealthAutoExportWindowMillis: Long? = null, val providerHealthAutoExportFormat: String = "json", val providerHealthAutoExportRetainCount: Int = 5, val providerHealthAutoExportIncludeScopeSuffix: Boolean = false, val providerHealthAutoExportPushUrl: String? = null, val providerHealthAutoExportPushFormat: String = "json", val providerHealthAutoExportPushTimeoutMillis: Long, val providerHealthAutoExportPushHeaders: Map<String, String> = emptyMap(), val providerHealthAutoExportPushMaxRetries: Int = 2, val providerHealthAutoExportPushRetryBackoffMillis: Long = 250, val providerHealthAutoExportPushDeadLetterPath: String? = null, val providerHealthAutoExportPushDeadLetterRetainCount: Int = 5, val providerHealthAutoExportPushAsyncEnabled: Boolean = false, val providerHealthAutoExportPushQueueCapacity: Int = 32, val providerHealthAutoExportPushDropOldestOnOverflow: Boolean = true, val providerHealthAutoExportPushHmacSecret: String? = null, val providerHealthAutoExportPushHmacHeaderName: String = "X-Rag-Signature", val providerHealthAutoExportPushTimestampHeaderName: String = "X-Rag-Timestamp", val chunkerType: String = "basic", val basicMaxChars: Int = 1800, val basicOverlapChars: Int = 200, val slidingWindowSize: Int = 240, val slidingOverlap: Int = 40, val adaptiveSectionRegex: String = com.ainsoft.rag.chunking.Chunkers.DEFAULT_ADAPTIVE_SECTION_REGEX, val adaptiveMinChunkSize: Int = 200, val adaptiveMaxChunkSize: Int = 1000, val regexSplitPattern: String = "(?m)^##?", val regexGroupByPattern: String? = null, val embeddingDimensions: Int = 256, val embeddingProvider: String = "hash", val openAiApiKey: String? = null, val openAiModel: String = "text-embedding-3-small", val openAiBaseUrl: String = "https://api.openai.com/v1")
Link copied to clipboard
data class SourceLoadProfile(val timeoutMillis: Long? = null, val allowHosts: List<String>? = null, val authHeaders: Map<String, String>? = null, val insecureSkipTlsVerify: Boolean? = null, val customCaCertPath: String? = null)