Move LLM validators to PromptKit prompt variables
This commit is contained in:
19
internal/framework/validators/llm_prompt_variables.go
Normal file
19
internal/framework/validators/llm_prompt_variables.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package validators
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"gitea.maximumdirect.net/eric/audita/internal/framework/promptcontext"
|
||||
)
|
||||
|
||||
func BuildValidationVariables(validationPayload []LLMValidationItem, transcriptDescription string) (map[string]string, error) {
|
||||
payloadJSON, err := json.MarshalIndent(validationPayload, "", " ")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("marshal validation payload: %w", err)
|
||||
}
|
||||
return map[string]string{
|
||||
"TranscriptDescriptionBlock": promptcontext.TranscriptDescriptionBlock(transcriptDescription),
|
||||
"PayloadJSON": string(payloadJSON),
|
||||
}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user