Carry optional prompt labels through results
This commit is contained in:
@@ -52,7 +52,7 @@ func BenchmarkCompiledRendering(b *testing.B) {
|
||||
small := newCompiledRenderingBenchmarkCase(b,
|
||||
"small_message", "", []string{"Summary for {{.audience}}."},
|
||||
&domain.PromptDefinition{
|
||||
ID: "compiled-render-benchmark", Version: "v1",
|
||||
ID: "compiled-render-benchmark", Version: stringPointerForTest("v1"),
|
||||
Templates: []domain.PromptMessageTemplate{{Role: "user", Content: "Summary for {{.audience}}."}},
|
||||
}, nil, map[string]string{"audience": "project leads"},
|
||||
len("Summary for project leads."),
|
||||
@@ -68,7 +68,7 @@ func BenchmarkCompiledRendering(b *testing.B) {
|
||||
}
|
||||
largeContent := `{{input "document"}}`
|
||||
largeDefinition := &domain.PromptDefinition{
|
||||
ID: "compiled-render-benchmark", Version: "v1",
|
||||
ID: "compiled-render-benchmark", Version: stringPointerForTest("v1"),
|
||||
Inputs: []domain.PromptInput{{Name: "document"}},
|
||||
Templates: []domain.PromptMessageTemplate{{Role: "user", Content: largeContent}},
|
||||
}
|
||||
@@ -91,7 +91,7 @@ func BenchmarkCompiledRendering(b *testing.B) {
|
||||
`{{input "document"}}|{{input "document"}}`,
|
||||
}
|
||||
repeatedDefinition := &domain.PromptDefinition{
|
||||
ID: "compiled-render-benchmark", Version: "v1", SessionID: repeatedSession,
|
||||
ID: "compiled-render-benchmark", Version: stringPointerForTest("v1"), SessionID: repeatedSession,
|
||||
Inputs: []domain.PromptInput{{Name: "document"}},
|
||||
Templates: []domain.PromptMessageTemplate{
|
||||
{Role: "system", Content: repeatedMessages[0]},
|
||||
@@ -141,7 +141,7 @@ func BenchmarkRetainedRenderedOutput(b *testing.B) {
|
||||
bodyText := string(body)
|
||||
content := `{{input "document"}}`
|
||||
definition := &domain.PromptDefinition{
|
||||
ID: "retained-render-benchmark", Version: "v1",
|
||||
ID: "retained-render-benchmark", Version: stringPointerForTest("v1"),
|
||||
Inputs: []domain.PromptInput{{Name: "document"}},
|
||||
Templates: []domain.PromptMessageTemplate{{Role: "user", Content: content}},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user