M5 AP-001 Parsebares KI-Antwortmodell ergänzt und Meilenstein-Bezüge
entfernt
This commit is contained in:
@@ -40,8 +40,6 @@ import de.gecheckt.pdf.umbenenner.domain.model.AiRequestRepresentation;
|
||||
* Completions API or a compatible endpoint. The {@code AiRequestRepresentation}
|
||||
* contains the prompt and document text; the adapter is responsible for formatting
|
||||
* these as needed (e.g., system message + user message in the Chat API).
|
||||
*
|
||||
* @since M5
|
||||
*/
|
||||
public interface AiInvocationPort {
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ package de.gecheckt.pdf.umbenenner.application.port.out;
|
||||
* was sent and a response was received, but the response content may still be unparseable
|
||||
* or semantically invalid. This is crucial for retry logic: a technical HTTP success
|
||||
* with unparseable JSON is different from a timeout or network error.
|
||||
*
|
||||
* @since M5
|
||||
*/
|
||||
public sealed interface AiInvocationResult
|
||||
permits AiInvocationSuccess, AiInvocationTechnicalFailure {
|
||||
|
||||
@@ -32,8 +32,6 @@ import java.util.Objects;
|
||||
*
|
||||
* @param request the AI request that was sent; never null
|
||||
* @param rawResponse the uninterpreted response body; never null (but may be empty)
|
||||
*
|
||||
* @since M5
|
||||
*/
|
||||
public record AiInvocationSuccess(
|
||||
AiRequestRepresentation request,
|
||||
|
||||
@@ -32,8 +32,6 @@ import java.util.Objects;
|
||||
* never null
|
||||
* @param failureReason classification of the error type; never null (may be empty)
|
||||
* @param failureMessage human-readable error description; never null (may be empty)
|
||||
*
|
||||
* @since M5
|
||||
*/
|
||||
public record AiInvocationTechnicalFailure(
|
||||
AiRequestRepresentation request,
|
||||
|
||||
@@ -22,8 +22,6 @@ import java.util.Objects;
|
||||
*
|
||||
* @param failureReason classification of the failure (non-null, may be empty)
|
||||
* @param failureMessage human-readable failure description (non-null, may be empty)
|
||||
*
|
||||
* @since M5
|
||||
*/
|
||||
public record PromptLoadingFailure(
|
||||
String failureReason,
|
||||
|
||||
@@ -11,8 +11,6 @@ package de.gecheckt.pdf.umbenenner.application.port.out;
|
||||
* <li>{@link PromptLoadingSuccess} — prompt was successfully loaded from the external source</li>
|
||||
* <li>{@link PromptLoadingFailure} — prompt could not be loaded (file not found, read error, etc.)</li>
|
||||
* </ul>
|
||||
*
|
||||
* @since M5
|
||||
*/
|
||||
public sealed interface PromptLoadingResult
|
||||
permits PromptLoadingSuccess, PromptLoadingFailure {
|
||||
|
||||
@@ -25,8 +25,6 @@ import java.util.Objects;
|
||||
*
|
||||
* @param promptIdentifier stable identifier for this prompt version; never null
|
||||
* @param promptContent the prompt template text; never null
|
||||
*
|
||||
* @since M5
|
||||
*/
|
||||
public record PromptLoadingSuccess(
|
||||
PromptIdentifier promptIdentifier,
|
||||
|
||||
@@ -29,10 +29,8 @@ package de.gecheckt.pdf.umbenenner.application.port.out;
|
||||
* <li>Prompt parsing or templating logic</li>
|
||||
* <li>Combining prompt with document text (Application layer handles this)</li>
|
||||
* <li>Template variable substitution</li>
|
||||
* <li>Validation of prompt content against fachliche rules</li>
|
||||
* <li>Validation of prompt content against domain rules</li>
|
||||
* </ul>
|
||||
*
|
||||
* @since M5
|
||||
*/
|
||||
public interface PromptPort {
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* — Extract text content and page count from a single PDF</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* AI-based naming ports (M5+):
|
||||
* AI-based naming and invocation ports:
|
||||
* <ul>
|
||||
* <li>{@link de.gecheckt.pdf.umbenenner.application.port.out.PromptPort}
|
||||
* — Load an external prompt template and derive its stable identifier</li>
|
||||
@@ -58,6 +58,8 @@
|
||||
* — Sealed result of prompt loading (success with identifier and content, or failure)</li>
|
||||
* <li>{@link de.gecheckt.pdf.umbenenner.application.port.out.AiInvocationResult}
|
||||
* — Sealed result of AI service invocation (success with raw response, or technical failure)</li>
|
||||
* <li>{@link de.gecheckt.pdf.umbenenner.domain.model.AiResponseParsingResult}
|
||||
* — Sealed result of parsing raw response into JSON structure (success or parsing failure)</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* Exception types:
|
||||
|
||||
Reference in New Issue
Block a user