IncrementalPropositionExtraction

open class IncrementalPropositionExtraction constructor(propositionPipeline: PropositionPipeline, chunkHistoryStore: ChunkHistoryStore, dataDictionary: <Error class: unknown class>, relations: Relations, propositionRepository: PropositionRepository, entityRepository: <Error class: unknown class>, entityResolver: EntityResolver, graphProjectionService: GraphProjectionService, properties: PropositionExtractionProperties, contextIdProvider: Function<<Error class: unknown class>, String> = Function { it.id }, promptVariablesProvider: Function<<Error class: unknown class>, Map<String, Any>> = Function { emptyMap() }, extraKnownEntitiesProvider: (<Error class: unknown class>, String) -> List<<Error class: unknown class>> = { _, _ -> emptyList() }, groundingWiringService: GroundingWiringService? = null, currentUserAliasesProvider: (<Error class: unknown class>) -> List<String> = { _ -> emptyList() }, mintNewEntitiesDefault: Boolean = false, mintedEntityPropertiesProvider: (<Error class: unknown class>) -> Map<String, Any> = { _ -> emptyMap() })

Generic async proposition extraction from incremental sources (conversations, message streams, etc.). Uses IncrementalAnalyzer for windowed, deduplicated processing.

This is NOT a Spring component — consuming applications create it as a @Bean so that @EventListener and @Async are honoured by the Spring container.

Parameters

contextIdProvider

maps the event's NamedEntity user to the context ID used for proposition storage. Defaults to NamedEntity.getId.

promptVariablesProvider

optional function to add extra template variables to the SourceAnalysisContext built for each extraction.

Constructors

Link copied to clipboard
constructor(propositionPipeline: PropositionPipeline, chunkHistoryStore: ChunkHistoryStore, dataDictionary: <Error class: unknown class>, relations: Relations, propositionRepository: PropositionRepository, entityRepository: <Error class: unknown class>, entityResolver: EntityResolver, graphProjectionService: GraphProjectionService, properties: PropositionExtractionProperties, contextIdProvider: Function<<Error class: unknown class>, String> = Function { it.id }, promptVariablesProvider: Function<<Error class: unknown class>, Map<String, Any>> = Function { emptyMap() }, extraKnownEntitiesProvider: (<Error class: unknown class>, String) -> List<<Error class: unknown class>> = { _, _ -> emptyList() }, groundingWiringService: GroundingWiringService? = null, currentUserAliasesProvider: (<Error class: unknown class>) -> List<String> = { _ -> emptyList() }, mintNewEntitiesDefault: Boolean = false, mintedEntityPropertiesProvider: (<Error class: unknown class>) -> Map<String, Any> = { _ -> emptyMap() })

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val isIdle: Boolean

Returns true when no extraction is running, no events are queued, and no events are in-flight (in Spring's async executor queue).

Functions

Link copied to clipboard
Link copied to clipboard
open fun rememberFile(inputStream: InputStream, filename: String, user: <Error class: unknown class>)

Extract propositions from a file via Tika and persist them. Requires embabel-agent-rag-tika on the classpath.

open fun rememberFile(inputStream: InputStream, filename: String, user: <Error class: unknown class>, request: ExtractionRequest)

Extract propositions from a file via Tika, on the terms the request sets — the source it was read from, the revision of that source, the content profile it runs under, the extraction run it belongs to.

Link copied to clipboard
open fun rememberText(text: String, sourceId: String, user: <Error class: unknown class>, additionalGrounding: List<String> = emptyList(), perspective: ExtractionPerspective? = null, mintNewEntities: Boolean? = null)

Extract propositions from raw text and persist them.

open fun rememberText(text: String, sourceId: String, user: <Error class: unknown class>, additionalGrounding: List<String>, perspective: ExtractionPerspective?, mintNewEntities: Boolean?, request: ExtractionRequest)

Extract propositions from raw text on the terms the request sets — the source it was read from, the revision of that source, the content profile it runs under, the extraction run it belongs to.

Link copied to clipboard

Synchronous listener — runs on the publisher's thread during publishEvent(). Increments the in-flight counter BEFORE the async handler is dispatched, so isIdle can see events that are in Spring's executor queue.

Link copied to clipboard

Binds the store that records which extraction run produced which claims, and returns this extractor so a bean method can do it in one expression.

Binds the lineage store and says what happens when a lineage write cannot be made.