Package io.jmix.aitools.dataload
Interface AiDataLoadService
- All Known Implementing Classes:
AiDataLoadServiceImpl
public interface AiDataLoadService
Entry point of the LLM-powered natural-language data-load flow. Supports two modes:
-
conversational -
send(java.lang.String)/stream(java.lang.String)let the LLM answer free-form questions about the application's data and return a natural-language reply; -
data loading -
loadData(java.lang.String)generates a JPQL query for the user's request, executes it and returns the structuredEntityDataLoadResult.
conversationId run statelessly and do not persist chat history.-
Method Summary
Modifier and TypeMethodDescriptionGenerates a JPQL query for the given natural-language request, executes it and returns the structured result (query draft, validation, rows).@Nullable StringSends a stateless message to the data-load chat and blocks until the full reply is produced.reactor.core.publisher.Flux<String> Streams a stateless reply to the data-load chat as a flux of text chunks.
-
Method Details
-
send
Sends a stateless message to the data-load chat and blocks until the full reply is produced. Chat history is not persisted.- Parameters:
message- user message in natural language- Returns:
- natural-language reply from the LLM
-
stream
Streams a stateless reply to the data-load chat as a flux of text chunks. Chat history is not persisted.- Parameters:
message- user message in natural language- Returns:
- flux emitting reply chunks in order
-
loadData
Generates a JPQL query for the given natural-language request, executes it and returns the structured result (query draft, validation, rows). Runs statelessly without persisting chat history.- Parameters:
userText- user request in natural language- Returns:
- result containing the generated query, its validation and the fetched rows
-