From c2b11611a84b6d7e30266d2629863844ebaf1641 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Wed, 29 Jan 2025 10:34:09 -0800 Subject: [PATCH] Update new_runner_benchmark_test.go --- benchmark/new_runner_benchmark_test.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/benchmark/new_runner_benchmark_test.go b/benchmark/new_runner_benchmark_test.go index e93562b84..cf5a1f3e8 100644 --- a/benchmark/new_runner_benchmark_test.go +++ b/benchmark/new_runner_benchmark_test.go @@ -21,8 +21,9 @@ var runnerMetrics []BenchmarkMetrics // CompletionRequest represents the request body for the completion endpoint type CompletionRequest struct { - Prompt string `json:"prompt"` - NumPredict int `json:"n_predict"` + Prompt string `json:"prompt"` + NumPredict int `json:"n_predict"` + Temperature float32 `json:"temperature"` } // CompletionResponse represents a single response chunk from the streaming API @@ -115,8 +116,9 @@ func runCompletion(ctx context.Context, tt TestCase, b *testing.B) BenchmarkMetr // Create request body reqBody := CompletionRequest{ - Prompt: tt.prompt, - NumPredict: tt.maxTokens, + Prompt: tt.prompt, + NumPredict: tt.maxTokens, + Temperature: 0.1, } jsonData, err := json.Marshal(reqBody) if err != nil {