Move embedded prompts to PromptKit definitions

This commit is contained in:
2026-09-24 01:44:23 +00:00
parent 51e370b4c8
commit f8c18247a0
37 changed files with 572 additions and 595 deletions

View File

@@ -1,10 +1,8 @@
package validators
import (
"context"
"gitea.maximumdirect.net/eric/audita/internal/core/schema"
"gitea.maximumdirect.net/eric/audita/internal/framework/responseschema"
"gitea.maximumdirect.net/eric/audita/internal/framework/structuredoutput"
)
type LLMValidatorType string
@@ -17,27 +15,9 @@ const (
LLMValidatorTypeSpokenWordReview LLMValidatorType = "spoken_word_review"
)
type LLMMessage struct {
Role string `json:"role"`
Content string `json:"content"`
}
type StructuredCompletionRequest struct {
StageName string `json:"stage_name"`
Messages []LLMMessage `json:"messages"`
Model string `json:"model,omitempty"`
ResponseSchema *responseschema.Schema `json:"response_schema,omitempty"`
}
type StructuredCompletionResponse struct {
PromptTokens int `json:"prompt_tokens,omitempty"`
CompletionTokens int `json:"completion_tokens,omitempty"`
TotalTokens int `json:"total_tokens,omitempty"`
}
type StructuredLLMClient interface {
CompleteStructured(ctx context.Context, req StructuredCompletionRequest, out any) (StructuredCompletionResponse, error)
}
type StructuredCompletionRequest = structuredoutput.Request
type StructuredCompletionResponse = structuredoutput.Response
type StructuredLLMClient = structuredoutput.Client
// LLMValidationItem is one candidate correction payload passed to LLM validators.
type LLMValidationItem struct {