Update new_runner_benchmark_test.go

This commit is contained in:
Bruce MacDonald 2025-01-29 10:34:09 -08:00
parent 90698c7d15
commit c2b11611a8

View File

@ -23,6 +23,7 @@ var runnerMetrics []BenchmarkMetrics
type CompletionRequest struct {
Prompt string `json:"prompt"`
NumPredict int `json:"n_predict"`
Temperature float32 `json:"temperature"`
}
// CompletionResponse represents a single response chunk from the streaming API
@ -117,6 +118,7 @@ func runCompletion(ctx context.Context, tt TestCase, b *testing.B) BenchmarkMetr
reqBody := CompletionRequest{
Prompt: tt.prompt,
NumPredict: tt.maxTokens,
Temperature: 0.1,
}
jsonData, err := json.Marshal(reqBody)
if err != nil {